Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 69 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: CI

on:
push:
branches: ["master"]
pull_request:
branches: ["master"]

jobs:
test:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false

matrix:
include:
- name: Windows x64 / MSVC
os: windows-latest
preset: msvc-x64
vcpkg_triplet: x64-windows

- name: Windows x64 / Clang
os: windows-latest
preset: llvm-x64
vcpkg_triplet: x64-windows

- name: Windows ARM64 / MSVC
os: windows-11-arm
preset: msvc-arm64
vcpkg_triplet: arm64-windows

- name: Linux x64 / GCC
os: ubuntu-latest
preset: gcc-linux-x64
vcpkg_triplet: x64-linux-dynamic

- name: Linux ARM64 / GCC
os: ubuntu-24.04-arm
preset: gcc-linux-arm64
vcpkg_triplet: arm64-linux

- name: macOS ARM64 / AppleClang
os: macos-latest
preset: apple-clang-macos-arm64
vcpkg_triplet: arm64-osx

steps:
- uses: actions/checkout@v4

- name: Set VCPKG_ROOT
shell: bash
run: echo "VCPKG_ROOT=$VCPKG_INSTALLATION_ROOT" >> $GITHUB_ENV

- name: Install GTest
run: vcpkg install gtest:${{ matrix.vcpkg_triplet }}

- name: Configure
working-directory: tests/unittest
run: cmake --preset ${{ matrix.preset }}

- name: Build
working-directory: tests/unittest
run: cmake --build --preset ${{ matrix.preset }} --config Release

- name: Test
working-directory: tests/unittest/build/${{ matrix.preset }}
run: ctest --build-config Release --output-on-failure
76 changes: 55 additions & 21 deletions tests/CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,18 @@
"VCPKG_TARGET_TRIPLET": "x86-windows"
}
},
{
"name": "msvc-arm64",
"inherits": "base-release",
"displayName": "MSVC ARM64 Release",
"binaryDir": "${sourceDir}/build/msvc-arm64",
"toolset": "v143",
"architecture": "ARM64",
"cacheVariables": {
"CMAKE_MSVC_RUNTIME_LIBRARY": "MultiThreadedDLL",
"VCPKG_TARGET_TRIPLET": "arm64-windows"
}
},
{
"name": "llvm-x64",
"inherits": "base-release",
Expand Down Expand Up @@ -84,32 +96,54 @@
"CMAKE_CXX_FLAGS": "-m32 -msse -msse2",
"VCPKG_TARGET_TRIPLET": "x86-linux"
}
}
],
"buildPresets": [
{
"name": "msvc-x64",
"configurePreset": "msvc-x64"
},
{
"name": "msvc-x86",
"configurePreset": "msvc-x86"
},
{
"name": "llvm-x64",
"configurePreset": "llvm-x64"
},
{
"name": "gcc-mingw-x64",
"configurePreset": "gcc-mingw-x64"
"name": "clang-linux-x64",
"inherits": "base-release",
"displayName": "Clang Linux x64 Release",
"binaryDir": "${sourceDir}/build/clang-linux-x64",
"generator": "Ninja",
"cacheVariables": {
"CMAKE_C_COMPILER": "clang",
"CMAKE_CXX_COMPILER": "clang++",
"VCPKG_TARGET_TRIPLET": "x64-linux-dynamic"
}
},
{
"name": "gcc-linux-x64",
"configurePreset": "gcc-linux-x64"
"name": "gcc-linux-arm64",
"inherits": "base-release",
"displayName": "GCC Linux ARM64 Release",
"binaryDir": "${sourceDir}/build/gcc-linux-arm64",
"generator": "Ninja",
"cacheVariables": {
"CMAKE_C_COMPILER": "gcc",
"CMAKE_CXX_COMPILER": "g++",
"VCPKG_TARGET_TRIPLET": "arm64-linux"
}
},
{
"name": "gcc-linux-x86",
"configurePreset": "gcc-linux-x86"
"name": "apple-clang-macos-arm64",
"inherits": "base-release",
"displayName": "Apple Clang macOS ARM64 Release",
"binaryDir": "${sourceDir}/build/apple-clang-macos-arm64",
"generator": "Ninja",
"cacheVariables": {
"CMAKE_C_COMPILER": "clang",
"CMAKE_CXX_COMPILER": "clang++",
"VCPKG_TARGET_TRIPLET": "arm64-osx"
}
}
],
"buildPresets": [
{ "name": "msvc-x64", "configurePreset": "msvc-x64" },
{ "name": "msvc-x86", "configurePreset": "msvc-x86" },
{ "name": "msvc-arm64", "configurePreset": "msvc-arm64" },
{ "name": "llvm-x64", "configurePreset": "llvm-x64" },
{ "name": "gcc-mingw-x64", "configurePreset": "gcc-mingw-x64" },
{ "name": "gcc-linux-x64", "configurePreset": "gcc-linux-x64" },
{ "name": "gcc-linux-x86", "configurePreset": "gcc-linux-x86" },
{ "name": "clang-linux-x64", "configurePreset": "clang-linux-x64" },
{ "name": "gcc-linux-arm64", "configurePreset": "gcc-linux-arm64" },
{ "name": "apple-clang-macos-arm64", "configurePreset": "apple-clang-macos-arm64" }
]
}
}
Loading