Merge pull request #29 from zkmopro/link-lmdb #152
This file contains hidden or 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: Noir Test | |
| on: [push, pull_request] | |
| jobs: | |
| test-aarch64: | |
| runs-on: macos-latest | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # Cache Cargo registry and dependencies | |
| - name: Cache Cargo registry | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| key: ${{ runner.os }}-aarch64-cargo-registry-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-aarch64-cargo-registry- | |
| # Cache Cargo build artifacts | |
| - name: Cache Cargo build | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| target/ | |
| bb/target/ | |
| noir/target/ | |
| key: ${{ runner.os }}-aarch64-cargo-build-${{ hashFiles('**/Cargo.lock') }}-${{ hashFiles('**/*.rs') }} | |
| restore-keys: | | |
| ${{ runner.os }}-aarch64-cargo-build-${{ hashFiles('**/Cargo.lock') }}- | |
| ${{ runner.os }}-aarch64-cargo-build- | |
| - name: Install Rust iOS toolchain | |
| uses: dtolnay/[email protected] | |
| with: | |
| targets: | | |
| aarch64-apple-ios | |
| aarch64-apple-ios-sim | |
| aarch64-apple-darwin | |
| aarch64-linux-android | |
| # Cache Nargo installation | |
| - name: Cache Nargo | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.nargo | |
| key: ${{ runner.os }}-aarch64-nargo-1.0.0-beta.8 | |
| restore-keys: | | |
| ${{ runner.os }}-aarch64-nargo- | |
| - name: Install Nargo | |
| uses: noir-lang/[email protected] | |
| with: | |
| toolchain: 1.0.0-beta.8 | |
| # Cache circuit artifacts | |
| - name: Cache circuit artifacts | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| circuits/target/ | |
| key: ${{ runner.os }}-aarch64-circuit-artifacts-${{ hashFiles('circuits/**/*.nr', 'circuits/**/*.toml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-aarch64-circuit-artifacts- | |
| - name: Build circuits | |
| run: | | |
| cd circuits | |
| sh ./scripts/generate-bytecode-and-witness.sh keccak | |
| sh ./scripts/generate-bytecode-and-witness.sh keccak_large | |
| - name: Test Noir | |
| # sequential execution to avoid race conditions | |
| run: | | |
| cargo test --all-features -- --test-threads=1 | |
| - name: Build for iOS | |
| run: | | |
| cargo build --target aarch64-apple-ios --features ios-build | |
| - name: Build for iOS Simulator | |
| run: | | |
| cargo build --target aarch64-apple-ios-sim --features ios-build | |
| - name: Build for macOS Darwin | |
| run: | | |
| cargo build --target aarch64-apple-darwin --features ios-build | |
| # Cache cargo-ndk installation | |
| - name: Cache cargo-ndk | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/bin/cargo-ndk | |
| key: ${{ runner.os }}-aarch64-cargo-ndk-${{ hashFiles('~/.cargo/bin/cargo-ndk') }} | |
| restore-keys: | | |
| ${{ runner.os }}-aarch64-cargo-ndk- | |
| - name: Install cargo-ndk | |
| run: | | |
| if ! command -v cargo-ndk &> /dev/null; then | |
| cargo install cargo-ndk | |
| fi | |
| - name: Build for Android | |
| run: | | |
| cargo ndk -t arm64-v8a build --features android-build | |
| test-x86_64: | |
| runs-on: macos-13 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # Cache Cargo registry and dependencies | |
| - name: Cache Cargo registry | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| key: ${{ runner.os }}-x86_64-cargo-registry-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-x86_64-cargo-registry- | |
| # Cache Cargo build artifacts | |
| - name: Cache Cargo build | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| target/ | |
| bb/target/ | |
| noir/target/ | |
| key: ${{ runner.os }}-x86_64-cargo-build-${{ hashFiles('**/Cargo.lock') }}-${{ hashFiles('**/*.rs') }} | |
| restore-keys: | | |
| ${{ runner.os }}-x86_64-cargo-build-${{ hashFiles('**/Cargo.lock') }}- | |
| ${{ runner.os }}-x86_64-cargo-build- | |
| - name: Install Rust x86_64 toolchain | |
| uses: dtolnay/[email protected] | |
| with: | |
| targets: | | |
| x86_64-apple-ios | |
| x86_64-apple-darwin | |
| x86_64-linux-android | |
| # Cache Nargo installation | |
| - name: Cache Nargo | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.nargo | |
| key: ${{ runner.os }}-x86_64-nargo-1.0.0-beta.8 | |
| restore-keys: | | |
| ${{ runner.os }}-x86_64-nargo- | |
| - name: Install Nargo | |
| uses: noir-lang/[email protected] | |
| with: | |
| toolchain: 1.0.0-beta.8 | |
| # Cache circuit artifacts | |
| - name: Cache circuit artifacts | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| circuits/target/ | |
| key: ${{ runner.os }}-x86_64-circuit-artifacts-${{ hashFiles('circuits/**/*.nr', 'circuits/**/*.toml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-x86_64-circuit-artifacts- | |
| - name: Build circuits | |
| run: | | |
| cd circuits | |
| sh ./scripts/generate-bytecode-and-witness.sh keccak | |
| sh ./scripts/generate-bytecode-and-witness.sh keccak_large | |
| - name: Test Noir x86_64 | |
| # sequential execution to avoid race conditions | |
| run: | | |
| cargo test --all-features -- --test-threads=1 x86_64 | |
| - name: Build for iOS x86_64 | |
| run: | | |
| cargo build --target x86_64-apple-ios --features ios-build | |
| - name: Build for macOS Darwin x86_64 | |
| run: | | |
| cargo build --target x86_64-apple-darwin --features ios-build | |
| # Cache cargo-ndk installation | |
| - name: Cache cargo-ndk | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/bin/cargo-ndk | |
| key: ${{ runner.os }}-x86_64-cargo-ndk-${{ hashFiles('~/.cargo/bin/cargo-ndk') }} | |
| restore-keys: | | |
| ${{ runner.os }}-x86_64-cargo-ndk- | |
| - name: Install cargo-ndk | |
| run: | | |
| if ! command -v cargo-ndk &> /dev/null; then | |
| cargo install cargo-ndk | |
| fi | |
| - name: Build for Android x86_64 | |
| run: | | |
| cargo ndk -t x86_64 build --features android-build | |
| test-linux: | |
| runs-on: ubuntu-latest | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # Cache Cargo registry and dependencies | |
| - name: Cache Cargo registry | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| key: ${{ runner.os }}-linux-cargo-registry-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-linux-cargo-registry- | |
| # Cache Cargo build artifacts | |
| - name: Cache Cargo build | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| target/ | |
| bb/target/ | |
| noir/target/ | |
| key: ${{ runner.os }}-linux-cargo-build-${{ hashFiles('**/Cargo.lock') }}-${{ hashFiles('**/*.rs') }} | |
| restore-keys: | | |
| ${{ runner.os }}-linux-cargo-build-${{ hashFiles('**/Cargo.lock') }}- | |
| ${{ runner.os }}-linux-cargo-build- | |
| - name: Install Rust Linux toolchain | |
| uses: dtolnay/[email protected] | |
| with: | |
| targets: | | |
| x86_64-unknown-linux-gnu | |
| # Cache Nargo installation | |
| - name: Cache Nargo | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.nargo | |
| key: ${{ runner.os }}-linux-nargo-1.0.0-beta.8 | |
| restore-keys: | | |
| ${{ runner.os }}-linux-nargo- | |
| - name: Install Nargo | |
| uses: noir-lang/[email protected] | |
| with: | |
| toolchain: 1.0.0-beta.8 | |
| # Cache circuit artifacts | |
| - name: Cache circuit artifacts | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| circuits/target/ | |
| key: ${{ runner.os }}-linux-circuit-artifacts-${{ hashFiles('circuits/**/*.nr', 'circuits/**/*.toml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-linux-circuit-artifacts- | |
| - name: Build circuits | |
| run: | | |
| cd circuits | |
| sh ./scripts/generate-bytecode-and-witness.sh keccak | |
| sh ./scripts/generate-bytecode-and-witness.sh keccak_large | |
| - name: Test Noir Linux | |
| # sequential execution to avoid race conditions | |
| run: | | |
| cargo test --all-features -- --test-threads=1 | |
| - name: Build for Linux x86_64 | |
| run: | | |
| cargo build --target x86_64-unknown-linux-gnu |