|
|
|
name: tests
|
|
|
|
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build-linux:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
timeout-minutes: 5
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
compiler: [gcc, clang]
|
|
|
|
build_type: ["-DCMAKE_BUILD_TYPE=Debug", ""]
|
|
|
|
flags: ["", "-m32"]
|
|
|
|
|
|
|
|
exclude:
|
|
|
|
- compiler: clang
|
|
|
|
build_type: "-DCMAKE_BUILD_TYPE=Debug"
|
|
|
|
|
|
|
|
- compiler: gcc
|
|
|
|
flags: "-m32"
|
|
|
|
#build_type: "-DCMAKE_BUILD_TYPE=Debug" # TODO: exclude only debug, leave -m32
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
- name: Install multilib
|
|
|
|
if: contains(matrix.flags, '-m32')
|
|
|
|
run: sudo apt-get install gcc-multilib
|
|
|
|
- name: Run CMake
|
|
|
|
env:
|
|
|
|
CC: ${{ matrix.compiler }}
|
|
|
|
CFLAGS: ${{ matrix.flags }}
|
|
|
|
run: |
|
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
cmake ${{ matrix.build_type }} ..
|
|
|
|
- name: Build
|
|
|
|
run: |
|
|
|
|
cmake --build build
|
|
|
|
- name: Run spec tests
|
|
|
|
run: |
|
|
|
|
cd test
|
|
|
|
./run-spec-test.py --timeout 30
|
|
|
|
- name: Run WASI tests
|
|
|
|
if: "!contains(matrix.flags, '-m32')" # TODO: remove this check
|
|
|
|
run: |
|
|
|
|
cd test
|
|
|
|
./run-wasi-test.py --timeout 120
|
|
|
|
|
|
|
|
build-mac:
|
|
|
|
runs-on: macos-latest
|
|
|
|
timeout-minutes: 5
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
- name: Run CMake
|
|
|
|
run: |
|
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
cmake ..
|
|
|
|
- name: Build
|
|
|
|
run: |
|
|
|
|
cmake --build build
|
|
|
|
- name: Run spec tests
|
|
|
|
run: |
|
|
|
|
cd test
|
|
|
|
./run-spec-test.py
|
|
|
|
- name: Run WASI tests
|
|
|
|
run: |
|
|
|
|
cd test
|
|
|
|
./run-wasi-test.py
|
|
|
|
|
|
|
|
build-win:
|
|
|
|
runs-on: windows-latest
|
|
|
|
timeout-minutes: 5
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
toolset: ["-T ClangCL", ""]
|
|
|
|
platform: ["-A Win32", ""]
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
- name: Run CMake
|
|
|
|
run: |
|
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
cmake ${{ matrix.platform }} ${{ matrix.toolset }} ..
|
|
|
|
- name: Build
|
|
|
|
run: |
|
|
|
|
cmake --build build --config Release
|
|
|
|
cp ./build/Release/wasm3.exe ./build/
|
|
|
|
- name: Run spec tests
|
|
|
|
run: |
|
|
|
|
cd test
|
|
|
|
python run-spec-test.py
|
|
|
|
|
|
|
|
build-wasi:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
timeout-minutes: 5
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
- name: Install Wasienv
|
|
|
|
run: curl https://raw.githubusercontent.com/wasienv/wasienv/master/install.sh | sh
|
|
|
|
- name: Install Wasmer
|
|
|
|
run: curl https://get.wasmer.io -sSfL | sh
|
|
|
|
- name: Run CMake
|
|
|
|
env:
|
|
|
|
CC: wasicc
|
|
|
|
run: |
|
|
|
|
source $HOME/.wasienv/wasienv.sh
|
|
|
|
mkdir build-wasi
|
|
|
|
cd build-wasi
|
|
|
|
cmake ..
|
|
|
|
- name: Build
|
|
|
|
run: |
|
|
|
|
cmake --build build-wasi
|
|
|
|
- name: Run spec tests
|
|
|
|
run: |
|
|
|
|
source $HOME/.wasmer/wasmer.sh
|
|
|
|
cd test
|
|
|
|
./run-spec-test.py --engine "wasmer run" --exec "../build-wasi/wasm3.wasm"
|
|
|
|
|
|
|
|
- name: Run CMake for native build
|
|
|
|
run: |
|
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
cmake ..
|
|
|
|
- name: Build native
|
|
|
|
run: |
|
|
|
|
cmake --build build
|
|
|
|
- name: Run spec tests (self-hosting)
|
|
|
|
continue-on-error: true # TODO
|
|
|
|
run: |
|
|
|
|
source $HOME/.wasmer/wasmer.sh
|
|
|
|
cd test
|
|
|
|
./run-spec-test.py --engine "../build/wasm3" --exec "../build-wasi/wasm3.wasm"
|
|
|
|
|
|
|
|
build-raspberry:
|
|
|
|
runs-on: self-hosted
|
|
|
|
timeout-minutes: 5
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
- name: Run CMake
|
|
|
|
run: |
|
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
cmake ..
|
|
|
|
- name: Build
|
|
|
|
run: |
|
|
|
|
cmake --build build
|
|
|
|
- name: Run spec tests
|
|
|
|
run: |
|
|
|
|
cd test
|
|
|
|
python3 run-spec-test.py
|