Skip to content

docs: add Google Analytics tracking ID to site configuration #54

docs: add Google Analytics tracking ID to site configuration

docs: add Google Analytics tracking ID to site configuration #54

name: Build and Test (Linux/macOS/Windows)
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:
jobs:
multi-platform-build:
runs-on: ${{matrix.config.os}}
strategy:
matrix:
config:
- os: ubuntu-latest
vcpkg_triplet: x64-linux-release
- os: macos-latest
vcpkg_triplet: arm64-osx-release
- os: windows-latest
vcpkg_triplet: x64-windows-release
steps:
- uses: actions/checkout@v4
- name: Set up GitHub Cache (Windows)
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 || '');
if: matrix.config.os == 'windows-latest'
- name: Install Catch2 via vcpkg (Windows)
run: vcpkg install catch2 --binarysource="clear;x-gha,readwrite"
if: matrix.config.os == 'windows-latest'
- name: Install gnuplot (Linux)
run: |
sudo apt-get update && \
sudo apt-get upgrade -y && \
sudo apt-get install -y gnuplot
if: matrix.config.os == 'ubuntu-latest'
- name: Install gnuplot (Windows)
run: |
choco install gnuplot
if: matrix.config.os == 'windows-latest'
- name: Install gnuplot (macOS)
run: |
brew install gnuplot
if: matrix.config.os == 'macos-latest'
- name: vcpkg build (Linux/macOS)
uses: johnwason/vcpkg-action@v6
id: vcpkg
with:
pkgs: catch2
triplet: ${{ matrix.config.vcpkg_triplet }}
cache-key: ${{ matrix.config.os }}
revision: master
token: ${{ github.token }}
github-binarycache: true
if: matrix.config.os == 'ubuntu-latest' || matrix.config.os == 'macos-latest'
- name: Configure with CMake (Linux/macOS)
run: |
cmake ${{ steps.vcpkg.outputs.vcpkg-cmake-config }} -S ${{ github.workspace }} -B build
if: matrix.config.os == 'ubuntu-latest' || matrix.config.os == 'macos-latest'
- name: Configure with CMake (Windows)
run: |
cmake -S ${{github.workspace}} -B build -DCMAKE_TOOLCHAIN_FILE="$Env:VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake"
if: matrix.config.os == 'windows-latest'
- name: Build
run: cmake --build build
- name: Test (Linux and macOS)
working-directory: ${{github.workspace}}/build
run: ctest --output-on-failure
if: matrix.config.os == 'ubuntu-latest' || matrix.config.os == 'macos-latest'
- name: Test (Windows)
working-directory: ${{github.workspace}}/build
run: ctest --output-on-failure
env:
G3P_GNUPLOT_PATH: "C:/Program Files/gnuplot/bin/gnuplot.exe"
if: matrix.config.os == 'windows-latest'