Add vcpkg integration #18
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: [ 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 \ | |
libcurl4-openssl-dev \ | |
ninja-build | |
- name: Clone vcpkg | |
working-directory: ./examples/cmake | |
run: | | |
git clone https://github.com/microsoft/vcpkg.git | |
cd vcpkg | |
./bootstrap-vcpkg.sh | |
cd .. | |
- name: Setup Ninja | |
if: matrix.os == 'macos-latest' | |
uses: seanmiddleditch/gha-setup-ninja@master | |
- name: Configure and build | |
working-directory: ./examples/cmake | |
run: | | |
cmake -B build -S . -DCMAKE_TOOLCHAIN_FILE="vcpkg/scripts/buildsystems/vcpkg.cmake" -DVCPKG_OVERLAY_PORTS="../../ports" | |
cd build | |
cmake --build . | |
- name: Run Application | |
working-directory: ./examples/cmake/build | |
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' | |
run: | | |
ls | |
./realm_helloworld |