Skip to content

Commit

Permalink
Merge branch 'master' into sync-noir
Browse files Browse the repository at this point in the history
* master:
  chore: add linting to avm-transpiler CI (#6732)
  feat(avm): poseidon2 gadget (#6504)
  chore(ci): try a different ubuntu runner (#6740)
  feat(nargo): hidden option to show contract artifact paths written by `nargo compile` (#6131)
  feat(avm): sha256_compression (#6452)
  • Loading branch information
TomAFrench committed May 29, 2024
2 parents d96d985 + 57864f9 commit 6807a54
Show file tree
Hide file tree
Showing 36 changed files with 1,768 additions and 652 deletions.
36 changes: 28 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,13 @@ jobs:
secrets: inherit

changes:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
# Required permissions
permissions:
pull-requests: read
# Set job outputs to values from filter step
outputs:
avm-transpiler: ${{ steps.filter.outputs.avm-transpiler }}
barretenberg: ${{ steps.filter.outputs.barretenberg }}
barretenberg-cpp: ${{ steps.filter.outputs.barretenberg-cpp }}
noir: ${{ steps.filter.outputs.noir }}
Expand All @@ -61,6 +62,8 @@ jobs:
- 'barretenberg/cpp/**'
noir:
- 'noir/**'
avm-transpiler:
- 'avm-transpiler/**'
l1-contracts:
- 'l1-contracts/**'
noir-projects:
Expand Down Expand Up @@ -101,7 +104,7 @@ jobs:
# all the non-bench end-to-end integration tests for aztec
e2e:
needs: build
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -130,7 +133,7 @@ jobs:
# all the benchmarking end-to-end integration tests for aztec (not required to merge)
bench-e2e:
needs: build
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -162,7 +165,7 @@ jobs:
+${{ matrix.test }}
acir-bench:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
needs: [setup, changes]
if: ${{ needs.changes.outputs.barretenberg == 'true' || needs.changes.outputs.noir == 'true' }}
steps:
Expand Down Expand Up @@ -419,6 +422,21 @@ jobs:
timeout-minutes: 40
run: earthly-ci --no-output ./noir-projects/+test

avm-format:
needs: [setup, changes]
runs-on: ${{ github.event.pull_request.user.login || github.actor }}-x86
if: ${{ needs.changes.outputs.avm-transpiler == 'true' || needs.changes.outputs.noir == 'true' }}
steps:
- uses: actions/checkout@v4
with: { ref: "${{ env.GIT_COMMIT }}" }
- uses: ./.github/ci-setup-action
with:
concurrency_key: avm-transpiler-format-x86
- name: "Format AVM transpiler"
working-directory: ./avm-transpiler/
timeout-minutes: 40
run: earthly-ci --no-output ./+format

yarn-project-formatting:
needs: build
runs-on: ${{ github.event.pull_request.user.login || github.actor }}-x86
Expand Down Expand Up @@ -489,7 +507,7 @@ jobs:
run: earthly-ci --no-output ./docs/+deploy-preview --ENV=staging --PR=${{ github.event.number }} --AZTEC_BOT_COMMENTER_GITHUB_TOKEN=${{ secrets.AZTEC_BOT_GITHUB_TOKEN }} --NETLIFY_AUTH_TOKEN=${{ secrets.NETLIFY_AUTH_TOKEN }} --NETLIFY_SITE_ID=${{ secrets.NETLIFY_SITE_ID }}

bb-bench:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
needs: [setup, changes]
if: ${{ needs.changes.outputs.barretenberg-cpp == 'true' }}
steps:
Expand Down Expand Up @@ -609,7 +627,7 @@ jobs:
message: ${{ steps.gates_diff.outputs.markdown }}

merge-check:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
needs:
# must be kept in sync with rerun-check
- setup
Expand All @@ -631,6 +649,7 @@ jobs:
- noir-examples
- noir-packages-test
- noir-projects
- avm-format
- yarn-project-formatting
- yarn-project-test
- prover-client-test
Expand All @@ -656,7 +675,7 @@ jobs:
fi
rerun-check:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
permissions:
actions: write
needs:
Expand All @@ -680,6 +699,7 @@ jobs:
- noir-examples
- noir-packages-test
- noir-projects
- avm-format
- yarn-project-formatting
- yarn-project-test
- prover-client-test
Expand All @@ -706,7 +726,7 @@ jobs:
notify:
needs:
- merge-check
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
if: ${{ github.ref == 'refs/heads/master' && failure() }}
steps:
- name: Send notification to aztec3-ci channel if workflow failed on master
Expand Down
2 changes: 2 additions & 0 deletions avm-transpiler/.rustfmt.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
edition = "2018"
use_small_heuristics = "Max"
1 change: 0 additions & 1 deletion avm-transpiler/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion avm-transpiler/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ noirc_errors = { path = "../noir/noir-repo/compiler/noirc_errors" }

# external
base64 = "0.21"
regex = "1.10"
env_logger = "0.11"
log = "0.4"
serde_json = "1.0"
Expand Down
7 changes: 6 additions & 1 deletion avm-transpiler/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,19 @@ source:
# work in avm-transpiler
WORKDIR /usr/src/avm-transpiler

COPY --dir scripts src Cargo.lock Cargo.toml rust-toolchain.toml .
COPY --dir scripts src Cargo.lock Cargo.toml rust-toolchain.toml .rustfmt.toml .

build:
FROM +source
# build avm transpiler, and make sure the big build and deps folders don't hit cache
RUN ./scripts/bootstrap_native.sh && rm -rf target/release/{build,deps}
SAVE ARTIFACT target/release/avm-transpiler avm-transpiler

format:
FROM +source
RUN cargo fmt --check
RUN cargo clippy

run:
#TODO needed?
FROM ubuntu:focal
Expand Down
3 changes: 3 additions & 0 deletions avm-transpiler/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#![warn(clippy::semicolon_if_nothing_returned)]
#![cfg_attr(not(test), warn(unused_crate_dependencies, unused_extern_crates))]

use log::warn;
use std::env;
use std::fs;
Expand Down
Loading

0 comments on commit 6807a54

Please sign in to comment.