Skip to content

chore: Release Noir(1.0.0-rc.0) #52388

chore: Release Noir(1.0.0-rc.0)

chore: Release Noir(1.0.0-rc.0) #52388

Workflow file for this run

name: Formatting
on:
pull_request:
merge_group:
push:
branches:
- master
permissions: {}
# 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
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.89.0
with:
targets: x86_64-unknown-linux-gnu
components: clippy, rustfmt
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2
with:
key: x86_64-unknown-linux-gnu
cache-on-failure: true
save-if: ${{ github.event_name != 'merge_group' }}
- uses: taiki-e/install-action@just
- name: Run `cargo clippy`
run: just clippy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
rustfmt:
name: cargo fmt
runs-on: ubuntu-22.04
timeout-minutes: 30
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.89.0
with:
targets: x86_64-unknown-linux-gnu
components: clippy, rustfmt
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2
with:
key: x86_64-unknown-linux-gnu
cache-on-failure: true
save-if: ${{ github.event_name != 'merge_group' }}
- uses: taiki-e/install-action@just
- name: Check formatting
run: just format-check
rustdoc:
name: cargo doc
runs-on: ubuntu-22.04
timeout-minutes: 30
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.89.0
with:
targets: x86_64-unknown-linux-gnu
components: clippy, rustfmt
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2
with:
key: x86_64-unknown-linux-gnu
cache-on-failure: true
save-if: ${{ github.event_name != 'merge_group' }}
- uses: taiki-e/install-action@just
- name: Run `cargo doc`
run: just doc
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
eslint:
name: eslint
runs-on: ubuntu-22.04
timeout-minutes: 30
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: taiki-e/install-action@just
- name: Install Yarn dependencies
uses: ./.github/actions/setup
- name: Run eslint
run: just lint
build-nargo:
runs-on: ubuntu-22.04
timeout-minutes: 30
permissions:
contents: read
steps:
- name: Checkout Noir repo
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.89.0
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # 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
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Package artifacts
run: |
mkdir dist
cp ./target/release/nargo ./dist/nargo
- name: Upload artifact
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: nargo
path: ./dist/*
retention-days: 3
nargo_fmt:
needs: [build-nargo]
name: Nargo fmt
runs-on: ubuntu-22.04
timeout-minutes: 30
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Download nargo binary
uses: ./.github/actions/download-binary
with:
name: nargo
- name: Format stdlib
working-directory: ./noir_stdlib
run: nargo fmt --check
- name: Format test suite
working-directory: ./test_programs
run: ./format.sh check
design-links:
name: design doc links
runs-on: ubuntu-22.04
timeout-minutes: 10
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: taiki-e/install-action@just
- name: Check design doc links
run: just check-design-links
# 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
- rustdoc
- eslint
- nargo_fmt
- design-links
permissions:
contents: read
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') }}