-
Notifications
You must be signed in to change notification settings - Fork 24
93 lines (81 loc) · 3.11 KB
/
daily-runtime-validation.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
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