Add vcpkg integration #33
Workflow file for this run
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: Test vcpkg integration | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
# os: [ubuntu-latest, windows-latest, macos-latest] | |
os: [ macos-latest, ubuntu-latest ] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
submodules: 'recursive' | |
- name: Install dependencies | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y \ | |
git \ | |
ninja-build | |
- name: Setup Ninja | |
if: matrix.os == 'macos-latest' | |
uses: seanmiddleditch/gha-setup-ninja@master | |
- name: Clone vcpkg | |
working-directory: ./tests/vcpkg | |
run: | | |
git clone https://github.com/microsoft/vcpkg.git | |
cd vcpkg | |
./bootstrap-vcpkg.sh | |
cd .. | |
- name: Configure and build | |
working-directory: ./tests/vcpkg | |
run: | | |
cmake -B build -S . -DCMAKE_TOOLCHAIN_FILE=vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_OVERLAY_PORTS=../../ports | |
cd build | |
cmake --build . | |
- name: Open a tmate debug session | |
if: ${{ failure() }} | |
uses: mxschmitt/action-tmate@v3 | |
with: | |
timeout-minutes: 15 | |
- name: Run Application | |
working-directory: ./tests/vcpkg/build | |
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' | |
run: | | |
./realm_helloworld |