macOS 12 runner for GitHub Actions is deprecated #139
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: CI-Build | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
jobs: | |
build-ubuntu: | |
runs-on: ${{ matrix.cfg.os }} | |
strategy: | |
matrix: | |
cfg: | |
- { os: ubuntu-20.04, compiler: gcc-7 } | |
- { os: ubuntu-20.04, compiler: gcc } # GCC 9 | |
- { os: ubuntu-20.04, compiler: clang } # Clang 10 | |
- { os: ubuntu-22.04, compiler: gcc } # GCC 11 | |
- { os: ubuntu-22.04, compiler: clang-15 } | |
- { os: ubuntu-24.04, compiler: gcc-14 } | |
- { os: ubuntu-24.04, compiler: clang } # Clang 18 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install Compiler | |
run: | | |
sudo apt update | |
if [[ "${{ matrix.cfg.compiler }}" =~ ^gcc.*$ ]]; then | |
gxx=$(echo "${{ matrix.cfg.compiler }}" | sed -e 's,gcc,g++,') | |
sudo apt install "$gxx" | |
else | |
sudo apt install "${{ matrix.cfg.compiler }}" | |
fi | |
- name: Build and Test | |
run: | | |
export CC="${{ matrix.cfg.compiler }}" | |
export CXX="$(echo "${{ matrix.cfg.compiler }}" | sed -e 's,gcc,g++,;s,clang,clang++,')" | |
mkdir -p build && cd build | |
cmake -DCMAKE_BUILD_TYPE=Debug -DST_BUILD_TESTS=ON .. | |
make test | |
build-macos: | |
runs-on: ${{ matrix.cfg.os }} | |
strategy: | |
matrix: | |
cfg: | |
- { os: macOS-13, xcode: Xcode_14.3.1 } | |
- { os: macOS-14, xcode: Xcode_15.3 } | |
- { os: macOS-15, xcode: Xcode_16.2 } | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Build and Test | |
run: | | |
export PATH="/Applications/${{ matrix.cfg.xcode }}.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin:$PATH" | |
export CC=clang | |
export CXX=clang++ | |
mkdir -p build && cd build | |
cmake -DCMAKE_BUILD_TYPE=Debug -DST_BUILD_TESTS=ON .. | |
make test | |
build-msvc: | |
runs-on: ${{ matrix.cfg.os }} | |
strategy: | |
matrix: | |
cfg: | |
- { os: windows-2019, msvc: Visual Studio 16 2019, arch: Win32 } | |
- { os: windows-2019, msvc: Visual Studio 16 2019, arch: x64 } | |
- { os: windows-2022, msvc: Visual Studio 17 2022, arch: Win32 } | |
- { os: windows-2022, msvc: Visual Studio 17 2022, arch: x64 } | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Build and Test | |
run: | | |
mkdir build | |
cd build | |
cmake -G "${{ matrix.cfg.msvc }}" -A ${{ matrix.cfg.arch }} -DST_BUILD_TESTS=ON .. | |
cmake --build . --config Debug --target test | |
build-mingw: | |
runs-on: windows-2019 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Build and Test | |
run: | | |
mkdir build | |
cd build | |
cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Debug -DST_BUILD_TESTS=ON .. | |
mingw32-make test | |
build-msys2: | |
runs-on: windows-latest | |
strategy: | |
matrix: | |
cfg: | |
- { mingw: mingw32, arch: i686 } | |
- { mingw: mingw64, arch: x86_64 } | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install compiler and tools | |
run: | | |
$Env:Path = "C:\msys64\usr\bin;$Env:Path" | |
pacman -Sy --noconfirm mingw-w64-${{ matrix.cfg.arch }}-gcc ` | |
mingw-w64-${{ matrix.cfg.arch }}-cmake ` | |
mingw-w64-${{ matrix.cfg.arch }}-ninja | |
- name: Build and Test | |
run: | | |
mkdir build | |
cd build | |
$Env:Path = "C:\msys64\${{ matrix.cfg.mingw }}\bin;C:\msys64\usr\bin;$Env:Path" | |
cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug -DST_BUILD_TESTS=ON .. | |
ninja test | |
build-solaris: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Enable KVM group perms | |
run: | | |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules | |
sudo udevadm control --reload-rules | |
sudo udevadm trigger --name-match=kvm | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Build and Test | |
uses: vmactions/solaris-vm@v1 | |
with: | |
prepare: pkg install -q cmake gcc | |
run: | | |
mkdir -p build && cd build | |
cmake -DCMAKE_BUILD_TYPE=Debug -DST_BUILD_TESTS=ON .. | |
make test |