Use workspace dependencies #8091
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# We use --offline to be sure that we do not access the network | |
name: CI | |
on: | |
push: | |
pull_request: | |
env: | |
# https://doc.rust-lang.org/cargo/reference/profiles.html#release | |
RUSTFLAGS: -Coverflow-checks=y -Cdebug-assertions=y | |
# https://doc.rust-lang.org/cargo/reference/profiles.html#incremental | |
CARGO_INCREMENTAL: 1 | |
# https://nexte.st/book/pre-built-binaries.html#using-nextest-in-github-actions | |
CARGO_TERM_COLOR: always | |
jobs: | |
run_checks: | |
strategy: | |
matrix: | |
# FIXME: use the latest version of cargo nextest when we get rid of 1.71 | |
# and 1.72 | |
rust_toolchain_version: ["1.71", "1.72"] | |
# FIXME: currently not available for 5.0.0. | |
# It might be related to boxroot dependency, and we would need to bump | |
# up the ocaml-rs dependency | |
ocaml_version: ["4.14"] | |
runs-on: ubuntu-latest | |
name: Run some basic checks and tests | |
steps: | |
- name: Checkout PR | |
uses: actions/[email protected] | |
with: | |
submodules: recursive | |
- name: Check submodules don't fail | |
run: | | |
cd /home/runner/work/proof-systems/proof-systems/proof-systems-vendors/csv/ | |
git status | |
ls . | |
# as action-rs does not seem to be maintained anymore, building from | |
# scratch the environment using rustup | |
- name: Setup Rust toolchain ${{ matrix.rust_toolchain_version }} | |
run: | |
| | |
curl --proto '=https' --tlsv1.2 -sSf -o rustup-init \ | |
https://static.rust-lang.org/rustup/dist/x86_64-unknown-linux-gnu/rustup-init | |
chmod +x ./rustup-init | |
./rustup-init -y --default-toolchain "${{ matrix.rust_toolchain_version }}" --profile default | |
rm ./rustup-init | |
echo "$HOME/.cargo/bin" >> $GITHUB_PATH | |
# overwriting default rust-toolchain | |
echo ${{ matrix.rust_toolchain_version }} > rust-toolchain | |
- name: Setup OCaml (because of ocaml-gen) | |
run: | | |
sudo apt update | |
sudo apt install -y ocaml | |
- name: Install markdownlint | |
run: | | |
npm install -g markdownlint-cli | |
# | |
# Doc & Spec | |
# | |
- name: Install cargo-spec for specifications | |
run: | | |
cargo install --locked cargo-spec | |
- name: Build the kimchi specification | |
run: | | |
cd book/specifications | |
cd kimchi && make build | |
- name: Build the polynomial commitment specification | |
run: | | |
cd book/specifications | |
cd poly-commitment && make build | |
- name: Check that up-to-date specification is checked in | |
run: | | |
git diff --exit-code ":(exclude)rust-toolchain" | |
# | |
# Coding guidelines | |
# | |
- name: Enforce formating | |
run: | | |
cargo fmt -- --check | |
#- name: Lint (clippy) | |
# uses: actions-rs/cargo@v1 | |
# run: | | |
# clippy --all-features --tests --all-targets --offline -- -D warnings | |
- name: Run Clippy (beta) | |
uses: actions-rs/clippy-check@v1 | |
continue-on-error: true | |
with: | |
name: Clippy (beta) | |
token: ${{ secrets.GITHUB_TOKEN }} | |
args: --all-features --all-targets --offline -- -W clippy::all | |
# | |
# Build | |
# | |
- name: Ensure that everything builds (DEBUG) | |
run: | | |
cargo build --all-targets --all-features | |
- name: Ensure that everything builds | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: --all-targets --all-features --offline | |
# | |
# Tests | |
# | |
# https://nexte.st/book/pre-built-binaries.html#using-nextest-in-github-actions | |
- name: Install latest nextest release | |
uses: taiki-e/install-action@nextest | |
- name: Test with latest nextest release (faster than cargo test) | |
uses: actions-rs/cargo@v1 | |
with: | |
command: nextest | |
args: run --all-features --release --offline | |
- name: Doc tests | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
args: --all-features --release --doc --offline |