Skip to content

Commit

Permalink
final version
Browse files Browse the repository at this point in the history
  • Loading branch information
olomix committed Nov 16, 2023
1 parent a2f061c commit aff6b36
Showing 1 changed file with 23 additions and 58 deletions.
81 changes: 23 additions & 58 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,65 +7,8 @@ on:
- cibuild

jobs:
build-apple-test:
runs-on: macos-13-xlarge
steps:
- uses: actions/checkout@v4
with:
submodules: "recursive"

- name: Cache circuits
uses: actions/cache@v3
with:
path: |
circuits
key: circuits-ci.zip

- name: Get circuits
run: |
set -e
if [[ ! -d "circuits" ]]; then
mkdir circuits
curl -o circuits/ci.zip -L https://iden3-circuits-bucket.s3.eu-west-1.amazonaws.com/ci.zip
unzip -o circuits/ci.zip -d circuits
rm circuits/ci.zip
fi
- name: Cache gmp build
uses: actions/cache@v3
with:
path: |
depends/gmp
depends/gmp-6.2.1.tar.xz
key: ${{ runner.os }}-witnesscalc-gmp-apple-arm64-${{ hashFiles('build_gmp.sh') }}

- name: install dependencies
run: |
brew install nasm
- name: build gmp
run: |
if [[ ! -d "depends/gmp/package" ]]; then ./build_gmp.sh host; fi
if [[ ! -d "depends/gmp/package_ios_arm64" ]]; then ./build_gmp.sh ios; fi
if [[ ! -d "depends/gmp/package_iphone_simulator" ]]; then ./build_gmp.sh ios_simulator; fi
- name: build
run: |
mkdir build_witnesscalc && cd build_witnesscalc
cmake .. -DTARGET_PLATFORM=arm64_host -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../package
make -j8 -vvv
make install
cd ../
- name: test witness generation
run: |
npm install -g snarkjs
mkdir temp
./run_tests.sh
build-apple-arm64:
runs-on: macos-13-xlarge
if: false
steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -137,6 +80,29 @@ jobs:
cp -r ../package/include ../package_ios_simulator/include
cd ../
- name: Cache circuits
uses: actions/cache@v3
with:
path: |
circuits
key: circuits-ci.zip

- name: Get circuits
run: |
set -e
if [[ ! -d "circuits" ]]; then
mkdir circuits
curl -o circuits/ci.zip -L https://iden3-circuits-bucket.s3.eu-west-1.amazonaws.com/ci.zip
unzip -o circuits/ci.zip -d circuits
rm circuits/ci.zip
fi
- name: test witness generation
run: |
npm install -g snarkjs
mkdir temp
./run_tests.sh
- name: upload macOS arm64 artifacts
uses: actions/upload-artifact@v3
with:
Expand All @@ -163,7 +129,6 @@ jobs:

build-linux:
runs-on: ubuntu-22.04
if: false
steps:
- uses: actions/checkout@v4
with:
Expand Down

0 comments on commit aff6b36

Please sign in to comment.