blob: 06a95405862c2b530af0b1b9df7845c3664af5d7 [file] [log] [blame]
name: build
on: [push]
jobs:
all:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
# os: [macos-latest, ubuntu-latest]
steps:
- name: checkout
uses: actions/checkout@v2
- name: install dependencies (Linux)
if: ${{ runner.os == 'Linux' }}
run: |
sudo apt-get install libzstd-dev
- name: install vcpkg (Windows)
if: ${{ runner.os == 'Windows' }}
uses: lukka/run-vcpkg@v6
with:
setupOnly: true
vcpkgTriplet: x64-windows
- name: install dependencies (Windows)
if: ${{ runner.os == 'Windows' }}
run: |
$VCPKG_ROOT/vcpkg update
$VCPKG_ROOT/vcpkg install zlib bzip2 liblzma zstd
shell: bash
- name: prepare build directory
run: |
cmake -E make_directory ${{runner.workspace}}/build
- name: configure (Unix)
if: ${{ runner.os != 'Windows' }}
working-directory: ${{runner.workspace}}/build
run: |
cmake ${{github.workspace}}
- name: configure (Windows)
if: ${{ runner.os == 'Windows' }}
working-directory: ${{runner.workspace}}/build
run: |
cmake -DCMAKE_TOOLCHAIN_FILE=${{env.VCPKG_ROOT}}/scripts/buildsystems/vcpkg.cmake ${{github.workspace}}
- name: build
working-directory: ${{runner.workspace}}/build
run: |
cmake --build . --config Release
- name: test
working-directory: ${{runner.workspace}}/build
run: |
ctest -v -C Release