Coding style #233
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 | |
on: | |
push: | |
pull_request: | |
branches: [master] | |
env: | |
CMAKE_BUILD_TYPE: Release | |
INSTALL_LOCATION: .local | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
build_static: [ON, OFF] | |
build_shared: [ON, OFF] | |
toolchain: | |
[ | |
{ | |
name: "Ubuntu GCC (Qt5)", | |
cxx: "g++-11", | |
cc: "gcc-11", | |
packages: "gcc-11 g++-11 libspdlog-dev libfmt-dev qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools", | |
os: ubuntu-22.04, | |
}, | |
{ | |
name: "Ubuntu GCC (Qt6)", | |
cxx: "g++-11", | |
cc: "gcc-11", | |
packages: "gcc-11 g++-11 libspdlog-dev libfmt-dev qt6-base-dev libglx-dev libgl1-mesa-dev", | |
os: ubuntu-22.04, | |
} | |
] | |
exclude: | |
- build_static: OFF | |
build_shared: OFF | |
continue-on-error: false | |
runs-on: ${{ matrix.toolchain.os }} | |
env: | |
CC: ${{ matrix.toolchain.cc }} | |
CXX: ${{ matrix.toolchain.cxx }} | |
name: "${{ matrix.toolchain.name }} (static: ${{matrix.build_static}}; shared: ${{ matrix.build_shared }})" | |
if: "!contains(github.event.head_commit.message, '[ci skip]')" | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install Ninja | |
uses: seanmiddleditch/gha-setup-ninja@master | |
- name: Install packages (via apt) | |
if: runner.os == 'Linux' | |
run: | | |
sudo apt update | |
sudo apt install ${{ matrix.toolchain.packages }} -y | |
- name: Configure | |
run: cmake -Bbuild -GNinja -DQSCHEMATIC_BUILD_STATIC=${{ matrix.build_static }} -DQSCHEMATIC_BUILD_SHARED=${{ matrix.build_shared }} -DQSCHEMATIC_BUILD_DEMO=ON -DQSCHEMATIC_DEPENDENCY_GPDS_DOWNLOAD=ON | |
- name: Build | |
run: cmake --build build | |
# ToDo: Use CTest instead | |
- name: Run tests | |
run: ./build/qschematic/wire_system/test/qschematic-wiresystem-tests |