Added windows CI #81
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 workflow | |
on: push | |
jobs: | |
cmakelint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- uses: actions/setup-python@v1 | |
- run: pip install cmakelint | |
- run: cmakelint `find . -name CMakeLists.txt` | |
cpplint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: sudo apt-get install -y cpplint | |
- run: cpplint --recursive . | |
build_and_test: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-latest | |
- macos-latest | |
compiler: | |
- g++ | |
- clang++ | |
extra_check: | |
- '' | |
include: | |
- os: windows-latest | |
compiler: '' # default | |
gtest_root_flag: "-DGTEST_ROOT=D:/gtest" | |
- os: ubuntu-latest | |
compiler: clazy | |
extra_check: clazy | |
- os: ubuntu-latest | |
compiler: clang++ | |
extra_check: clang-tidy | |
extra_check_flag: '-DCMAKE_CXX_CLANG_TIDY="/usr/bin/clang-tidy;-checks=*"' | |
- os: ubuntu-latest | |
compiler: clang++ | |
extra_check: lwyu | |
extra_check_flag: '-DCMAKE_LINK_WHAT_YOU_USE=TRUE' | |
- os: ubuntu-latest | |
compiler: clang++ | |
extra_check: iwyu | |
extra_check_flag: '-DCMAKE_CXX_INCLUDE_WHAT_YOU_USE="/usr/bin/iwyu"' | |
runs-on: ${{ matrix.os }} | |
name: ${{ matrix.extra_check || join(matrix.*) }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Ninja | |
uses: seanmiddleditch/gha-setup-ninja@master | |
- name: Install dependencies (linux) | |
if: matrix.os == 'ubuntu-latest' | |
run: sudo apt-get -y install libgl1-mesa-dev qt6-base-dev libasound2-dev | |
- name: Install dependencies (macos) | |
if: matrix.os == 'macos-latest' | |
run: brew install qt6 | |
- name: Install Qt6 (windows) | |
if: matrix.os == 'windows-latest' | |
uses: jurplel/install-qt-action@v4 | |
with: | |
aqtversion: '==3.1.*' | |
version: '6.6.0' | |
host: 'windows' | |
target: 'desktop' | |
arch: 'win64_mingw' | |
- name: Install clang (linux) | |
if: matrix.os == 'ubuntu-latest' | |
run: sudo apt-get -y install clang | |
- name: Install clang (macos) | |
if: matrix.os == 'macos-latest' && matrix.compiler == 'clang++' | |
run: brew install llvm | |
- name: Install clazy | |
if: matrix.compiler == 'clazy' | |
run: sudo apt-get -y install clazy | |
- name: Install clang-tidy | |
if: matrix.extra_check == 'cland-tidy' | |
run: sudo apt-get install -y clang-tidy | |
- name: Install IWYU | |
if: matrix.extra_check == 'iwyu' | |
run: sudo apt-get install -y iwyu | |
- name: Configure CMake | |
run: cmake -G Ninja . DCMAKE_CXX_COMPILER="${{ matrix.compiler }}" ${{matrix.extra_check_flag}} | |
- name: Build | |
run: cmake --build . | |
- name: Test | |
if: matrix.extra_check == '' | |
run: ctest |