-
Notifications
You must be signed in to change notification settings - Fork 154
84 lines (73 loc) · 2.14 KB
/
test_install.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
81
82
83
84
name: Test dependencies and cairo-vm install
on:
merge_group:
push:
branches: [ main ]
pull_request:
branches: [ '**' ]
jobs:
install:
name: "Install on ${{ matrix.os }}"
strategy:
matrix:
os: [ubuntu-22.04, macos-13]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up Cargo cache
uses: Swatinem/rust-cache@v2
with:
cache-all-crates: 'true'
cache-on-failure: 'true'
cache-directories: ./cairo/target/
# just to cache dependencies
- name: Install python
uses: actions/setup-python@v4
with:
python-version: '3.9'
cache: 'pip'
# NOTE: we do it in one step because GitHub cleans the PATH between steps
- name: Install dependencies and compile project
run: |
source install.sh
make check
install_debian:
name: "Install on debian-11"
runs-on: ubuntu-22.04
container:
image: debian:11
defaults:
run:
shell: bash {0}
steps:
- uses: actions/checkout@v3
# we don't use swatinem because rustc isn't installed yet
- name: Cache Rust dependencies
uses: actions/cache@v3
with:
path: |
~/.cargo/
./target/
./cairo/target/
key: ${{ runner.os }}-install-${{ github.sha }}
restore-keys: ${{ runner.os }}-install-
- name: Enable pip cache
run: |
mkdir -p ~/.cache/pip
chown -v -R $USER ~/.cache
chmod -v -R 770 ~/.cache
ls -al ~/
ls -al ~/.cache
# NOTE: we don't use install-python because lsb_release isn't installed
- name: Cache Python dependencies
uses: actions/cache@v3
with:
path: |
~/.cache/pip/wheels
key: ${{ runner.os }}-python-install-${{ github.sha }}
restore-keys: ${{ runner.os }}-python-install-
# NOTE: we do it in one step because GitHub cleans the PATH between steps
- name: Install dependencies and compile project
run: |
source install.sh
make check