Skip to content

Commit

Permalink
update CI
Browse files Browse the repository at this point in the history
  • Loading branch information
ChickenLover committed Dec 12, 2024
1 parent 8921091 commit 51fc21c
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 365 deletions.
63 changes: 3 additions & 60 deletions .github/workflows/cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,40 +27,19 @@ jobs:
if: needs.check-changed-files.outputs.cpp == 'true'
run: ./scripts/format_all.sh . --check --exclude "build|wrappers"

extract-cuda-backend-branch:
uses: ./.github/workflows/extract-backends.yml
with:
pr-number: ${{ github.event.pull_request.number }}

test-linux-curve:
name: Test on Linux
runs-on: [self-hosted, Linux, X64, icicle]
needs: [check-changed-files, check-format, extract-cuda-backend-branch]
needs: [check-changed-files, check-format]
strategy:
matrix:
curve:
- name: bn254
build_args: -DG2=ON -DECNTT=ON
- name: bls12_381
build_args: -DG2=ON -DECNTT=ON
- name: bls12_377
build_args: -DG2=ON -DECNTT=ON
- name: bw6_761
build_args: -DG2=ON -DECNTT=ON
- name: grumpkin
build_args:
build_args: -DG2=ON

steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Checkout CUDA Backend
if: needs.check-changed-files.outputs.cpp == 'true'
uses: actions/checkout@v4
with:
repository: ingonyama-zk/icicle-cuda-backend
path: ./icicle/backend/cuda
ssh-key: ${{ secrets.CUDA_PULL_KEY }}
ref: ${{ needs.extract-cuda-backend-branch.outputs.cuda-backend-branch }}
- name: Build curve
working-directory: ./icicle
if: needs.check-changed-files.outputs.cpp == 'true'
Expand All @@ -71,40 +50,4 @@ jobs:
- name: Run C++ curve Tests
working-directory: ./icicle/build/tests
if: needs.check-changed-files.outputs.cpp == 'true'
run: ctest --output-on-failure

