Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): Add Noir CI that runs with a github label #430

Merged
merged 1 commit into from
May 9, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/workflows/noir.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Noir CI

on:
pull_request:
types: ["labeled", "opened", "synchronize", "reopened"]

# 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:
noir-ci:
if: ${{ contains(github.event.pull_request.labels.*.name, 'noir-ci') }}
name: Test Noir against PR
runs-on: ubuntu-latest

steps:
- name: Checkout Noir
uses: actions/checkout@v3
with:
repository: noir-lang/noir

- uses: cachix/install-nix-action@v20
with:
nix_path: nixpkgs=channel:nixos-22.11
github_access_token: ${{ secrets.GITHUB_TOKEN }}

# The GITHUB_SHA doesn't match the last commit on the PR but is instead a merge commit of the PR into master.
# As per GitHub docs:
# Note that GITHUB_SHA for this event is the last merge commit of the pull request merge branch.
- name: Update barretenberg commit in flake.lock
run: |
nix flake lock --override-input barretenberg github:AztecProtocol/barretenberg/${{ env.GITHUB_SHA }}

- name: Build and test Noir
run: |
nix flake check -L