-
Notifications
You must be signed in to change notification settings - Fork 104
163 lines (134 loc) · 4.07 KB
/
test.yaml
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
on:
push:
branches:
- master
pull_request:
name: Tests
jobs:
unix-test:
name: Unix tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-11]
toolchain: [stable, nightly]
steps:
- name: Checkout source code
uses: actions/checkout@v2
- name: Setup toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
profile: minimal
override: true
- name: Run cargo tests
uses: nick-fields/retry@v2
with:
timeout_minutes: 30
max_attempts: 20
retry_wait_seconds: 30
command: cargo test --all
win-test:
name: Windows tests
runs-on: windows-latest
strategy:
matrix:
toolchain: [stable, nightly]
target: [x86_64-pc-windows-gnu, x86_64-pc-windows-msvc]
steps:
- name: Checkout source code
uses: actions/checkout@v2
- name: Setup toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
target: ${{ matrix.target }}
profile: minimal
override: true
- name: Run cargo tests
uses: nick-fields/retry@v2
with:
timeout_minutes: 30
max_attempts: 20
retry_wait_seconds: 30
command: cargo test --all --target ${{ matrix.target }} --exclude starknet-cxx
wasm-test:
name: WASM tests
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v2
- name: Setup toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- name: Add wasm32-unknown-unknown target
run: |
rustup target add wasm32-unknown-unknown
- name: Build project
run: |
cargo build --all --target wasm32-unknown-unknown --exclude starknet-cxx
- name: Install wasm-pack
uses: actions-rs/cargo@v1
with:
command: install
args: wasm-pack
- name: Run starknet-ff tests
run: |
(cd ./starknet-ff && wasm-pack test --release --node)
- name: Run starknet-crypto tests
run: |
(cd ./starknet-crypto && wasm-pack test --release --node)
- name: Run starknet-core tests
run: |
(cd ./starknet-core && wasm-pack test --release --node)
- name: Run starknet-signers tests
run: |
(cd ./starknet-signers && wasm-pack test --release --node)
- name: Run starknet-macros tests
run: |
(cd ./starknet-macros && wasm-pack test --release --node)
no-std-build:
name: no-std build
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v2
- name: Setup toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- name: Add --target thumbv6m-none-eabi target
run: |
rustup target add thumbv6m-none-eabi
- name: Build starknet-ff
run: |
cargo build --package starknet-ff \
--target thumbv6m-none-eabi \
--no-default-features
cargo build --package starknet-ff \
--target thumbv6m-none-eabi \
--no-default-features \
--features alloc
cargo build --package starknet-ff \
--target thumbv6m-none-eabi \
--no-default-features \
--features serde
- name: Build starknet-crypto
run: |
cargo build --package starknet-crypto \
--target thumbv6m-none-eabi \
--no-default-features
cargo build --package starknet-crypto \
--target thumbv6m-none-eabi \
--no-default-features \
--features alloc
- name: Build starknet-core
run: |
cargo build --package starknet-core \
--target thumbv6m-none-eabi \
--no-default-features