Skip to content

feat(ci): make rust version in ci configurable #43

feat(ci): make rust version in ci configurable

feat(ci): make rust version in ci configurable #43

name: Blockifier-Compiled-Cairo
on:
push:
branches:
- main
tags:
- v[0-9].**
paths:
- 'crates/blockifier/feature_contracts/cairo0/**'
- '.github/workflows/blockifier_compiled_cairo.yml'
pull_request:
types:
- opened
- reopened
- synchronize
paths:
- '.github/workflows/blockifier_compiled_cairo.yml'
- 'crates/blockifier/feature_contracts/cairo0/**'
jobs:
set_rust_version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- id: version
run: echo "RUST_VERSION=$(cat .github/workflows/rust_version.txt)" >> $GITHUB_OUTPUT
outputs:
rust_version: ${{ steps.version.outputs.RUST_VERSION }}
verify_cairo_file_dependencies:
needs: set_rust_version
runs-on: starkware-ubuntu-20-04-medium
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ needs.set_rust_version.outputs.rust_version }}
- 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 verify_feature_contracts -- --include-ignored