|
1 | 1 | name: Tests
|
2 |
| -on: [ push, pull_request ] |
3 |
| - |
4 |
| -concurrency: |
5 |
| - group: ${{ github.workflow }}-${{ github.ref }} |
6 |
| - cancel-in-progress: true # Cancel in-flight jobs for the same branch or PR |
| 2 | +on: [ push ] |
7 | 3 |
|
8 | 4 | jobs:
|
| 5 | + # Stage 1: unit test vm machinery |
| 6 | + |
9 | 7 | unit:
|
10 | 8 | name: Run VM unit tests
|
11 | 9 | runs-on: ${{matrix.os}}
|
|
30 | 28 | run: ctest -VV
|
31 | 29 | working-directory: build-unit-tests
|
32 | 30 |
|
33 |
| - latch: |
| 31 | + # Stage 2: integration testing with official Wasm specification test suite |
| 32 | + |
| 33 | + spectests: |
34 | 34 | name: Run official testsuite
|
| 35 | + needs: unit |
35 | 36 | runs-on: ubuntu-latest
|
36 | 37 | if: github.event.pull_request.draft == false
|
37 | 38 | steps:
|
|
71 | 72 | run: npm run spectest
|
72 | 73 | working-directory: tests/latch/
|
73 | 74 |
|
| 75 | + # Stage 3: end-to-end testing of primitives and debugger |
| 76 | + |
| 77 | + primtests: |
| 78 | + name: Run WARDuino primitives testsuite |
| 79 | + needs: spectests |
| 80 | + runs-on: ubuntu-latest |
| 81 | + if: github.event.pull_request.draft == false |
| 82 | + steps: |
| 83 | + - uses: actions/checkout@v3 |
| 84 | + with: |
| 85 | + submodules: recursive |
| 86 | + |
| 87 | + - uses: actions/setup-node@v3 |
| 88 | + with: |
| 89 | + node-version: 16 |
| 90 | + |
| 91 | + - name: Build warduino cli |
| 92 | + run: | |
| 93 | + cmake . -D BUILD_EMULATOR=ON |
| 94 | + cmake --build . |
| 95 | + echo "EMULATOR=$(realpath ./wdcli)" >> $GITHUB_ENV |
| 96 | +
|
| 97 | + - name: Build WABT # Build latest version |
| 98 | + run: | |
| 99 | + git clone --recursive https://github.com/TOPLLab/wabt.git |
| 100 | + cd wabt |
| 101 | + git checkout develop |
| 102 | + git submodule update --init |
| 103 | + mkdir build; cd build |
| 104 | + cmake .. |
| 105 | + cmake --build . |
| 106 | +
|
| 107 | + - name: Verify wat2wasm |
| 108 | + run: | |
| 109 | + echo "WABT=$(readlink -f ./wabt/build)" >> $GITHUB_ENV |
| 110 | + ./wabt/build/wat2wasm --version |
| 111 | +
|
| 112 | + - run: npm install |
| 113 | + working-directory: tests/latch/ |
| 114 | + |
| 115 | + - name: Run Latch |
| 116 | + run: npm run primtest |
| 117 | + working-directory: tests/latch/ |
| 118 | + |
| 119 | + debugtests: |
| 120 | + name: Run debugger testsuite |
| 121 | + needs: spectests |
| 122 | + runs-on: ubuntu-latest |
| 123 | + if: github.event.pull_request.draft == false |
| 124 | + steps: |
| 125 | + - uses: actions/checkout@v3 |
| 126 | + with: |
| 127 | + submodules: recursive |
| 128 | + |
| 129 | + - uses: actions/setup-node@v3 |
| 130 | + with: |
| 131 | + node-version: 16 |
| 132 | + |
| 133 | + - name: Build warduino cli |
| 134 | + run: | |
| 135 | + cmake . -D BUILD_EMULATOR=ON |
| 136 | + cmake --build . |
| 137 | + echo "EMULATOR=$(realpath ./wdcli)" >> $GITHUB_ENV |
| 138 | +
|
| 139 | + - name: Build WABT # Build latest version |
| 140 | + run: | |
| 141 | + git clone --recursive https://github.com/TOPLLab/wabt.git |
| 142 | + cd wabt |
| 143 | + git checkout develop |
| 144 | + git submodule update --init |
| 145 | + mkdir build; cd build |
| 146 | + cmake .. |
| 147 | + cmake --build . |
| 148 | +
|
| 149 | + - name: Verify wat2wasm |
| 150 | + run: | |
| 151 | + echo "WABT=$(readlink -f ./wabt/build)" >> $GITHUB_ENV |
| 152 | + ./wabt/build/wat2wasm --version |
| 153 | +
|
| 154 | + - run: npm install |
| 155 | + working-directory: tests/latch/ |
| 156 | + |
| 157 | + - name: Run Latch |
| 158 | + run: npm run debugtest |
| 159 | + working-directory: tests/latch/ |
| 160 | + |
0 commit comments