2024-08-20 10:05:49 +02:00

47 lines
1.6 KiB
YAML

name: Tests
on: [push, pull_request]
jobs:
test:
strategy:
matrix:
platform:
- {
icon: 🐧,
label: Linux,
os: ubuntu,
shell: bash --noprofile --norc -eo pipefail
}
- {
icon: 🍎,
label: macOS,
os: macos,
shell: bash --noprofile --norc -eo pipefail
}
- {
icon: 🏁,
label: Windows,
os: windows,
shell: msys2
}
nim: [1.6.18]
name: ${{ matrix.platform.icon }} ${{ matrix.platform.label }} - Nim v${{ matrix.nim }}
runs-on: ${{ matrix.platform.os }}-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: iffy/install-nim@v4
with:
version: ${{ matrix.nim }}
- name: Install
run: nimble install -y
- name: Build and run tests
run: |
if [[ ${{ matrix.platform.os }} = macos ]]; then
export PATH="$(brew --prefix llvm@14)/bin:${PATH}"
export LDFLAGS="-L$(brew --prefix libomp)/lib -L$(brew --prefix llvm@14)/lib -Wl,-rpath,$(brew --prefix llvm@14)/lib"
compiler_extra_options="-d:LeopardCmakeFlags='-DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=$(brew --prefix llvm@14)/bin/clang -DCMAKE_CXX_COMPILER=$(brew --prefix llvm@14)/bin/clang++' -d:LeopardExtraCompilerlags='-fopenmp' -d:LeopardExtraLinkerFlags='-fopenmp -L$(brew --prefix libomp)/lib'"
fi
eval nimble --verbose test -d:release --mm:refc ${compiler_extra_options}
eval nimble --verbose test -d:release --mm:orc ${compiler_extra_options}