-
Notifications
You must be signed in to change notification settings - Fork 83
89 lines (86 loc) · 2.62 KB
/
tests.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
85
86
87
88
89
---
on:
push:
branches:
- master
- develop
pull_request:
name: Tests
jobs:
test:
name: Test suite ${{ matrix.profile }}
runs-on: github-hosted-heavy-runner
strategy:
fail-fast: false
matrix:
profile: [ mainnet, testnet, mainnet-silo, testnet-silo ]
steps:
- name: Potential broken submodules fix
run: |
git checkout -f $(git -c user.name=x -c user.email=x@x commit-tree $(git hash-object -t tree /dev/null) < /dev/null) || :
- name: Clone the repository
uses: actions/checkout@v4
- name: Cargo Cache
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ matrix.profile }}-cargo-test
- name: Setup Node and cache
uses: actions/setup-node@v4
with:
node-version: 18
cache: yarn
cache-dependency-path: |
etc/eth-contracts
etc/tests/uniswap
- name: Install dependencies
run: cargo +stable make -V || cargo +stable install cargo-make
- name: Build main contract
run: |
case ${{ matrix.profile }} in
mainnet-silo)
cargo make --profile mainnet build-test
;;
testnet-silo)
cargo make --profile testnet build-test
;;
*)
;;
esac
- name: Tests ${{ matrix.profile }}
run: cargo make --profile ${{ matrix.profile }} test-flow
test_modexp:
name: Test modexp suite ${{ matrix.profile }}
runs-on: github-hosted-heavy-runner
strategy:
fail-fast: false
matrix:
profile: [ mainnet, testnet ]
steps:
- name: Potential broken submodules fix
run: |
git checkout -f $(git -c user.name=x -c user.email=x@x commit-tree $(git hash-object -t tree /dev/null) < /dev/null) || :
- name: Clone the repository
uses: actions/checkout@v4
- name: Cargo Cache
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ matrix.profile }}-cargo-modexp-test
- name: Install dependencies
run: cargo +stable make -V || cargo +stable install cargo-make
- name: Test ${{ matrix.profile }} bench-modexp
run: cargo make --profile ${{ matrix.profile }} bench-modexp
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0