Skip to content

Commit

Permalink
Merge pull request #282 from ursfassler/build-with-different-compiler…
Browse files Browse the repository at this point in the history
…-and-standards

test compilation with different compilers and language standards on Linux
  • Loading branch information
ursfassler authored Jan 4, 2024
2 parents 4b0eb60 + bda863e commit 6071834
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 1 deletion.
70 changes: 70 additions & 0 deletions .github/workflows/linux-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Linux build

on:
pull_request:
branches: [ main ]
workflow_dispatch:
push:
branches:
- main

jobs:
build:
strategy:
matrix:
cpp-compiler:
- g++
- clang++-15
cpp-standard:
- 17
- 20

runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v2

- name: setup environment
run: |
sudo apt-get install --no-install-recommends \
clang-15 \
cmake \
g++ \
git \
libasio-dev \
libboost-test-dev \
libtclap-dev \
ninja-build \
nlohmann-json3-dev \
qtbase5-dev
- name: install gtest
run: |
git clone https://github.com/google/googletest.git
cd googletest
mkdir build
cd build
cmake \
..
cmake --build . --parallel
sudo cmake --install .
- name: build
run: |
cmake -E make_directory build
cmake -E chdir build cmake \
-DCMAKE_CXX_COMPILER=${{ matrix.cpp-compiler }} \
-DCMAKE_CXX_STANDARD=${{ matrix.cpp-standard }} \
-G Ninja \
-DCUKE_ENABLE_BOOST_TEST=on \
-DCUKE_ENABLE_GTEST=on \
-DCUKE_ENABLE_QT=on \
-DCUKE_ENABLE_EXAMPLES=on \
-DCUKE_TESTS_UNIT=on \
..
cmake --build build --parallel --verbose
- name: unit tests
run: |
cmake --build build --target test
1 change: 0 additions & 1 deletion examples/CalcQt/src/CalculatorWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ CalculatorWidget::CalculatorWidget(QWidget* parent) :
displayLabel->setAutoFillBackground(true);
displayLabel->setBackgroundRole(QPalette::Base);
displayLabel->setAlignment(Qt::AlignRight);
displayLabel->setFrameStyle(QFrame::Panel | QFrame::Sunken);
policy = displayLabel->sizePolicy();
policy.setVerticalPolicy(QSizePolicy::Fixed);
displayLabel->setSizePolicy(policy);
Expand Down

0 comments on commit 6071834

Please sign in to comment.