-
Notifications
You must be signed in to change notification settings - Fork 131
81 lines (71 loc) · 1.84 KB
/
qt5.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: build and test with Qt5
on:
pull_request:
branches: [ main ]
workflow_dispatch:
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref || github.run_id }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- name: setup environment
run: |
sudo apt-get install --no-install-recommends \
cmake \
g++ \
git \
libasio-dev \
libboost-test-dev \
libtclap-dev \
ninja-build \
nlohmann-json3-dev \
qtbase5-dev \
ruby \
ruby-dev
- name: install ruby tools
run: |
sudo gem install bundler
sudo bundle install
- 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: |
export CXXFLAGS=-Werror
cmake -E make_directory build
cmake -E chdir build cmake \
-G Ninja \
-DCUKE_ENABLE_BOOST_TEST=on \
-DCUKE_ENABLE_GTEST=on \
-DCUKE_ENABLE_QT_5=on \
-DCUKE_ENABLE_EXAMPLES=on \
-DCUKE_TESTS_UNIT=on \
..
cmake --build build --parallel --verbose
- name: unit tests
run: |
cmake --build build --target test
- name: QtCalc examples
run: |
for TEST in \
build/examples/CalcQt/GTestCalculatorQtSteps \
build/examples/CalcQt/QtTestCalculatorQtSteps \
build/examples/CalcQt/BoostCalculatorQtSteps \
; do
"${TEST}" 2> /dev/null &
sleep 1
(cd examples/CalcQt; cucumber)
wait %
done