Skip to content

chore: handle last block message in process_full_blocks #136

chore: handle last block message in process_full_blocks

chore: handle last block message in process_full_blocks #136

Workflow file for this run

name: Noir tests
on:
push:
branches:
- main
pull_request:
env:
CARGO_TERM_COLOR: always
MINIMUM_NOIR_VERSION: nightly-2025-08-15
jobs:
noir-version-list:
name: Query supported Noir versions
runs-on: ubuntu-latest
outputs:
noir_versions: ${{ steps.get_versions.outputs.versions }}
steps:
- name: Checkout sources
id: get_versions
run: |
# gh returns the Noir releases in reverse chronological order so we keep all releases published after the minimum supported version.
VERSIONS=$(gh release list -R noir-lang/noir --exclude-pre-releases --json tagName -q 'map(.tagName) | index(env.MINIMUM_NOIR_VERSION) as $index | if $index then .[0:$index+1] else [env.MINIMUM_NOIR_VERSION] end')
echo "versions=$VERSIONS"
echo "versions=$VERSIONS" >> $GITHUB_OUTPUT
env:
GH_TOKEN: ${{ github.token }}
test:
needs: [noir-version-list]
name: Test on Nargo ${{matrix.toolchain}}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
toolchain: ${{ fromJson( needs.noir-version-list.outputs.noir_versions )}}
include:
- toolchain: nightly
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install Nargo
uses: noir-lang/[email protected]
with:
toolchain: ${{ matrix.toolchain }}
- name: Run Noir tests
run: nargo test
- name: Run tests unconstrained
run: nargo test --force-brillig
# rust-equivalence-tests:
# name: Test for equivalence against Rust impl
# runs-on: ubuntu-latest
# steps:
# - name: Checkout sources
# uses: actions/checkout@v4
# - name: Install Nargo
# uses: noir-lang/[email protected]
# with:
# toolchain: ${{ env.MINIMUM_NOIR_VERSION }}
# - name: Install Cargo
# uses: dtolnay/[email protected]
# with:
# targets: x86_64-unknown-linux-gnu
# - name: Cache Cargo dependencies
# uses: Swatinem/rust-cache@v2
# with:
# key: x86_64-unknown-linux-gnu
# cache-on-failure: true
# - name: Export and Test Noir Functions
# run: ./scripts/fuzz-test.sh
format:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install Nargo
uses: noir-lang/[email protected]
with:
toolchain: ${{ env.MINIMUM_NOIR_VERSION }}
- name: Run formatter
run: nargo fmt --check
# This is a job which depends on all test jobs and reports the overall status.
# This allows us to add/remove test jobs without having to update the required workflows.
tests-end:
name: Noir End
runs-on: ubuntu-latest
# We want this job to always run (even if the dependant jobs fail) as we want this job to fail rather than skipping.
if: ${{ always() }}
needs:
- test
# - rust-equivalence-tests
- format
steps:
- name: Report overall success
run: |
if [[ $FAIL == true ]]; then
exit 1
else
exit 0
fi
env:
# We treat any cancelled, skipped or failing jobs as a failure for the workflow as a whole.
FAIL: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') || contains(needs.*.result, 'skipped') }}