This repository has been archived by the owner on Aug 21, 2024. It is now read-only.
pwhite/sha256 block #12344
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 | |
- main-v[0-9].** | |
tags: | |
- v[0-9].** | |
pull_request: | |
types: | |
- opened | |
- reopened | |
- synchronize | |
- auto_merge_enabled | |
- edited | |
jobs: | |
commitlint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install commitlint | |
run: npm install --global @commitlint/cli @commitlint/config-conventional | |
- name: Validate PR commits with commitlint | |
if: github.event_name == 'pull_request' && !(contains(github.event.pull_request.title, '/merge-main') || contains(github.event.pull_request.title, '/merge main')) | |
env: | |
BASE_SHA: ${{ github.event.pull_request.base.sha }} | |
HEAD_SHA: ${{ github.event.pull_request.head.sha }} | |
run: commitlint --from "$BASE_SHA" --to "$HEAD_SHA" --verbose | |
- name: Validate PR title with commitlint | |
if: github.event_name != 'merge_group' && github.event_name != 'push' && !(contains(github.event.pull_request.title, '/merge-main') || contains(github.event.pull_request.title, '/merge main')) | |
env: | |
TITLE: ${{ github.event.pull_request.title }} | |
run: echo "$TITLE" | commitlint --verbose | |
format: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
components: rustfmt | |
toolchain: nightly-2024-04-29 | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
prefix-key: "v0-rust-ubuntu-20.04" | |
- run: scripts/rust_fmt.sh --check | |
clippy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: clippy | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
prefix-key: "v0-rust-ubuntu-20.04" | |
# Setup pypy and link to the location expected by .cargo/config.toml. | |
- uses: actions/setup-python@v5 | |
id: setup-pypy | |
with: | |
python-version: 'pypy3.9' | |
- run: ln -s '${{ steps.setup-pypy.outputs.python-path }}' /usr/local/bin/pypy3.9 | |
- env: | |
LD_LIBRARY_PATH: ${{ steps.setup-pypy.outputs.pythonLocation }}/bin | |
run: echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}" >> $GITHUB_ENV | |
- name: Set up Native Dependencies | |
uses: ./.github/actions/setup-native-dep | |
id: native-deps | |
- run: scripts/clippy.sh | |
env: | |
CAIRO_NATIVE_RUNTIME_LIBRARY: ${{ steps.native-deps.outputs.cairo-native-runtime-library }} | |
MLIR_SYS_180_PREFIX: /usr/lib/llvm-18/ | |
LLVM_SYS_180_PREFIX: /usr/lib/llvm-18/ | |
TABLEGEN_180_PREFIX: /usr/lib/llvm-18/ | |
featureless-build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
prefix-key: "v0-rust-ubuntu-20.04" | |
- name: Set up Native Dependencies | |
uses: ./.github/actions/setup-native-dep | |
id: native-deps | |
- run: cargo build -p blockifier | |
env: | |
CAIRO_NATIVE_RUNTIME_LIBRARY: ${{ steps.native-deps.outputs.cairo-native-runtime-library }} | |
MLIR_SYS_180_PREFIX: /usr/lib/llvm-18/ | |
LLVM_SYS_180_PREFIX: /usr/lib/llvm-18/ | |
TABLEGEN_180_PREFIX: /usr/lib/llvm-18/ | |
- run: cargo test -p blockifier | |
env: | |
CAIRO_NATIVE_RUNTIME_LIBRARY: ${{ steps.native-deps.outputs.cairo-native-runtime-library }} | |
MLIR_SYS_180_PREFIX: /usr/lib/llvm-18/ | |
LLVM_SYS_180_PREFIX: /usr/lib/llvm-18/ | |
TABLEGEN_180_PREFIX: /usr/lib/llvm-18/ | |
run-python-tests: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.9" | |
- run: | | |
python -m pip install --upgrade pip | |
pip install pytest | |
- run: pytest scripts/merge_paths_test.py | |
run-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
prefix-key: "v0-rust-ubuntu-20.04" | |
# Setup pypy and link to the location expected by .cargo/config.toml. | |
- uses: actions/setup-python@v5 | |
id: setup-pypy | |
with: | |
python-version: 'pypy3.9' | |
- run: ln -s '${{ steps.setup-pypy.outputs.python-path }}' /usr/local/bin/pypy3.9 | |
- env: | |
LD_LIBRARY_PATH: ${{ env.Python3_ROOT_DIR }}/bin | |
run: echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}" >> $GITHUB_ENV | |
- name: Set up Native Dependencies | |
uses: ./.github/actions/setup-native-dep | |
id: native-deps | |
- run: cargo test --features testing | |
env: | |
CAIRO_NATIVE_RUNTIME_LIBRARY: ${{ steps.native-deps.outputs.cairo-native-runtime-library }} | |
MLIR_SYS_180_PREFIX: /usr/lib/llvm-18/ | |
LLVM_SYS_180_PREFIX: /usr/lib/llvm-18/ | |
TABLEGEN_180_PREFIX: /usr/lib/llvm-18/ | |
- run: cargo test --features concurrency | |
env: | |
CAIRO_NATIVE_RUNTIME_LIBRARY: ${{ steps.native-deps.outputs.cairo-native-runtime-library }} | |
MLIR_SYS_180_PREFIX: /usr/lib/llvm-18/ | |
LLVM_SYS_180_PREFIX: /usr/lib/llvm-18/ | |
TABLEGEN_180_PREFIX: /usr/lib/llvm-18/ | |
# Keep the name 'udeps' to match original action name, so we don't need to define specific branch | |
# rules on Github for specific version branches. | |
udeps: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Native Dependencies | |
uses: ./.github/actions/setup-native-dep | |
- name: Run Machete (detect unused dependencies) | |
uses: bnjbvr/cargo-machete@main | |
env: | |
RUSTUP_TOOLCHAIN: nightly-2023-12-21 | |
MLIR_SYS_180_PREFIX: /usr/lib/llvm-18/ | |
LLVM_SYS_180_PREFIX: /usr/lib/llvm-18/ | |
TABLEGEN_180_PREFIX: /usr/lib/llvm-18/ |