feat: CI refactor and speed up #950
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
# Rust template: https://github.com/actions/starter-workflows/blob/main/ci/rust.yml | |
# Resources: https://docs.github.com/en/actions | |
# Examples: https://github.com/actions/starter-workflows | |
# Process: make small changes, push them, check the Actions tab on github | |
# also see templates https://github.com/rust-github/template/tree/main/.github/workflows | |
name: Lint | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
setup: | |
uses: ./.github/workflows/web-prover-circuits.yaml | |
clippy: | |
needs: setup | |
name: clippy | |
runs-on: macos-latest | |
strategy: | |
matrix: | |
crate: | |
- notary | |
- proofs | |
- client | |
- client_ios | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
profile: minimal | |
components: clippy | |
override: true | |
- name: Install LLVM and Clang to support 'ring' crate and protobuf | |
run: | | |
brew install llvm@18 # https://formulae.brew.sh/formula/llvm#default | |
echo /opt/homebrew/opt/llvm@18/bin >> $GITHUB_PATH | |
brew install protobuf | |
- name: cargo clippy for ${{ matrix.crate }} | |
run: cargo clippy -p ${{ matrix.crate }} | |
fmt: | |
name: fmt project | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
toolchain: | |
- nightly | |
steps: | |
- name: checkout repo | |
uses: actions/checkout@v4 | |
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }} | |
- run: rustup component add rustfmt | |
- run: cargo fmt --all -- --check | |