@@ -131,6 +131,81 @@ 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+ env :
139+ WASMTIME_VERSION : 37.0.1
140+ strategy :
141+ matrix :
142+ os : [ubuntu-latest, windows-latest, macos-latest, windows-11-arm]
143+ runtime : [wasmtime]
144+ steps :
145+ - name : Check out repository code
146+ uses : actions/checkout@v3
147+ with :
148+ fetch-depth : 0
149+ ref : ${{ github.sha }}
150+
151+ - name : Initialize Python environment
152+ uses : actions/setup-python@v4
153+ with :
154+ python-version : ' 3.12'
155+ cache : pip
156+
157+ - name : Install dependencies
158+ working-directory : test-runner
159+ run : pip install -r requirements.txt
160+
161+ - name : Install wasmtime
162+ if : matrix.runtime == 'wasmtime' && matrix.os == 'windows-latest'
163+ run : |
164+ $url = "https://github.com/bytecodealliance/wasmtime/releases/download/v$env:WASMTIME_VERSION/wasmtime-v$env:WASMTIME_VERSION-x86_64-windows.zip"
165+ Write-Host "URL: $url"
166+ Invoke-WebRequest -Uri $url -OutFile "wasmtime.zip"
167+ Expand-Archive -Path "wasmtime.zip" -DestinationPath "."
168+ echo "$env:GITHUB_WORKSPACE\wasmtime-v$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/v$env:WASMTIME_VERSION/wasmtime-v$env:WASMTIME_VERSION-aarch64-windows.zip"
174+ Write-Host "URL: $url"
175+ Invoke-WebRequest -Uri $url -OutFile "wasmtime.zip"
176+ Expand-Archive -Path "wasmtime.zip" -DestinationPath "."
177+ echo "$env:GITHUB_WORKSPACE\wasmtime-v$env:WASMTIME_VERSION-aarch64-windows" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
178+
179+ - name : Install wasmtime
180+ if : matrix.runtime == 'wasmtime' && (matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest')
181+ run : |
182+ set -e
183+ curl https://wasmtime.dev/install.sh -sSf | bash -s -- --version $WASMTIME_VERSION
184+ echo "$HOME/.wasmtime/bin" >> $GITHUB_PATH
185+
186+ - name : Download Rust test binaries
187+ uses : actions/download-artifact@v4
188+ with :
189+ name : rust-testsuite
190+ path : ./tests/rust/testsuite
191+
192+ - name : Download C test binaries
193+ uses : actions/download-artifact@v4
194+ with :
195+ name : c-testsuite
196+ path : ./tests/c/testsuite
197+
198+ - name : Download AssemblyScript test binaries
199+ uses : actions/download-artifact@v4
200+ with :
201+ name : assemblyscript-testsuite
202+ path : ./tests/assemblyscript/testsuite
203+
204+ - name : Run tests
205+ continue-on-error : true
206+ run : |
207+ python run-tests --verbose --runtime adapters/${{ matrix.runtime }}.py
208+
134209 upload_test_binaries :
135210 if : ${{ github.ref == 'refs/heads/main' && github.event_name == 'push' }}
136211 runs-on : ubuntu-latest
0 commit comments