feat: add ConstrainNotEqual
instruction (#7032)
#22806
This file contains 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: Formatting | |
on: | |
pull_request: | |
merge_group: | |
push: | |
branches: | |
- master | |
# This will cancel previous runs when a branch or PR is updated | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
clippy: | |
name: cargo clippy | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 30 | |
env: | |
RUSTFLAGS: -Dwarnings | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup toolchain | |
uses: dtolnay/[email protected] | |
with: | |
targets: x86_64-unknown-linux-gnu | |
components: clippy, rustfmt | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
key: x86_64-unknown-linux-gnu | |
cache-on-failure: true | |
save-if: ${{ github.event_name != 'merge_group' }} | |
- name: Run `cargo clippy` | |
run: cargo clippy --all-targets --workspace --locked --release | |
rustfmt: | |
name: cargo fmt | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 30 | |
env: | |
RUSTFLAGS: -Dwarnings | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup toolchain | |
uses: dtolnay/[email protected] | |
with: | |
targets: x86_64-unknown-linux-gnu | |
components: clippy, rustfmt | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
key: x86_64-unknown-linux-gnu | |
cache-on-failure: true | |
save-if: ${{ github.event_name != 'merge_group' }} | |
- name: Run `cargo fmt` | |
run: cargo fmt --all --check | |
eslint: | |
name: eslint | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 30 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Yarn dependencies | |
uses: ./.github/actions/setup | |
- name: Run `yarn lint` | |
run: yarn lint | |
build-nargo: | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 30 | |
steps: | |
- name: Checkout Noir repo | |
uses: actions/checkout@v4 | |
- name: Setup toolchain | |
uses: dtolnay/[email protected] | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
key: x86_64-unknown-linux-gnu | |
cache-on-failure: true | |
save-if: ${{ github.event_name != 'merge_group' }} | |
- name: Build Nargo | |
run: cargo build --package nargo_cli --release | |
- name: Package artifacts | |
run: | | |
mkdir dist | |
cp ./target/release/nargo ./dist/nargo | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: nargo | |
path: ./dist/* | |
retention-days: 3 | |
nargo_fmt: | |
needs: [build-nargo] | |
name: Nargo fmt | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 30 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Download nargo binary | |
uses: actions/download-artifact@v4 | |
with: | |
name: nargo | |
path: ./nargo | |
- name: Set nargo on PATH | |
run: | | |
nargo_binary="${{ github.workspace }}/nargo/nargo" | |
chmod +x $nargo_binary | |
echo "$(dirname $nargo_binary)" >> $GITHUB_PATH | |
export PATH="$PATH:$(dirname $nargo_binary)" | |
nargo -V | |
- name: Format stdlib | |
working-directory: ./noir_stdlib | |
run: nargo fmt --check | |
- name: Format test suite | |
working-directory: ./test_programs | |
run: ./format.sh 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. | |
formatting-end: | |
name: Formatting End | |
runs-on: ubuntu-22.04 | |
# 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: | |
- clippy | |
- rustfmt | |
- eslint | |
- nargo_fmt | |
steps: | |
- name: Report overall success | |
run: | | |
if [[ $FAIL == true ]]; then | |
exit 1 | |
else | |
exit 0 | |
fi | |
env: | |
# We treat any 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') }} | |