Skip to content

Commit

Permalink
ci: Fix CI
Browse files Browse the repository at this point in the history
Lint first, setup on both ubuntu and macos
  • Loading branch information
oskarth committed Dec 7, 2023
1 parent ec34940 commit e16cc89
Showing 1 changed file with 17 additions and 24 deletions.
41 changes: 17 additions & 24 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,28 @@ env:
CARGO_TERM_COLOR: always

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check mopro-core formatting
run: cd ark-zkey/ && cargo fmt --all -- --check
- name: Check mopro-core formatting
run: cd mopro-core/ && cargo fmt --all -- --check
- name: Check mopro-ffi formatting
run: cd mopro-ffi/ && cargo fmt --all -- --check

setup:
runs-on: macos-latest
outputs:
cache-key: ${{ steps.cache-key.outputs.key }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest]
steps:
- uses: actions/checkout@v3
- name: Install circom
run: |
git clone https://github.com/iden3/circom.git
cd circom
cargo build --release
cargo install --path circom
- name: Prepare CI
run: ./scripts/prepare_ci.sh
- name: Generate cache key
id: cache-key
run: echo "::set-output name=key::$(date +%s)"
run: echo "cache-key-$(date +%s)"

build-ios:
needs: setup
Expand Down Expand Up @@ -61,16 +66,4 @@ jobs:
if: matrix.test-suite == 'ios'
run: |
cd mopro-ios/MoproKit/Example
xcodebuild test -scheme MoproKit-Example -workspace MoproKit.xcworkspace -destination "platform=iOS Simulator,OS=16.2,name=iPhone 14 Pro"
lint:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check mopro-core formatting
run: cd ark-zkey/ && cargo fmt --all -- --check
- name: Check mopro-core formatting
run: cd mopro-core/ && cargo fmt --all -- --check
- name: Check mopro-ffi formatting
run: cd mopro-ffi/ && cargo fmt --all -- --check
xcodebuild test -scheme MoproKit-Example -workspace MoproKit.xcworkspace -destination "platform=iOS Simulator,OS=16.2,name=iPhone 14 Pro"

0 comments on commit e16cc89

Please sign in to comment.