From 106041372a9762be1767d7e848a04550f38caec0 Mon Sep 17 00:00:00 2001 From: "Rojas Chaves, Jose" Date: Sat, 26 Oct 2024 01:08:56 -0400 Subject: [PATCH 1/5] Fix deprecated version for artifact actions from v2 to v4 --- .github/workflows/github-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github-ci.yml b/.github/workflows/github-ci.yml index 91ba1dbf..58b66784 100644 --- a/.github/workflows/github-ci.yml +++ b/.github/workflows/github-ci.yml @@ -142,7 +142,7 @@ jobs: # set +x - name: Archive benchmark results - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: bench_hexl_${{github.sha}}.csv path: ${{ github.workspace }}/${{ github.workflow }}_${{ github.sha }} From 447ea0ab6e21a17d0f2d1d100c57a672fe7a3795 Mon Sep 17 00:00:00 2001 From: "Rojas Chaves, Jose" Date: Sat, 26 Oct 2024 01:20:18 -0400 Subject: [PATCH 2/5] Ensure unique artifact --- .github/workflows/github-ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/github-ci.yml b/.github/workflows/github-ci.yml index 58b66784..7d7a5065 100644 --- a/.github/workflows/github-ci.yml +++ b/.github/workflows/github-ci.yml @@ -45,6 +45,8 @@ jobs: name: Format runs-on: ubuntu-22.04 steps: + - name: Run sccache-cache + uses: mozilla-actions/sccache-action@v0.0.9 - uses: actions/checkout@v2 # Required for pre-commit - run: pip3 install cpplint==1.5.5 @@ -144,7 +146,7 @@ jobs: - name: Archive benchmark results uses: actions/upload-artifact@v4 with: - name: bench_hexl_${{github.sha}}.csv + name: bench_hexl_${{github.sha}}_${{ github.run_id }}_${{ github.job }}.csv path: ${{ github.workspace }}/${{ github.workflow }}_${{ github.sha }} retention-days: 90 # Maximum for free version From 4a8e7ec94b38831ad5a424c9bd79946b90495f5f Mon Sep 17 00:00:00 2001 From: "Rojas Chaves, Jose" Date: Sat, 26 Oct 2024 01:29:49 -0400 Subject: [PATCH 3/5] Fix artifact naming --- .github/workflows/github-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github-ci.yml b/.github/workflows/github-ci.yml index 7d7a5065..b714a08f 100644 --- a/.github/workflows/github-ci.yml +++ b/.github/workflows/github-ci.yml @@ -146,7 +146,7 @@ jobs: - name: Archive benchmark results uses: actions/upload-artifact@v4 with: - name: bench_hexl_${{github.sha}}_${{ github.run_id }}_${{ github.job }}.csv + name: bench_hexl_${{github.sha}}_${{github.run_id}}_${{github.job}}_${{os}}_${{build_type}}_${{shared_lib}} path: ${{ github.workspace }}/${{ github.workflow }}_${{ github.sha }} retention-days: 90 # Maximum for free version From 5e3f0b9a6008088228c674c590b9594294b11b82 Mon Sep 17 00:00:00 2001 From: "Rojas Chaves, Jose" Date: Sat, 26 Oct 2024 01:37:36 -0400 Subject: [PATCH 4/5] adding matrix root --- .github/workflows/github-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github-ci.yml b/.github/workflows/github-ci.yml index b714a08f..6b4db87c 100644 --- a/.github/workflows/github-ci.yml +++ b/.github/workflows/github-ci.yml @@ -146,7 +146,7 @@ jobs: - name: Archive benchmark results uses: actions/upload-artifact@v4 with: - name: bench_hexl_${{github.sha}}_${{github.run_id}}_${{github.job}}_${{os}}_${{build_type}}_${{shared_lib}} + name: bench_hexl_${{github.sha}}_${{github.run_id}}_${{github.job}}_${{matrix.os}}_${{matrix.build_type}}_${{matrix.shared_lib}} path: ${{ github.workspace }}/${{ github.workflow }}_${{ github.sha }} retention-days: 90 # Maximum for free version From b815090aa9a99a1889d5aa094056421bb3b4ba5f Mon Sep 17 00:00:00 2001 From: "Rojas Chaves, Jose" Date: Sat, 26 Oct 2024 01:41:50 -0400 Subject: [PATCH 5/5] adding Shared keyword --- .github/workflows/github-ci.yml | 66 ++------------------------------- 1 file changed, 4 insertions(+), 62 deletions(-) diff --git a/.github/workflows/github-ci.yml b/.github/workflows/github-ci.yml index 6b4db87c..5f9b4c59 100644 --- a/.github/workflows/github-ci.yml +++ b/.github/workflows/github-ci.yml @@ -45,13 +45,11 @@ jobs: name: Format runs-on: ubuntu-22.04 steps: - - name: Run sccache-cache - uses: mozilla-actions/sccache-action@v0.0.9 - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 # Required for pre-commit - run: pip3 install cpplint==1.5.5 # NOTE: This is deprecated in favor of pre-commit.ci - - uses: pre-commit/action@v2.0.2 + - uses: pre-commit/action@v3.0.1 with: extra_args: --all-files @@ -66,10 +64,7 @@ jobs: strategy: matrix: # removed platforms not available on github hosted servers. - # sel-fhosted ice-lake servers not enabled by sysadmin - # os: [ice-lake, [self-hosted, ubuntu-18.04], macos-latest, ubuntu-20.04] - # os: [macos-latest, ubuntu-20.04] - os: [macos-latest, ubuntu-22.04] + os: [ubuntu-22.04] build_type: [Release, Debug] shared_lib: [ON, OFF] include: @@ -78,9 +73,6 @@ jobs: benchmark_min_time: "--benchmark_min_time=0.001" - build_type: Release benchmark_min_time: "" - exclude: # Skip debug on Mac. TODO: add Debug mode - - os: macos-latest - build_type: Debug steps: - uses: actions/checkout@v2 - name: Setup cmake @@ -146,7 +138,7 @@ jobs: - name: Archive benchmark results uses: actions/upload-artifact@v4 with: - name: bench_hexl_${{github.sha}}_${{github.run_id}}_${{github.job}}_${{matrix.os}}_${{matrix.build_type}}_${{matrix.shared_lib}} + name: bench_hexl_${{github.sha}}_${{github.run_id}}_${{github.job}}_${{matrix.os}}_${{matrix.build_type}}_Shared_${{matrix.shared_lib}} path: ${{ github.workspace }}/${{ github.workflow }}_${{ github.sha }} retention-days: 90 # Maximum for free version @@ -184,53 +176,3 @@ jobs: build/${{ matrix.build_type}}/example.exe # TODO: add pkgconfig and vcpkg examples - - experimental-build: - name: 'experimental: ${{ matrix.os }} ${{ matrix.build_type }} shared=${{ matrix.shared_lib }}' - runs-on: '${{ matrix.os }}' - defaults: - run: - shell: bash - strategy: - matrix: - # This is an unsupported experimental build - use at your own risk - # - # Ice-lake platform not available on github - # self-hosted platforms disabled by Intel github sys admin - # building on default ubuntu-20.04 platform - # os: [ice-lake] - os: [ubuntu-20.04] - build_type: [Release] - shared_lib: [ON] - steps: - - uses: actions/checkout@v2 - - name: Default build - run: | - set -x - if [ "$RUNNER_OS" == "Linux" ]; then - export CC=clang-11 - export CXX=clang++-11 - fi - - # Print information useful for debugging - whoami - echo $HOME - echo $GITHUB_WORKSPACE - echo "Testing from branch:" - echo $GITHUB_REFH - cmake --version - pwd - - # Build library - cmake -S . -B build -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ - -DHEXL_SHARED_LIB=${{ matrix.shared_lib }} \ - -DCMAKE_INSTALL_PREFIX=./ \ - -DHEXL_EXPERIMENTAL=ON - cmake --build build -j - cmake --build build --target install - cmake --build build --target unittest - # Instead of calling cmake --build build --target bench, - # we run the executable directly to pass command-line arguments - ./build/benchmark/bench_hexl \ - --benchmark_out="${GITHUB_WORKFLOW}_${GITHUB_SHA}" \ - --benchmark_out_format=csv