Skip to content

Install prerequisites via GitHub actions #37

Install prerequisites via GitHub actions

Install prerequisites via GitHub actions #37

name: Build Pipeline
on:
push:
branches:
- development
paths-ignore:
- ".clang-format"
- ".clang-tidy"
- ".editorconfig"
- ".gitignore"
- "README.md"
pull_request:
branches:
- development
paths-ignore:
- ".clang-format"
- ".clang-tidy"
- ".editorconfig"
- ".gitignore"
- "README.md"
jobs:
build:
env:
VCPKG_BINARY_SOURCES: 'clear;nuget,GitHub,readwrite'
VCPKG_DISABLE_METRICS: ON
strategy:
matrix:
os: [ macos-latest, ubuntu-latest, windows-latest ]
include:
- mono: "mono"
os: "macos-latest"
triplet: "x64-osx"
- mono: "mono"
os: "ubuntu-latest"
triplet: "x64-linux"
- mono: ""
os: "windows-latest"
triplet: "x64-windows"
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
steps:
- name: Install doxygen
uses: ssciwr/doxygen-install@v1
with:
version: "1.9.7"
- name: Install ninja
uses: daehlith/ninja-install@v1
- name: Checkout
uses: actions/checkout@v3
- name: "Setup NuGet Credentials"
run: |
${{ matrix.mono }} `$VCPKG_INSTALLATION_ROOT/vcpkg fetch nuget | tail -n 1` \
sources add \
-source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" \
-storepasswordincleartext \
-name "GitHub" \
-username "${{ github.repository_owner }}" \
-password "${{ secrets.GITHUB_TOKEN }}"
${{ matrix.mono }} `$VCPKG_INSTALLATION_ROOT/vcpkg fetch nuget | tail -n 1` \
setapikey "${{ secrets.GITHUB_TOKEN }}" \
-source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json"
- name: Setup MSVC environment
if: runner.os == 'Windows'
uses: ilammy/msvc-dev-cmd@v1
- name: Configure
env:
VCPKG_DEFAULT_TRIPLET: ${{ matrix.triplet }}
run: cmake --preset "ninja-multi-config" -DCMAKE_TOOLCHAIN_FILE=$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake
- name: Build
run: cmake --build --preset "ninja-multi-config-release"
- name: Test
run: ctest --preset "ninja-multi-config-release"