You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
wasm3/.github/workflows/tests.yml

172 lines
3.7 KiB
YAML

name: tests
5 years ago
on: [push, pull_request]
5 years ago
jobs:
build-linux:
5 years ago
runs-on: ubuntu-latest
timeout-minutes: 5
5 years ago
strategy:
fail-fast: false
matrix:
compiler: [gcc, clang]
flags: ["", "-m32"]
5 years ago
build_type: ["-DCMAKE_BUILD_TYPE=Debug", ""]
exclude:
- compiler: clang
build_type: "-DCMAKE_BUILD_TYPE=Debug"
5 years ago
- compiler: gcc # TODO: fails on numeric operations
flags: "-m32"
5 years ago
steps:
- uses: actions/checkout@v1
- name: Install multilib
if: contains(matrix.flags, '-m32')
run: sudo apt-get install gcc-multilib
5 years ago
- name: Run CMake
env:
CC: ${{ matrix.compiler }}
CFLAGS: ${{ matrix.flags }}
5 years ago
run: |
mkdir build
cd build
cmake ${{ matrix.build_type }} ..
5 years ago
- name: Build
5 years ago
run: |
cmake --build build
- name: Run spec tests
5 years ago
run: |
cd test
./run-spec-test.py
- name: Run WASI tests
run: |
cd test
./run-wasi-test.py
build-mac:
runs-on: macos-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v1
5 years ago
- name: Run CMake
run: |
mkdir build
cd build
cmake ..
5 years ago
- 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:
5 years ago
platform: ["-A Win32", "-A x64"]
5 years ago
toolset: ["-T ClangCL", ""]
steps:
- uses: actions/checkout@v1
5 years ago
- name: Run CMake
run: |
mkdir build
cd build
cmake ${{ matrix.platform }} ${{ matrix.toolset }} ..
5 years ago
- 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
- name: Run WASI tests
run: |
cd test
python run-wasi-test.py
5 years ago
build-wasi:
runs-on: ubuntu-latest
timeout-minutes: 5
5 years ago
steps:
- uses: actions/checkout@v1
5 years ago
- name: Install Wasienv
run: curl https://raw.githubusercontent.com/wasienv/wasienv/master/install.sh | sh
5 years ago
- name: Install Wasmer
run: curl https://get.wasmer.io -sSfL | sh
5 years ago
- name: Run CMake
env:
CC: wasicc
run: |
source $HOME/.wasienv/wasienv.sh
mkdir build-wasi
cd build-wasi
5 years ago
cmake ..
- name: Build
run: |
cmake --build build-wasi
- name: Run spec tests
run: |
5 years ago
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
5 years ago
- name: Run spec tests (self-hosting)
continue-on-error: true # TODO
run: |
cd test
./run-spec-test.py --engine "../build/wasm3" --exec "../build-wasi/wasm3.wasm"
5 years ago
5 years ago
build-raspberry:
5 years ago
runs-on: [self-hosted, linux, ARM]
5 years ago
timeout-minutes: 5
strategy:
fail-fast: false
matrix:
compiler: [gcc, clang]
5 years ago
steps:
- uses: actions/checkout@v1
- name: Run CMake
env:
CC: ${{ matrix.compiler }}
5 years ago
run: |
mkdir build
cd build
cmake ..
- name: Build
run: |
cmake --build build
- name: Run spec tests
run: |
cd test
5 years ago
python3 run-spec-test.py
- name: Run WASI tests
run: |
cd test
./run-wasi-test.py