|
| 1 | +name: Daily runtime validation |
| 2 | + |
| 3 | +on: |
| 4 | + schedule: |
| 5 | + - cron: 0 0 * * * |
| 6 | + |
| 7 | +jobs: |
| 8 | + run_tests: |
| 9 | + strategy: |
| 10 | + max-parallel: 1 |
| 11 | + matrix: |
| 12 | + runtime: [wasmtime, wasm-micro-runtime] |
| 13 | + runs-on: ubuntu-latest |
| 14 | + steps: |
| 15 | + - name: Check out repository code |
| 16 | + uses: actions/checkout@v3 |
| 17 | + with: |
| 18 | + fetch-depth: 0 |
| 19 | + ref: prod/testsuite-base |
| 20 | + |
| 21 | + - name: Initialize Python environment |
| 22 | + uses: actions/setup-python@v4 |
| 23 | + with: |
| 24 | + python-version: '3.10' |
| 25 | + cache: pip |
| 26 | + |
| 27 | + - name: Install dependencies |
| 28 | + working-directory: test-runner |
| 29 | + run: pip install -r requirements.txt |
| 30 | + |
| 31 | + - name: Install wasmtime |
| 32 | + if: matrix.runtime == 'wasmtime' |
| 33 | + run: | |
| 34 | + curl https://wasmtime.dev/install.sh -sSf | bash |
| 35 | + echo "$HOME/.wasmtime/bin" >> $GITHUB_PATH |
| 36 | +
|
| 37 | + - name: Install WASM Micro Runtime |
| 38 | + if: matrix.runtime == 'wasm-micro-runtime' |
| 39 | + run: | |
| 40 | + git clone https://github.com/bytecodealliance/wasm-micro-runtime.git |
| 41 | + cd wasm-micro-runtime/product-mini/platforms/linux/ |
| 42 | + mkdir build && cd build |
| 43 | + cmake .. -DWAMR_BUILD_BULK_MEMORY=1 -DWAMR_BUILD_SHARED_MEMORY=1 |
| 44 | + make |
| 45 | + echo "$GITHUB_WORKSPACE/wasm-micro-runtime/product-mini/platforms/linux/build" >> $GITHUB_PATH |
| 46 | +
|
| 47 | + - name: Get current timestamp |
| 48 | + run: echo "date=$(date +'%Y-%m-%d_%H_%M')" >> $GITHUB_ENV |
| 49 | + |
| 50 | + - name: Run tests on ${{ matrix.runtime }} |
| 51 | + run: | |
| 52 | + mkdir -p test_results |
| 53 | + python3 test-runner/wasi_test_runner.py \ |
| 54 | + -r ./adapters/${{ matrix.runtime }}.sh \ |
| 55 | + --json-output-location results.json \ |
| 56 | + -t tests/assemblyscript/testsuite \ |
| 57 | + -t tests/c/testsuite |
| 58 | +
|
| 59 | + - name: Configure git |
| 60 | + uses: ./.github/actions/git-config |
| 61 | + |
| 62 | + - name: Upload test results |
| 63 | + run: | |
| 64 | + git checkout prod/daily-test-results |
| 65 | + mkdir -p results/${{ matrix.runtime }} |
| 66 | + cp results.json results/${{ matrix.runtime }}/${{ env.date }}.json |
| 67 | + cp results.json results/${{ matrix.runtime }}/latest.json |
| 68 | + git add results |
| 69 | + git commit -m 'Update daily test results for ${{ matrix.runtime }}' |
| 70 | + git push |
0 commit comments