Added badges #33
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: C++/CUDA | |
on: | |
pull_request: | |
branches: | |
- main | |
- dev | |
push: | |
branches: | |
- main | |
- dev | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
check-changed-files: | |
uses: ./.github/workflows/check-changed-files.yml | |
check-format: | |
name: Check Code Format | |
runs-on: ubuntu-22.04 | |
needs: check-changed-files | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Check clang-format | |
if: needs.check-changed-files.outputs.cpp_cuda == 'true' | |
run: if [[ $(find ./ \( -path ./icicle/build -prune -o -path ./**/target -prune -o -path ./examples -prune \) -iname *.h -or -iname *.cuh -or -iname *.cu -or -iname *.c -or -iname *.cpp | xargs clang-format --dry-run -ferror-limit=1 -style=file 2>&1) ]]; then echo "Please run clang-format"; exit 1; fi | |
test-linux: | |
name: Test on Linux | |
runs-on: [self-hosted, Linux, X64, icicle] | |
needs: [check-changed-files, check-format] | |
strategy: | |
matrix: | |
curve: [bn254, bls12_381, bls12_377, bw6_761] | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v4 | |
- name: Build | |
working-directory: ./icicle | |
if: needs.check-changed-files.outputs.cpp_cuda == 'true' | |
run: | | |
mkdir -p build | |
cmake -DBUILD_TESTS=ON -DCMAKE_BUILD_TYPE=Release -DCURVE=${{ matrix.curve }} -DG2_DEFINED=ON -S . -B build | |
cmake --build build | |
- name: Run C++ Tests | |
working-directory: ./icicle/build | |
if: needs.check-changed-files.outputs.cpp_cuda == 'true' | |
run: ctest |