mirror of
https://github.com/vsariola/sointu.git
synced 2025-05-28 03:10:24 -04:00
Installing this dependency failed in the cloud and caused tests to fail, so for now, we do not install it and do not test oto package. The tests were actually about some float / int16 conversions, which should not anyway be in oto package, so future solution will be to refactor those functions somewhere else.
68 lines
1.9 KiB
YAML
68 lines
1.9 KiB
YAML
# Run unit tests using CTest and go tests
|
|
name: Tests
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
- dev
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
- dev
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ${{ matrix.config.os }}
|
|
strategy:
|
|
matrix:
|
|
config:
|
|
- os: ubuntu-latest
|
|
asmnasm: /home/runner/nasm/nasm
|
|
cmakeflags: -GNinja
|
|
maker: ninja
|
|
gotests: yes
|
|
cgo_ldflags:
|
|
- os: windows-latest
|
|
cmakeflags: -GNinja
|
|
maker: ninja
|
|
asmnasm: C:\Users\runneradmin\nasm\nasm
|
|
gotests: yes
|
|
cgo_ldflags:
|
|
- os: macos-latest
|
|
cmakeflags: -GNinja
|
|
maker: ninja
|
|
asmnasm: /Users/runner/nasm/nasm
|
|
gotests: yes
|
|
cgo_ldflags: # -Wl,-no_pie
|
|
# ld on mac is complaining about position dependent code so this would take the errors away, BUT
|
|
# suddenly this causes an error, even though worked last week. Let's accept the warnings rather
|
|
# than let the tests fail because of this.
|
|
# TODO: win32 builds didn't quite work out, complains gcc broken
|
|
steps:
|
|
- uses: lukka/get-cmake@v3.18.3
|
|
- uses: vsariola/setup-wabt@v1.0.1
|
|
with:
|
|
version: 1.0.20
|
|
- uses: actions/setup-go@v2
|
|
- uses: actions/setup-node@v2
|
|
with:
|
|
node-version: '15'
|
|
- uses: actions/checkout@v2
|
|
- uses: ilammy/setup-nasm@v1.2.0
|
|
- name: Run ctest
|
|
env:
|
|
ASM_NASM: ${{ matrix.config.asmnasm }}
|
|
run: |
|
|
mkdir build
|
|
cd build
|
|
cmake ${{ matrix.config.cmakeflags }} ..
|
|
${{ matrix.config.maker }}
|
|
ctest --output-on-failure
|
|
- name: Run go test
|
|
if: ${{ matrix.config.gotests == 'yes' }}
|
|
env:
|
|
CGO_LDFLAGS: ${{ matrix.config.cgo_ldflags }}
|
|
run: |
|
|
go test ./vm ./vm/compiler/bridge ./vm/compiler
|