name: tests on: [push, pull_request] jobs: build-linux: runs-on: ubuntu-latest timeout-minutes: 5 strategy: fail-fast: false matrix: compiler: [gcc, clang] flags: ["", "-m32"] build_type: ["-DCMAKE_BUILD_TYPE=Debug", ""] exclude: - compiler: clang build_type: "-DCMAKE_BUILD_TYPE=Debug" - compiler: gcc # TODO: fails on numeric operations flags: "-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 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: platform: ["-A Win32", "-A x64"] toolset: ["-T ClangCL", ""] 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 # TODO: doesn't work yet #- name: Run WASI tests # run: | # cd test # python run-wasi-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 # TODO: doesn't work yet #- name: Run spec tests (self-hosting) # 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, linux, ARM] 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 continue-on-error: true # TODO: fails on numeric operations run: | cd test python3 run-spec-test.py - name: Run WASI tests run: | cd test ./run-wasi-test.py --timeout 120