Skip to content

Commit

Permalink
Github actions (CI) (#4)
Browse files Browse the repository at this point in the history
A new github workflow added at `.github/workflows/ci.yaml` with three jobs:
- `build-cargo`: Sets up Rust toolchain (stable), checks out the current repository, places `reilabs/noir` at the appropriate folder, and finally runs `cargo build --release`.
- `test-cargo`: Depends on `build-cargo`. Runs the same steps, except the final step is replaced by a `cargo test` run.
- `build-lake`: Sets up Lean4 toolchain, checks out the current repository sparsely (i.e., only the `Lake` folder is fetched) and runs `lake build`.

The workflow runs on `push` and `pull-request` events.
  • Loading branch information
utkn committed Nov 15, 2024
1 parent ea9bcf9 commit 8c41506
Showing 1 changed file with 65 additions and 0 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: CI
on: [push, pull_request]
jobs:
build-lake:
runs-on: ubuntu-latest
steps:
- name: Checkout current branch (sparse)
uses: actions/checkout@v4
with:
sparse-checkout: |
Lampe
- name: Set up Lean 4
uses: leanprover/lean-action@v1
with:
auto-config: false
build: false
test: false
lint: false
use-mathlib-cache: true
lake-package-directory: Lampe
- name: Build (lake)
working-directory: Lampe
run: lake build
build-cargo:
runs-on: ubuntu-latest
steps:
- name: Checkout current branch
uses: actions/checkout@v4
with:
path: lampe
- name: "Checkout reilabs/noir (branch: lampe)"
uses: actions/checkout@v4
with:
path: noir
ref: lampe
repository: reilabs/noir
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Build (cargo)
working-directory: lampe
run: cargo build --release
test-cargo:
needs: build-cargo
runs-on: ubuntu-latest
steps:
- name: Checkout current branch
uses: actions/checkout@v4
with:
path: lampe
- name: "Checkout reilabs/noir (branch: lampe)"
uses: actions/checkout@v4
with:
path: noir
ref: lampe
repository: reilabs/noir
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Test (cargo)
working-directory: lampe
run: cargo test

0 comments on commit 8c41506

Please sign in to comment.