add some ideas for future changes #55
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: build | |
on: [push] | |
jobs: | |
all: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macos-latest, ubuntu-latest, windows-latest] | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v4 | |
- name: 'Environment setup (Windows)' | |
if: ${{ runner.os == 'Windows' }} | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); | |
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); | |
core.exportVariable('CMAKE_TC_ARG', '-DCMAKE_TOOLCHAIN_FILE=' + (process.env.VCPKG_INSTALLATION_ROOT || '') + '\\scripts\\buildsystems\\vcpkg.cmake'); | |
core.exportVariable('VCPKG_BINARY_SOURCES', 'clear;x-gha,readwrite'); | |
- name: 'Install dependencies: zlib (Windows)' | |
if: ${{ runner.os == 'Windows' }} | |
run: | | |
vcpkg install zlib:x64-windows | |
- name: 'Install test dependencies: nihtest' | |
run: | | |
pip install nihtest | |
- name: Configure | |
run: | | |
cmake ${{env.CMAKE_TC_ARG}} -B ${{runner.workspace}}/build -S ${{github.workspace}} | |
- name: Build | |
working-directory: ${{runner.workspace}}/build | |
run: | | |
cmake --build . --config Release | |
- name: Run tests | |
working-directory: ${{runner.workspace}}/build | |
run: | | |
ctest -C Release --output-on-failure --timeout 99 |