CI: add more compilers #212
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: "Build tools" | |
on: | |
pull_request: | |
paths-ignore: | |
- 'spectool/**' | |
jobs: | |
build_tools: | |
name: Build all tools for ${{ matrix.target.name }} | |
runs-on: ${{ matrix.target.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
target: [ | |
{"name": "Linux GCC 14", "os": "ubuntu-latest", "cmake_env": "CC=gcc-14"}, | |
{"name": "Linux Clang 18", "os": "ubuntu-latest", "cmake_env": "CC=clang-18"}, | |
{"name": "Linux GCC 7", "os": "ubuntu-20.04", "cmake_env": "CC=gcc-7", "install": "gcc-7"}, | |
{"name": "Linux Clang 7", "os": "ubuntu-20.04", "cmake_env": "CC=clang-7", "install": "clang-7"}, | |
{"name": "macOS arm64", "os": "macos-15", "cmake_env": "CMAKE_OSX_ARCHITECTURES=arm64"}, | |
{"name": "macOS x86_64", "os": "macos-15", "cmake_env": "CMAKE_OSX_ARCHITECTURES=x86_64"}, | |
{"name": "Windows", "os": "windows-latest"}, | |
{"name": "Windows Arm64", "os": "windows-latest", "cmake_options": "-A arm64"}, | |
{"name": "Windows Clang-CL", "os": "windows-latest", "cmake_options": "-T ClangCl"}, | |
{"name": "WinArm64 Clang-CL","os": "windows-latest", "cmake_options": "-T ClangCl -A arm64"}, | |
] | |
env: | |
CMAKE_OPTIONS: -DDEV_MODE=ON ${{ matrix.target.cmake_options }} | |
CMAKE_ENV: ${{ matrix.target.cmake_env }} | |
steps: | |
- name: list compilers | |
if: ${{ contains(matrix.target.os, 'ubuntu') }} | |
run: dpkg --list | grep compiler | |
- name: intall compilers | |
if: ${{ contains(matrix.target.os, 'ubuntu') && matrix.target.install != '' }} | |
run: | | |
sudo add-apt-repository --yes --update ppa:ubuntu-toolchain-r/test | |
sudo DEBIAN_FRONTEND=noninteractive apt-get install -yq --no-install-recommends ${{ matrix.target.install }} | |
- name: Get pushed code | |
uses: actions/checkout@v4 | |
- name: Configure CMake | |
run: ${{ env.CMAKE_ENV }} cmake -S . -B _build ${{ env.CMAKE_OPTIONS }} | |
- name: Build with CMake | |
run: cmake --build _build --config Debug --parallel | |
- name: Test installation | |
run: | | |
cmake --install _build --config Debug --prefix _built |