| 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 dependencies (Windows) |
| if: ${{ runner.os == 'Windows' }} |
| uses: lukka/run-vcpkg@v6 |
| id: runvcpkg |
| with: |
| vcpkgGitCommitId: 0bf3923f9fab4001c00f0f429682a0853b5749e0 |
| vcpkgTriplet: x64-windows |
| vcpkgArguments: zlib |
| - 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=$VCPKG_ROOT/vcpkg.cmake ${{github.workspace}} |
| - name: build |
| working-directory: ${{runner.workspace}}/build |
| run: | |
| cmake --build . |
| - name: test |
| working-directory: ${{runner.workspace}}/build |
| run: | |
| ctest -v |