This repository has been archived by the owner on Aug 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 108
80 lines (70 loc) · 2.65 KB
/
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
74
75
76
77
78
79
80
name: CI
on:
push:
branches:
- main
tags:
- v[0-9].**
pull_request:
types:
- opened
- reopened
- synchronize
paths:
- 'crates/blockifier/feature_contracts/cairo0/**'
- 'crates/blockifier/feature_contracts/cairo1/**'
- 'crates/blockifier/tests/feature_contracts_compatibility_test.rs'
jobs:
verify_cairo_file_dependencies:
runs-on: ubuntu-latest
steps:
# Checkout blockifier into a dedicated directory - technical requirement in order to be able to checkout `cairo` in a sibling directory.
- name: checkout blockifier into `blockifier` directory.
uses: actions/checkout@v4
with:
repository: 'starkware-libs/blockifier'
path: 'blockifier'
- name: Read Cairo1 Tag to compile contracts with from Blockifier.
id: read-tag
# GITHUB_ENV is a variable github allocates for dynamic stuff inside workflow like our usage, name not customizable.
run: echo "TAG=$(cat blockifier/crates/blockifier/tests/cairo1_compiler_tag.txt)" >> $GITHUB_ENV
- name: Read legacy Cairo1 Tag to compile the legacy contract with.
id: read-tag
# GITHUB_ENV is a variable github allocates for dynamic stuff inside workflow like our usage, name not customizable.
run: echo "LEGACY_TAG=$(cat blockifier/crates/blockifier/tests/legacy_cairo1_compiler_tag.txt)" >> $GITHUB_ENV
- name: checkout cairo1 repo in order to compile cairo1 contracts.
uses: actions/checkout@v4
with:
repository: 'starkware-libs/cairo'
fetch-tags: tags
ref: ${{ env.TAG }}
path: 'cairo'
- uses: actions-rs/toolchain@master
with:
components: rustfmt
toolchain: nightly-2023-07-05
- uses: Swatinem/rust-cache@v2
- uses: actions/setup-python@v4
with:
python-version: '3.9'
cache: 'pip'
- run:
cd blockifier &&
pip install -r crates/blockifier/tests/requirements.txt &&
cargo test verify_feature_contracts -- --include-ignored
- name: checkout legacy tag of cairo1 repo in order to compile the legacy contract.
uses: actions/checkout@v4
with:
repository: 'starkware-libs/cairo'
fetch-tags: tags
ref: ${{ env.LEGACY_TAG }}
path: 'cairo'
- name: Verify the legacy contract.
uses: actions-rs/toolchain@master
with:
components: rustfmt
toolchain: nightly-2023-07-05
- uses: Swatinem/rust-cache@v2
- run:
cd blockifier &&
LEGACY=1 cargo test verify_feature_contracts -- --include-ignored