@@ -131,6 +131,79 @@ jobs:
131131 if-no-files-found : error
132132 include-hidden-files : true
133133
134+ run_tests :
135+ name : Run tests
136+ runs-on : ${{ matrix.os }}
137+ needs : [build_assemblyscript, build_c, build_rust]
138+ strategy :
139+ max-parallel : 1
140+ matrix :
141+ os : [ubuntu-latest, windows-latest, macos-latest, windows-11-arm]
142+ runtime : [wasmtime]
143+ env :
144+ WASMTIME_VERSION : 27
145+ steps :
146+ - name : Check out repository code
147+ uses : actions/checkout@v3
148+ with :
149+ fetch-depth : 0
150+ ref : ${{ github.sha }}
151+
152+ - name : Initialize Python environment
153+ uses : actions/setup-python@v4
154+ with :
155+ python-version : ' 3.12'
156+ cache : pip
157+
158+ - name : Install dependencies
159+ working-directory : test-runner
160+ run : pip install -r requirements.txt
161+
162+ - name : Install wasmtime
163+ if : matrix.runtime == 'wasmtime' && matrix.os == 'windows-latest'
164+ run : |
165+ $url = "https://github.com/bytecodealliance/wasmtime/releases/download/${WASMTIME_VERSION}/wasmtime-${WASMTIME_VERSION}-x86_64-windows.zip"
166+ Invoke-WebRequest -Uri $url -OutFile "wasmtime.zip"
167+ Expand-Archive -Path "wasmtime.zip" -DestinationPath "."
168+ echo "$env:GITHUB_WORKSPACE\wasmtime-$env:WASMTIME_VERSION-x86_64-windows" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
169+
170+ - name : Install wasmtime
171+ if : matrix.runtime == 'wasmtime' && matrix.os == 'windows-11-arm'
172+ run : |
173+ $url = "https://github.com/bytecodealliance/wasmtime/releases/download/${WASMTIME_VERSION}/wasmtime-${WASMTIME_VERSION}-aarch64-windows.zip"
174+ Invoke-WebRequest -Uri $url -OutFile "wasmtime.zip"
175+ Expand-Archive -Path "wasmtime.zip" -DestinationPath "."
176+ echo "$env:GITHUB_WORKSPACE\wasmtime-$env:WASMTIME_VERSION-aarch64-windows" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
177+
178+ - name : Install wasmtime
179+ if : matrix.runtime == 'wasmtime' && (matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest')
180+ run : |
181+ curl https://wasmtime.dev/install.sh -sSf | bash
182+ echo "$HOME/.wasmtime/bin" >> $GITHUB_PATH
183+
184+ - name : Download Rust test binaries
185+ uses : actions/download-artifact@v4
186+ with :
187+ name : rust-testsuite
188+ path : ./tests/rust/testsuite
189+
190+ - name : Download C test binaries
191+ uses : actions/download-artifact@v4
192+ with :
193+ name : c-testsuite
194+ path : ./tests/c/testsuite
195+
196+ - name : Download AssemblyScript test binaries
197+ uses : actions/download-artifact@v4
198+ with :
199+ name : assemblyscript-testsuite
200+ path : ./tests/assemblyscript/testsuite
201+
202+ - name : Run tests
203+ continue-on-error : true
204+ run : |
205+ python run-tests --verbose --runtime adapters/${{ matrix.runtime }}.py
206+
134207 upload_test_binaries :
135208 if : ${{ github.ref == 'refs/heads/main' && github.event_name == 'push' }}
136209 runs-on : ubuntu-latest
0 commit comments