Skip to content

Commit

Permalink
Check fib and calculator generated files in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
shkoo committed Dec 19, 2024
1 parent bbc8543 commit 508f4c1
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 15 deletions.
15 changes: 15 additions & 0 deletions .github/actions/bazelisk/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,21 @@ description: Install bazelisk
runs:
using: composite
steps:
# Cache bazel build on linux. (MacOS uses the local cache on the runner.)
- name: Get Date
id: get-date
run: |
echo "date=$(/bin/date -u "+%Y-%m-%d")" >> $GITHUB_OUTPUT
shell: bash
- if: matrix.os == 'Linux'
uses: actions/cache@v4
env:
cache-name: bazel-build
with:
path: "~/.cache/bazel"
# Generate a new build cache once a day, reusing the previous day's if available
key: "bazel-${{ matrix.os }}-${{ steps.get-date.outputs.date }}"
restore-keys: "bazel-${{ matrix.os }}-"
- if: runner.os == 'Linux'
run: |
echo "BAZELISK_OS=linux" >> $GITHUB_ENV
Expand Down
28 changes: 13 additions & 15 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,18 @@ jobs:
python-version: "3.10"
- run: python license-check.py

check-generated-zirgen:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
circuit: [fib, calculator]
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/bazelisk
- name: ${{ matrix.circuit }} generated files up to date
run: cargo bootstrap -- --check ${{ matrix.circuit }}

bazel:
runs-on: [self-hosted, prod, cpu, "${{ matrix.os }}"]
strategy:
Expand All @@ -52,22 +64,7 @@ jobs:
- os: Linux
config: --config=ci
steps:
- name: Get Date
id: get-date
run: |
echo "date=$(/bin/date -u "+%Y-%m-%d")" >> $GITHUB_OUTPUT
shell: bash
- uses: actions/checkout@v3
# Cache bazel build on linux. (MacOS uses the local cache on the runner.)
- if: matrix.os == 'Linux'
uses: actions/cache@v4
env:
cache-name: bazel-build
with:
path: "~/.cache/bazel"
# Generate a new build cache once a day, reusing the previous day's if available
key: "bazel-${{ matrix.os }}-${{ steps.get-date.outputs.date }}"
restore-keys: "bazel-${{ matrix.os }}-"
- uses: ./.github/actions/bazelisk
- name: Build & test
env:
Expand Down Expand Up @@ -139,6 +136,7 @@ jobs:
- bazel
- test
- doc
- check-generated-zirgen
runs-on: ubuntu-latest
steps:
- name: Check all job status
Expand Down

0 comments on commit 508f4c1

Please sign in to comment.