Use vcpkg for providing dependencies. #288
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: Mac build & tests | |
on: [push, pull_request, workflow_dispatch] | |
env: | |
BUILD_TYPE: Release # Change build type here. | |
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite" | |
VCPKG_ROOT: '${{ github.workspace }}/vcpkg' | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ macos-12 ] | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Export GitHub Actions cache environment variables | |
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 || ''); | |
- name: Prepare dependencies | |
shell: bash | |
run: | | |
./vcpkg/bootstrap-vcpkg.sh -disableMetrics | |
brew reinstall autoconf | |
brew install automake autoconf-archive | |
- name: Build | |
shell: bash | |
run: | | |
cd build | |
cmake .. | |
cmake --build . --config $BUILD_TYPE --target Degate | |
env: | |
BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }} | |
- name: Tests | |
shell: bash | |
run: | | |
cd build | |
cmake .. -DBUILD_TESTS=1 | |
cmake --build . --config $BUILD_TYPE --target DegateTests | |
cd tests/out/bin | |
./DegateTests | |
- name: Upload vcpkg build logs | |
if: failure() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: 'vcpkg-buildlogs-${{ matrix.triplet }}' | |
path: ${{ env.VCPKG_ROOT }}/buildtrees/**/*.log | |