-
Notifications
You must be signed in to change notification settings - Fork 25
73 lines (66 loc) · 2.43 KB
/
blockifier_compiled_cairo.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Blockifier-Compiled-Cairo
on:
push:
branches:
- main
tags:
- v[0-9].**
paths:
- '.github/workflows/blockifier_compiled_cairo.yml'
- 'crates/blockifier/feature_contracts/**'
- 'crates/blockifier/tests/**'
pull_request:
types:
- opened
- reopened
- synchronize
paths:
- '.github/workflows/blockifier_compiled_cairo.yml'
- 'crates/blockifier/feature_contracts/**'
- 'crates/blockifier/tests/**'
jobs:
verify_cairo_file_dependencies:
runs-on: starkware-ubuntu-20-04-medium
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Noelware/[email protected]
- 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
# 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: Verify cairo contract recompilation (non-legacy, both cairo versions).
- run:
cd sequencer &&
pip install -r crates/blockifier/tests/requirements.txt &&
cargo test -p blockifier --test feature_contracts_compatibility_test --features testing -- --include-ignored
# Legacy contract verification.
- name: Verify the legacy contract.
uses: actions-rs/toolchain@master
with:
toolchain: nightly-2023-07-05
- uses: Swatinem/rust-cache@v2
- run:
cd sequencer &&
LEGACY=1 cargo test -p blockifier --test feature_contracts_compatibility_test --features testing -- --include-ignored