diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e174912..f7a4da9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,59 +7,16 @@ on: workflow_dispatch: jobs: - lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: pre-commit/action@v3.0.1 - with: - extra_args: --all-files - - tests: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v3 - with: - submodules: "recursive" - - - name: Cache build - uses: actions/cache@v3 - with: - path: core/build-tests - key: ${{ runner.os }}-build-tests-${{ hashFiles('**/CMakeLists.txt') }} - - - name: Create build directory - run: mkdir -p core/build-tests - - - name: Build tests - run: | - cd core/build-tests - cmake .. -DENABLE_TESTS=ON - make -j - - - name: Run tests - run: | - cd core/build-tests - GTEST_OUTPUT=json:test-results/ ctest - - - name: Upload test results - uses: actions/upload-artifact@v4 - if: failure() - with: - name: test_results - path: ${{runner.workspace}}/core/build-tests/test/test-results/**/*.json - cmake-integration-tests: strategy: matrix: include: - codspeed-mode: "instrumentation" runner: "ubuntu-latest" - - codspeed-mode: "walltime" - runner: "codspeed-macro" - - codspeed-mode: "off" - runner: "ubuntu-latest" + # - codspeed-mode: "walltime" + # runner: "codspeed-macro" + # - codspeed-mode: "off" + # runner: "ubuntu-latest" runs-on: ${{ matrix.runner }} steps: - name: Checkout code @@ -83,7 +40,7 @@ jobs: make -j - name: Run the benchmarks - uses: CodSpeedHQ/action@main + uses: CodSpeedHQ/action@v4.1.0 if: matrix.codspeed-mode != 'off' with: mode: ${{ matrix.codspeed-mode }} @@ -96,10 +53,10 @@ jobs: include: - codspeed-mode: "instrumentation" runner: "ubuntu-latest" - - codspeed-mode: "walltime" - runner: "codspeed-macro" - - codspeed-mode: "off" - runner: "ubuntu-latest" + # - codspeed-mode: "walltime" + # runner: "codspeed-macro" + # - codspeed-mode: "off" + # runner: "ubuntu-latest" runs-on: ${{ matrix.runner }} steps: - uses: actions/checkout@v4 @@ -121,65 +78,9 @@ jobs: bazel build //examples/google_benchmark_bazel:my_benchmark --//core:codspeed_mode=${{ matrix.codspeed-mode }} - name: Run the benchmarks - uses: CodSpeedHQ/action@main + uses: CodSpeedHQ/action@v4.1.0 if: matrix.codspeed-mode != 'off' with: mode: ${{ matrix.codspeed-mode }} run: bazel run //examples/google_benchmark_bazel:my_benchmark --//core:codspeed_mode=${{ matrix.codspeed-mode }} token: ${{ secrets.CODSPEED_TOKEN }} - - windows-cmake-build: - strategy: - matrix: - codspeed-mode: ["off", "walltime"] - runs-on: windows-latest - steps: - - name: Checkout code - uses: actions/checkout@v3 - with: - submodules: "recursive" - - - name: Cache build - uses: actions/cache@v3 - with: - path: examples/google_benchmark_cmake/build - key: ${{ runner.os }}-build-${{ matrix.codspeed-mode }}-${{ hashFiles('**/CMakeLists.txt') }} - - - name: Create build directory - run: | - if (-not (Test-Path examples\google_benchmark_cmake\build)) { - mkdir examples\google_benchmark_cmake\build - } - shell: pwsh - - - name: Build benchmark example - run: | - cd examples\google_benchmark_cmake\build - cmake -DCODSPEED_MODE=${{ matrix.codspeed-mode }} .. - cmake --build . --config Release - shell: pwsh - - windows-bazel-build: - strategy: - matrix: - codspeed-mode: ["off", "walltime"] - runs-on: windows-latest - steps: - - uses: actions/checkout@v4 - with: - submodules: "recursive" - - - name: Set up Bazel - uses: bazel-contrib/setup-bazel@0.14.0 - with: - # Avoid downloading Bazel every time. - bazelisk-cache: true - # Store build cache per workflow. - disk-cache: ${{ github.workflow }} - # Share repository cache between workflows. - repository-cache: true - - - name: Build benchmark example - run: | - bazel build //examples/google_benchmark_bazel:my_benchmark --//core:codspeed_mode=${{ matrix.codspeed-mode }} - shell: pwsh