|
9 | 9 | name: Tests |
10 | 10 | jobs: |
11 | 11 | test: |
12 | | - name: Test suite (mainnet, testnet) |
13 | | - runs-on: [self-hosted, heavy] |
| 12 | + name: Test suite ${{ matrix.profile }} |
| 13 | + runs-on: github-hosted-heavy-runner |
| 14 | + strategy: |
| 15 | + fail-fast: false |
| 16 | + matrix: |
| 17 | + profile: [ mainnet, testnet, mainnet-silo, testnet-silo ] |
14 | 18 | steps: |
15 | 19 | - name: Potential broken submodules fix |
16 | 20 | run: | |
17 | 21 | git checkout -f $(git -c user.name=x -c user.email=x@x commit-tree $(git hash-object -t tree /dev/null) < /dev/null) || : |
18 | 22 | - name: Clone the repository |
19 | | - uses: actions/checkout@v3 |
20 | | - - name: Restore cache |
21 | | - run: cache-util restore cargo_git cargo_registry yarn_cache |
22 | | - - name: Build contracts |
23 | | - run: cargo make build-contracts |
24 | | - - name: Test contracts |
25 | | - run: cargo make test-contracts |
26 | | - - name: Build mainnet test WASM |
27 | | - run: cargo make --profile mainnet build-test |
28 | | - - name: List mainnet WASM directory and root directory |
29 | | - run: ls -la target/wasm32-unknown-unknown/release && ls -la |
30 | | - - name: Test mainnet |
31 | | - run: cargo make --profile mainnet test-workspace |
32 | | - - name: Build testnet test WASM |
33 | | - run: cargo make --profile testnet build-test |
34 | | - - name: List testnet WASM directory and root directory |
35 | | - run: ls -la target/wasm32-unknown-unknown/release && ls -la |
36 | | - - name: Test testnet |
37 | | - run: cargo make --profile testnet test-workspace |
38 | | - - name: Save cache |
39 | | - run: cache-util save cargo_git cargo_registry yarn_cache |
| 23 | + uses: actions/checkout@v4 |
| 24 | + - name: Cargo Cache |
| 25 | + uses: actions/cache@v3 |
| 26 | + with: |
| 27 | + path: | |
| 28 | + ~/.cargo/bin/ |
| 29 | + ~/.cargo/registry/index/ |
| 30 | + ~/.cargo/registry/cache/ |
| 31 | + ~/.cargo/git/db/ |
| 32 | + target/ |
| 33 | + key: ${{ matrix.profile }}-cargo-test |
| 34 | + - name: Setup Node and cache |
| 35 | + uses: actions/setup-node@v3 |
| 36 | + with: |
| 37 | + node-version: 16 |
| 38 | + cache: 'yarn' |
| 39 | + cache-dependency-path: | |
| 40 | + etc/eth-contracts |
| 41 | + etc/tests/uniswap |
| 42 | + - name: Install dependencies |
| 43 | + run: cargo make -V || cargo install cargo-make |
| 44 | + - name: Build main contract |
| 45 | + run: | |
| 46 | + case ${{ matrix.profile }} in |
| 47 | + mainnet-silo) |
| 48 | + cargo make --profile mainnet build-test |
| 49 | + ;; |
| 50 | + testnet-silo) |
| 51 | + cargo make --profile testnet build-test |
| 52 | + ;; |
| 53 | + *) |
| 54 | + ;; |
| 55 | + esac |
| 56 | + - name: Tests ${{ matrix.profile }} |
| 57 | + run: cargo make --profile ${{ matrix.profile }} test-flow |
40 | 58 |
|
41 | 59 | test_modexp: |
42 | | - name: Test modexp suite (mainnet, testnet) |
43 | | - runs-on: [ self-hosted, heavy ] |
| 60 | + name: Test modexp suite ${{ matrix.profile }} |
| 61 | + runs-on: github-hosted-heavy-runner |
| 62 | + strategy: |
| 63 | + fail-fast: false |
| 64 | + matrix: |
| 65 | + profile: [ mainnet, testnet ] |
44 | 66 | steps: |
45 | 67 | - name: Potential broken submodules fix |
46 | 68 | run: | |
47 | 69 | git checkout -f $(git -c user.name=x -c user.email=x@x commit-tree $(git hash-object -t tree /dev/null) < /dev/null) || : |
48 | 70 | - name: Clone the repository |
49 | | - uses: actions/checkout@v3 |
50 | | - - name: Restore cache |
51 | | - run: | |
52 | | - cache-util restore cargo_git cargo_registry yarn_cache |
53 | | - cache-util restore aurora-engine-target@generic@${{ hashFiles('**/Cargo.lock') }}:target |
54 | | - - name: Test mainnet bench-modexp |
55 | | - run: cargo make --profile mainnet bench-modexp |
56 | | - - name: Test testnet bench-modexp |
57 | | - run: cargo make --profile testnet bench-modexp |
58 | | - - name: Save cache |
59 | | - run: | |
60 | | - cache-util save cargo_git cargo_registry yarn_cache |
61 | | - cache-util msave aurora-engine-target@generic@${{ hashFiles('**/Cargo.lock') }}:target |
| 71 | + uses: actions/checkout@v4 |
| 72 | + - name: Cargo Cache |
| 73 | + uses: actions/cache@v3 |
| 74 | + with: |
| 75 | + path: | |
| 76 | + ~/.cargo/bin/ |
| 77 | + ~/.cargo/registry/index/ |
| 78 | + ~/.cargo/registry/cache/ |
| 79 | + ~/.cargo/git/db/ |
| 80 | + target/ |
| 81 | + key: ${{ matrix.profile }}-cargo-modexp-test |
| 82 | + - name: Install dependencies |
| 83 | + run: cargo make -V || cargo install cargo-make |
| 84 | + - name: Test ${{ matrix.profile }} bench-modexp |
| 85 | + run: cargo make --profile ${{ matrix.profile }} bench-modexp |
62 | 86 |
|
63 | 87 | env: |
64 | 88 | CARGO_TERM_COLOR: always |
|
0 commit comments