Skip to content

Commit

Permalink
chore(ci): Add Noir CI that runs with a github label
Browse files Browse the repository at this point in the history
  • Loading branch information
phated committed May 8, 2023
1 parent ad615ee commit 99ee5db
Showing 1 changed file with 38 additions and 0 deletions.
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

0 comments on commit 99ee5db

Please sign in to comment.