Skip to content

Feature/nav 85 setup package manager #89

Feature/nav 85 setup package manager

Feature/nav 85 setup package manager #89

Workflow file for this run

name: CMake Build Matrix
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, macos-latest] # , ubuntu-latest
include:
- os: windows-latest
compiler: msvc
# - os: ubuntu-latest
# compiler: gcc
- os: macos-latest
compiler: clang
steps:
- name: Checkout code
uses: actions/[email protected]
- name: Install Ninja
shell: bash
run: |
if [[ "${{ runner.os }}" == "Windows" ]]; then
choco install ninja --yes --force
elif [[ "${{ runner.os }}" == "Linux" ]]; then
sudo apt-get install -y ninja-build
elif [[ "${{ runner.os }}" == "macOS" ]]; then
brew upgrade ninja || brew install ninja
fi
- name: Install LLVM (macOS only)
if: matrix.os == 'macos-latest'
run: |
brew install llvm
echo "/usr/local/opt/llvm/bin" >> $GITHUB_PATH
- name: Cache vcpkg
uses: actions/[email protected]
with:
path: |
vcpkg
vcpkg_installed
key: ${{ runner.os }}-vcpkg-${{ hashFiles('**/vcpkg.json') }}
- name: vcpkg installation
shell: bash
run: |
git clone https://github.com/microsoft/vcpkg.git
cd vcpkg
if [[ "${{ runner.os }}" == "Windows" ]]; then
./bootstrap-vcpkg.bat
else
./bootstrap-vcpkg.sh
fi
./vcpkg integrate install
./vcpkg install
- name: Configure CMake
run: |
if [[ "${{ runner.os }}" == "macOS" ]]; then
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_CXX_COMPILER=/usr/local/opt/llvm/bin/clang++
else
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake
fi
- name: Build
run: |
cmake --build build --config Release