test-linux-field:
name: Test on Linux
runs-on: [self-hosted, Linux, X64, icicle]
needs: [check-changed-files, check-format, extract-cuda-backend-branch]
strategy:
matrix:
field:
- name: babybear
build_args: -DEXT_FIELD=ON
- name: stark252
build_args: -DEXT_FIELD=OFF
- name: m31
build_args: -DEXT_FIELD=ON
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Checkout CUDA Backend
if: needs.check-changed-files.outputs.cpp == 'true'
uses: actions/checkout@v4
with:
repository: ingonyama-zk/icicle-cuda-backend
path: ./icicle/backend/cuda
ssh-key: ${{ secrets.CUDA_PULL_KEY }}
ref: ${{ needs.extract-cuda-backend-branch.outputs.cuda-backend-branch }}
- name: Build field
working-directory: ./icicle
if: needs.check-changed-files.outputs.cpp == 'true'
run: |
mkdir -p build && rm -rf build/*
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=ON -DFIELD=${{ matrix.field.name }} ${{ matrix.field.build_args }} -DCUDA_BACKEND=local -S . -B build
cmake --build build -j
- name: Run C++ field Tests
working-directory: ./icicle/build/tests
if: needs.check-changed-files.outputs.cpp == 'true'
run: ctest --output-on-failure
run: ctest -R msm --output-on-failure
46 changes: 0 additions & 46 deletions .github/workflows/deploy-docs.yml

This file was deleted.

68 changes: 0 additions & 68 deletions .github/workflows/examples.yml

This file was deleted.

36 changes: 0 additions & 36 deletions .github/workflows/extract-backends.yml

This file was deleted.

101 changes: 2 additions & 99 deletions .github/workflows/golang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,42 +31,21 @@ jobs:
if: needs.check-changed-files.outputs.golang == 'true'
run: if [[ $(go list ./... | xargs go fmt) ]]; then echo "Please run go fmt"; exit 1; fi

extract-cuda-backend-branch:
uses: ./.github/workflows/extract-backends.yml
with:
pr-number: ${{ github.event.pull_request.number }}

# TODO - add runtime tests to the workflow
# TODO - add core tests to the workflow

build-curves-linux:
name: Build and test curves on Linux
runs-on: [self-hosted, Linux, X64, icicle]
needs: [check-changed-files, check-format, extract-cuda-backend-branch]
needs: [check-changed-files, check-format]
strategy:
matrix:
curve:
- name: bn254
build_args:
- name: bls12_381
build_args:
- name: bls12_377
build_args:
- name: bw6_761
build_args:
- name: grumpkin
build_args:
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Checkout CUDA Backend
if: needs.check-changed-files.outputs.golang == 'true' || needs.check-changed-files.outputs.cpp == 'true'
uses: actions/checkout@v4
with:
repository: ingonyama-zk/icicle-cuda-backend
path: ./icicle/backend/cuda
ssh-key: ${{ secrets.CUDA_PULL_KEY }}
ref: ${{ needs.extract-cuda-backend-branch.outputs.cuda-backend-branch }}
- name: Setup go
uses: actions/setup-go@v5
with:
Expand All @@ -83,80 +62,4 @@ jobs:
run: |
CURVE=$(echo ${{ matrix.curve.name }} | sed -e 's/_//g')
export ICICLE_BACKEND_INSTALL_DIR=/usr/local/lib
go test ./$CURVE/tests -count=1 -failfast -p 2 -timeout 60m -v
build-fields-linux:
name: Build and test fields on Linux
runs-on: [self-hosted, Linux, X64, icicle]
needs: [check-changed-files, check-format, extract-cuda-backend-branch]
strategy:
matrix:
field:
- name: babybear
build_args:
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Checkout CUDA Backend
if: needs.check-changed-files.outputs.golang == 'true' || needs.check-changed-files.outputs.cpp == 'true'
uses: actions/checkout@v4
with:
repository: ingonyama-zk/icicle-cuda-backend
path: ./icicle/backend/cuda
ssh-key: ${{ secrets.CUDA_PULL_KEY }}
ref: ${{ needs.extract-cuda-backend-branch.outputs.cuda-backend-branch }}
- name: Setup go
uses: actions/setup-go@v5
with:
go-version: '1.22.0'
- name: Build
working-directory: ./wrappers/golang
if: needs.check-changed-files.outputs.golang == 'true' || needs.check-changed-files.outputs.cpp == 'true'
# builds a single field with the fields specified build args
run: |
./build.sh -field=${{ matrix.field.name }} ${{ matrix.field.build_args }} -cuda_backend=local
- name: Test
working-directory: ./wrappers/golang/fields
if: needs.check-changed-files.outputs.golang == 'true' || needs.check-changed-files.outputs.cpp == 'true'
run: |
FIELD=$(echo ${{ matrix.field.name }} | sed -e 's/_//g')
export ICICLE_BACKEND_INSTALL_DIR=/usr/local/lib
go test ./$FIELD/tests -count=1 -failfast -p 2 -timeout 60m -v
build-hash-linux:
name: Build and test hash on Linux
runs-on: [self-hosted, Linux, X64, icicle]
needs: [check-changed-files, check-format, extract-cuda-backend-branch]
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Checkout CUDA Backend
if: needs.check-changed-files.outputs.golang == 'true' || needs.check-changed-files.outputs.cpp == 'true'
uses: actions/checkout@v4
with:
repository: ingonyama-zk/icicle-cuda-backend
path: ./icicle/backend/cuda
ssh-key: ${{ secrets.CUDA_PULL_KEY }}
ref: ${{ needs.extract-cuda-backend-branch.outputs.cuda-backend-branch }}
- name: Setup go
uses: actions/setup-go@v5
with:
go-version: '1.22.0'
- name: Build
working-directory: ./wrappers/golang
if: needs.check-changed-files.outputs.golang == 'true' || needs.check-changed-files.outputs.cpp == 'true'
# builds the hash and merkle tree lib using a local copy of the CUDA backend
run: |
./build.sh -cuda_backend=local
- name: Test Hashes
working-directory: ./wrappers/golang/hash
if: needs.check-changed-files.outputs.golang == 'true' || needs.check-changed-files.outputs.cpp == 'true'
run: |
export ICICLE_BACKEND_INSTALL_DIR=/usr/local/lib
go test ./tests -count=1 -failfast -p 2 -timeout 60m -v
- name: Test Merkle Tree
working-directory: ./wrappers/golang/merkle-tree
if: needs.check-changed-files.outputs.golang == 'true' || needs.check-changed-files.outputs.cpp == 'true'
run: |
export ICICLE_BACKEND_INSTALL_DIR=/usr/local/lib
go test ./tests -count=1 -failfast -p 2 -timeout 60m -v
go test ./$CURVE/tests -count=1 -failfast -p 2 -timeout 60m -v
8 changes: 0 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,6 @@ jobs:
uses: actions/checkout@v4
with:
ssh-key: ${{ secrets.DEPLOY_KEY }}
- name: Checkout CUDA Backend
uses: actions/checkout@v4
with:
repository: ingonyama-zk/icicle-cuda-backend
path: ./icicle/backend/cuda
token: ${{ secrets.GITHUB_TOKEN }}
ssh-key: ${{ secrets.CUDA_PULL_KEY }}
ref: main
- name: Setup Cache
id: cache
uses: actions/cache@v4
Expand Down
Loading

0 comments on commit 51fc21c

Please sign in to comment.