Merge remote-tracking branch 'origin' into idan/main/test-ci-custom-r… #1240
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: | |
workflow_dispatch: | |
push: | |
branches: | |
- idan/main/test-ci-custom-runners-k8s | |
env: | |
RUSTFLAGS: "-D warnings -C link-arg=-fuse-ld=lld" | |
# On PR events, cancel existing CI runs on this same PR for this workflow..# | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.job }} | |
cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
jobs: | |
verify_cairo_file_dependencies: | |
runs-on: starkware-ubuntu-20-04-medium | |
container: | |
image: us-central1-docker.pkg.dev/starkware-thirdparties/sequencer/ci-image:ubuntu-22-04-toolchain-1-83 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Git config | |
run: git config --global --add safe.directory "*" | |
- name: Submodules update. | |
run: git submodule update --init --recursive | |
- env: | |
LD_LIBRARY_PATH: ${{ env.Python3_ROOT_DIR }}/bin | |
run: echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}" >> $GITHUB_ENV | |
# Checkout sequencer into a dedicated directory - technical requirement in order to be able to checkout `cairo` in a sibling directory. | |
- name: checkout sequencer into `sequencer` directory. | |
uses: actions/checkout@v4 | |
with: | |
repository: 'starkware-libs/sequencer' | |
path: 'sequencer' | |
- name: checkout cairo1 repo in order to compile cairo1 contracts. | |
uses: actions/checkout@v4 | |
with: | |
repository: 'starkware-libs/cairo' | |
fetch-depth: 0 | |
fetch-tags: true | |
path: 'cairo' | |
- name: Cache venv | |
id: cache-venv | |
uses: actions/cache@v4 | |
with: | |
path: sequencer/.venv | |
key: venv-${{ hashFiles('sequencer/crates/blockifier/tests/requirements.txt') }} | |
restore-keys: | | |
venv- | |
- name: Cache cargo | |
uses: actions/cache@v4 | |
with: | |
path: | | |
sequencer/.cargo/registry | |
sequencer/.cargo/git | |
sequencer/target | |
key: cargo-${{ hashFiles('sequencer/Cargo.lock') }} | |
restore-keys: | | |
cargo- | |
- name: Install Python requirements | |
working-directory: sequencer | |
if: steps.cache-venv.outputs.cache-hit != 'true' | |
run: | | |
pypy3.9 -m venv .venv | |
. .venv/bin/activate | |
pip install -r crates/blockifier/tests/requirements.txt | |
- name: Verify cairo contract recompilation (both cairo versions). | |
working-directory: sequencer | |
run: | | |
. .venv/bin/activate | |
cargo test -p blockifier --test feature_contracts_compatibility_test --features testing -- --include-ignored |