fix: remove enforce selector constraint #939
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
name: CI | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: ["*"] | |
concurrency: | |
group: ${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
compile: | |
name: Compile | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
- name: Rustup toolchain stable install | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: stable | |
targets: wasm32-unknown-unknown | |
- name: Set up cargo cache | |
uses: Swatinem/rust-cache@v2 | |
- name: Run cargo check | |
run: cargo check | |
- name: Run cargo check stark prover | |
run: cargo check --package stark-platinum-prover | |
- name: Run cargo check cairo prover | |
run: cargo check --package cairo-platinum-prover | |
- name: Run cargo check wasm | |
run: cargo check --features wasm --target wasm32-unknown-unknown | |
# For giza benchmarks | |
- name: Rustup toolchain nightly install | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: nightly | |
- name: Check benchmarks | |
run: cargo +nightly bench --no-run -F giza | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
- name: Install stable toolchain | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: stable | |
components: rustfmt, clippy | |
- name: Run cargo fmt | |
run: cargo fmt --all -- --check | |
- name: Run clippy | |
run: make clippy | |
test_sequential: | |
name: Test (Ubuntu, Sequential) | |
runs-on: ubuntu-latest | |
env: | |
CARGO_TERM_COLOR: always | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: stable | |
components: clippy | |
- name: Set up cargo cache | |
uses: Swatinem/rust-cache@v2 | |
- name: Install testing tools | |
uses: taiki-e/install-action@v2 | |
with: | |
tool: cargo-nextest,cargo-llvm-cov | |
- name: Python3 build | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.9" | |
cache: "pip" | |
- name: Install cairo-lang toolchain and dependencies | |
run: pip install -r requirements.txt | |
- name: Run tests and generate code coverage | |
run: make coverage | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: lcov.info | |
fail_ci_if_error: true | |
test_parallel: | |
name: Test (Ubuntu, Parallel) | |
runs-on: ubuntu-latest | |
env: | |
CARGO_TERM_COLOR: always | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: stable | |
components: clippy | |
- name: Set up cargo cache | |
uses: Swatinem/rust-cache@v2 | |
- name: Install testing tools | |
uses: taiki-e/install-action@v2 | |
with: | |
tool: cargo-nextest,cargo-llvm-cov | |
- name: Python3 build | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.9" | |
cache: "pip" | |
- name: Install cairo-lang toolchain and dependencies | |
run: pip install -r requirements.txt | |
- name: Run tests and generate code coverage | |
run: make coverage_parallel | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: lcov.info | |
fail_ci_if_error: true | |
test_macos: | |
name: Test (macOS, Apple sillicon) | |
runs-on: [self-hosted, macOS] | |
env: | |
CARGO_TERM_COLOR: always | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Rustup toolchain install | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: stable | |
components: clippy | |
- name: Install gmp | |
run: brew install gmp | |
- name: Install cairo-lang toolchain and dependencies | |
run: | | |
python3 -m venv cairo0-venv | |
. cairo0-venv/bin/activate | |
CFLAGS=-I/opt/homebrew/opt/gmp/include LDFLAGS=-L/opt/homebrew/opt/gmp/lib pip install -r requirements.txt ; | |
- name: Run tests | |
run: | | |
. cairo0-venv/bin/activate | |
make test_metal | |
- name: Clean compiled programs | |
run: make clean |