feat(ci): cancel old CI jobs on PR updates #113
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: Blockifier-Compiled-Cairo | |
on: | |
push: | |
branches: | |
- main | |
- main-v[0-9].** | |
tags: | |
- v[0-9].** | |
paths: | |
- '.github/workflows/blockifier_compiled_cairo.yml' | |
- 'crates/blockifier/feature_contracts/cairo0/**' | |
- 'crates/blockifier/tests/requirements.txt' | |
pull_request: | |
types: | |
- opened | |
- reopened | |
- synchronize | |
paths: | |
- '.github/workflows/blockifier_compiled_cairo.yml' | |
- 'crates/blockifier/feature_contracts/cairo0/**' | |
- 'crates/blockifier/tests/requirements.txt' | |
# On PR events, cancel existing CI runs on this same PR for this workflow. | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: ${{ github.event.name == 'pull_request' }} | |
jobs: | |
verify_cairo_file_dependencies: | |
runs-on: starkware-ubuntu-20-04-medium | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/install_rust | |
- 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 | |
- run: | |
pip install -r crates/blockifier/tests/requirements.txt; | |
cargo test -p blockifier --test feature_contracts_compatibility_test --features testing -- --include-ignored |