Skip to content

Commit 4ce14c2

Browse files
committed
Make CI tests triple staged
1 parent 091507a commit 4ce14c2

File tree

3 files changed

+100
-13
lines changed

3 files changed

+100
-13
lines changed

.github/workflows/test.yml

+93-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
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 ]
73

84
jobs:
5+
# Stage 1: unit test vm machinery
6+
97
unit:
108
name: Run VM unit tests
119
runs-on: ${{matrix.os}}
@@ -30,8 +28,11 @@ jobs:
3028
run: ctest -VV
3129
working-directory: build-unit-tests
3230

33-
latch:
31+
# Stage 2: integration testing with official Wasm specification test suite
32+
33+
spectests:
3434
name: Run official testsuite
35+
needs: unit
3536
runs-on: ubuntu-latest
3637
if: github.event.pull_request.draft == false
3738
steps:
@@ -71,3 +72,89 @@ jobs:
7172
run: npm run spectest
7273
working-directory: tests/latch/
7374

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+

tests/latch/latch-0.0.1.tgz

8 Bytes
Binary file not shown.

tests/latch/package-lock.json

+7-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)