fix typo #380
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: tests | |
on: | |
create: | |
tags: | |
push: | |
branches: | |
- main | |
pull_request: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
linux: | |
runs-on: ubuntu-latest | |
name: "Linux, ${{ matrix.system.target }} (build=${{ matrix.build }}, threads=${{ matrix.threads }})" | |
strategy: | |
fail-fast: false | |
matrix: | |
build: [release, debug] | |
threads: [true, false] | |
system: | |
- { target: gcc, cc: gcc } | |
- { target: clang, cc: clang } | |
- { target: arm, toolchain: gcc-arm-linux-gnueabi, cc: arm-linux-gnueabi-gcc, qemu: qemu-arm-static, linkAtomic: true } | |
- { target: armhf, toolchain: gcc-arm-linux-gnueabihf, cc: arm-linux-gnueabihf-gcc, qemu: qemu-arm-static } | |
- { target: aarch64, toolchain: gcc-aarch64-linux-gnu, cc: aarch64-linux-gnu-gcc, qemu: qemu-aarch64-static } | |
- { target: riscv64, toolchain: gcc-riscv64-linux-gnu, cc: riscv64-linux-gnu-gcc, qemu: qemu-riscv64-static, linkAtomic: true } | |
- { target: ppc, toolchain: gcc-powerpc-linux-gnu, cc: powerpc-linux-gnu-gcc, qemu: qemu-ppc-static, linkAtomic: true } | |
- { target: ppc64, toolchain: gcc-powerpc64-linux-gnu, cc: powerpc64-linux-gnu-gcc, qemu: qemu-ppc64-static } | |
- { target: s390x, toolchain: gcc-s390x-linux-gnu, cc: s390x-linux-gnu-gcc, qemu: qemu-s390x-static } | |
- { target: alpha, toolchain: gcc-alpha-linux-gnu, cc: alpha-linux-gnu-gcc, qemu: qemu-alpha-static } | |
# Architectures with expected failures (mostly due to FP issues, e.g. NaN representation, conversion, arithemtic) | |
- { target: i386, toolchain: gcc-multilib, cc: clang -m32, qemu: qemu-i386-static, linkAtomic: true } | |
- { target: hppa, toolchain: gcc-hppa-linux-gnu, cc: hppa-linux-gnu-gcc, qemu: qemu-hppa-static } | |
- { target: mips, toolchain: gcc-mips-linux-gnu, cc: mips-linux-gnu-gcc, qemu: qemu-mips-static, linkAtomic: true } | |
- { target: mipsel, toolchain: gcc-mipsel-linux-gnu, cc: mipsel-linux-gnu-gcc, qemu: qemu-mipsel-static, linkAtomic: true } | |
- { target: mips64, toolchain: gcc-mips64-linux-gnuabi64, cc: mips64-linux-gnuabi64-gcc, qemu: qemu-mips64-static } | |
- { target: mips64el, toolchain: gcc-mips64el-linux-gnuabi64, cc: mips64el-linux-gnuabi64-gcc, qemu: qemu-mips64el-static } | |
- { target: ppc64le, toolchain: gcc-powerpc64le-linux-gnu, cc: powerpc64le-linux-gnu-gcc, qemu: qemu-ppc64le-static } | |
# Disabled due to miscompilation or qemu issues (?) | |
# - { target: sh4, toolchain: gcc-sh4-linux-gnu, cc: sh4-linux-gnu-gcc, qemu: qemu-sh4-static } | |
# - { target: sparc64, toolchain: gcc-sparc64-linux-gnu, cc: sparc64-linux-gnu-gcc, qemu: qemu-sparc64-static } | |
# Disabled due to too large `switch'-statement | |
# - { target: m68k, toolchain: gcc-m68k-linux-gnu, cc: m68k-linux-gnu-gcc, qemu: qemu-m68k-static } | |
env: | |
CC: ${{ matrix.system.cc }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install QEMU | |
if: ${{ matrix.system.qemu }} | |
run: | | |
sudo apt update | |
sudo apt install qemu-user-static | |
- name: Install ${{ matrix.system.toolchain }} | |
if: ${{ matrix.system.toolchain }} | |
run: | | |
sudo apt install ${{ matrix.system.toolchain }} | |
- uses: dorny/paths-filter@v2 | |
id: changes | |
with: | |
filters: | | |
w2c2: | |
- 'w2c2/**' | |
- 'futex/**' | |
- 'tests/**' | |
wasi: | |
- 'wasi/**' | |
- if: steps.changes.outputs.w2c2 == 'true' | |
name: Build w2c2 | |
env: | |
LDFLAGS: -static | |
working-directory: ./w2c2 | |
run: make BUILD=${{ matrix.build }} FEATURES="unistd libgen getopt glob ${{ matrix.threads && 'threads' || '' }}" | |
- if: steps.changes.outputs.w2c2 == 'true' | |
name: Test w2c2 | |
env: | |
LDFLAGS: -static | |
working-directory: ./w2c2 | |
run: make test BUILD=${{ matrix.build }} FEATURES="unistd libgen getopt glob ${{ matrix.threads && 'threads' || '' }}" | |
- if: steps.changes.outputs.w2c2 == 'true' | |
name: Build futex | |
working-directory: ./futex | |
run: make BUILD=${{ matrix.build }} | |
- if: steps.changes.outputs.w2c2 == 'true' | |
name: Test futex | |
env: | |
LDFLAGS: -static ${{ matrix.system.linkAtomic && '-latomic' || '' }} | |
working-directory: ./futex | |
run: make test BUILD=${{ matrix.build }} | |
- if: steps.changes.outputs.w2c2 == 'true' | |
name: Run WebAssembly tests | |
env: | |
LDFLAGS: -static ${{ matrix.system.linkAtomic && '-latomic' || '' }} | |
ARCH: ${{ matrix.system.target }} | |
working-directory: ./tests | |
shell: bash | |
run: make run-tests | |
- if: steps.changes.outputs.wasi == 'true' | |
name: Build wasi | |
working-directory: ./wasi | |
run: make BUILD=${{ matrix.build }} | |
- if: steps.changes.outputs.wasi == 'true' | |
name: Test wasi | |
env: | |
LDFLAGS: -static ${{ matrix.system.linkAtomic && '-latomic' || '' }} | |
working-directory: ./wasi | |
run: make test BUILD=${{ matrix.build }} | |
macos: | |
runs-on: macos-latest | |
name: "macOS (build=${{ matrix.build }}, threads=${{ matrix.threads }})" | |
strategy: | |
fail-fast: false | |
matrix: | |
build: [release, debug] | |
threads: [true, false] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dorny/paths-filter@v2 | |
id: changes | |
with: | |
filters: | | |
w2c2: | |
- 'w2c2/**' | |
- 'futex/**' | |
- 'tests/**' | |
wasi: | |
- 'wasi/**' | |
- if: steps.changes.outputs.w2c2 == 'true' | |
name: Build w2c2 | |
working-directory: ./w2c2 | |
run: make BUILD=${{ matrix.build }} FEATURES="unistd libgen getopt glob ${{ matrix.threads && 'threads' || '' }}" | |
- if: steps.changes.outputs.w2c2 == 'true' | |
name: Test w2c2 | |
working-directory: ./w2c2 | |
run: make test BUILD=${{ matrix.build }} FEATURES="unistd libgen getopt glob ${{ matrix.threads && 'threads' || '' }}" | |
- if: steps.changes.outputs.w2c2 == 'true' | |
name: Build futex | |
working-directory: ./futex | |
run: make BUILD=${{ matrix.build }} | |
- if: steps.changes.outputs.w2c2 == 'true' | |
name: Test futex | |
working-directory: ./futex | |
run: make test BUILD=${{ matrix.build }} | |
- if: steps.changes.outputs.w2c2 == 'true' | |
name: Run WebAssembly tests | |
working-directory: ./tests | |
shell: bash | |
run: make run-tests | |
- if: steps.changes.outputs.wasi == 'true' | |
name: Build wasi | |
working-directory: ./wasi | |
run: make BUILD=${{ matrix.build }} FEATURES="unistd sysuio systime sysresource strndup fcntl timespec lstat pthreads" | |
- if: steps.changes.outputs.wasi == 'true' | |
name: Test wasi | |
working-directory: ./wasi | |
run: make test BUILD=${{ matrix.build }} FEATURES="unistd sysuio systime sysresource strndup fcntl timespec lstat pthreads" | |
windows-msvc: | |
runs-on: windows-2019 | |
name: "Windows (MSVC)" | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dorny/paths-filter@v2 | |
id: changes | |
with: | |
filters: | | |
w2c2: | |
- 'w2c2/**' | |
wasi: | |
- 'wasi/**' | |
- if: steps.changes.outputs.w2c2 == 'true' | |
name: Build w2c2 | |
working-directory: ./w2c2 | |
run: | | |
cmake -Bbuild | |
cmake --build build | |
- if: steps.changes.outputs.wasi == 'true' | |
name: Build wasi | |
working-directory: ./wasi | |
run: | | |
cmake -Bbuild | |
cmake --build build |