Daily runtime validation #623
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Daily runtime validation | |
on: | |
schedule: | |
- cron: 0 0 * * * | |
jobs: | |
run_tests: | |
strategy: | |
max-parallel: 1 | |
matrix: | |
runtime: [wasmtime, wasm-micro-runtime, wazero, wasmedge] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
ref: prod/testsuite-base | |
- name: Initialize Python environment | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
cache: pip | |
- name: Install dependencies | |
working-directory: test-runner | |
run: pip install -r requirements.txt | |
- name: Install wasmtime | |
if: matrix.runtime == 'wasmtime' | |
run: | | |
curl https://wasmtime.dev/install.sh -sSf | bash | |
echo "$HOME/.wasmtime/bin" >> $GITHUB_PATH | |
- name: Install WASM Micro Runtime | |
if: matrix.runtime == 'wasm-micro-runtime' | |
run: | | |
git clone https://github.com/bytecodealliance/wasm-micro-runtime.git | |
cd wasm-micro-runtime/product-mini/platforms/linux/ | |
mkdir build && cd build | |
cmake .. -DWAMR_BUILD_BULK_MEMORY=1 -DWAMR_BUILD_SHARED_MEMORY=1 | |
make | |
echo "$GITHUB_WORKSPACE/wasm-micro-runtime/product-mini/platforms/linux/build" >> $GITHUB_PATH | |
- name: Install WasmEdge | |
if: matrix.runtime == 'wasmedge' | |
run: | | |
sudo apt install -y software-properties-common cmake libboost-all-dev | |
sudo apt install -y clang | |
git clone https://github.com/WasmEdge/WasmEdge.git | |
cd WasmEdge | |
mkdir -p build && cd build | |
cmake -DWASMEDGE_BUILD_AOT_RUNTIME=OFF .. && make -j4 | |
echo "$GITHUB_WORKSPACE/WasmEdge/build/tools/wasmedge" >> $GITHUB_PATH | |
cd .. | |
cp .github/scripts/wasi-testsuite-adapter.py ../adapters/wasmedge.py | |
- name: Install wazero | |
if: matrix.runtime == 'wazero' | |
run: | | |
git clone https://github.com/tetratelabs/wazero.git | |
cd wazero | |
go install ./cmd/wazero | |
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH | |
cp .github/wasi_testsuite_adapter.py ../adapters/wazero.py | |
- name: Get current timestamp | |
run: echo "date=$(date +'%Y-%m-%d_%H_%M')" >> $GITHUB_ENV | |
- name: Run tests on ${{ matrix.runtime }} | |
continue-on-error: true | |
run: | | |
python3 test-runner/wasi_test_runner.py \ | |
-r ./adapters/${{ matrix.runtime }}.py \ | |
--json-output-location results.json \ | |
-t tests/assemblyscript/testsuite \ | |
tests/rust/testsuite \ | |
tests/c/testsuite | |
- name: Configure git | |
uses: ./.github/actions/git-config | |
- name: Upload test results | |
run: | | |
git checkout prod/daily-test-results | |
mkdir -p results/${{ matrix.runtime }} | |
cp results.json results/${{ matrix.runtime }}/${{ env.date }}.json | |
cp results.json results/${{ matrix.runtime }}/latest.json | |
git add results | |
git commit -m 'Update daily test results for ${{ matrix.runtime }}' | |
git push |