-
-
Notifications
You must be signed in to change notification settings - Fork 112
125 lines (120 loc) · 3.59 KB
/
build.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
name: CI
on:
push:
branches:
- master
- develop
pull_request:
branches:
- master
- develop
env:
CLAZY_CHECKS: "level1"
jobs:
linux:
if: "!contains(github.event.head_commit.message, 'ci skip')"
strategy:
matrix:
compiler:
- gcc
- clang
container:
- suse-qt515
runs-on: ubuntu-latest
container:
image: liridev/${{ matrix.container }}
steps:
- name: Extract branch name
id: extract_branch
shell: bash
run: |
if [ -n "${{ github.base_ref }}" ]; then
echo "##[set-output name=branch;]${{ github.base_ref }}"
else
github_ref=${{ github.ref }}
echo "##[set-output name=branch;]${github_ref##*/}"
fi
- name: Qt version identifier
id: qt_version
shell: bash
run: |
qtverid=`echo "${{ matrix.container }}" | sed -e 's,suse-qt,,g'`
echo "##[set-output name=id;]${qtverid}"
- uses: actions/checkout@v2
- name: Build dependencies
run: |
set -x
./.github/workflows/scripts/build-deps ${{ steps.extract_branch.outputs.branch }}
- name: Build
run: |
set -x
mkdir -p build
cd build
# OpenSuSE containers don't have any documentation
if [ "${{ matrix.compiler }}" == "clang" ]; then
export CC=clang
export CXX=clang++
cmake .. -DLIRI_ENABLE_CLAZY:BOOL=ON -DCMAKE_INSTALL_PREFIX=/usr -DFLUID_WITH_DOCUMENTATION:BOOL=OFF
else
cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DFLUID_WITH_DOCUMENTATION:BOOL=OFF
fi
make -j $(getconf _NPROCESSORS_ONLN)
sudo make install
- name: Test
run: |
set -x
cd build
dbus-run-session -- xvfb-run -a -s "-screen 0 800x600x24" ctest -V
# Build documentation under Ubuntu
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Install dependencies
run: |
set -x
wget -qO - 'http://archive.neon.kde.org/public.key' | sudo apt-key add -
sudo apt-add-repository http://archive.neon.kde.org/user
sudo apt-get update -y
sudo apt-get install -y qtbase5-dev qtdeclarative5-dev qtquickcontrols2-5-dev qttools5-dev libqt5svg5-dev qdoc-qt5 qt5-doc qtbase5-doc
- name: Build
run: |
set -x
mkdir -p build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DFLUID_WITH_DOCUMENTATION:BOOL=ON -DFLUID_WITH_DEMO:BOOL=OFF -DFLUID_WITH_QML_MODULES:BOOL=OFF -DFLUID_INSTALL_ICONS:BOOL=OFF
make -j $(getconf _NPROCESSORS_ONLN)
sudo make install
windows:
if: "!contains(github.event.head_commit.message, 'ci skip')"
strategy:
matrix:
compiler:
- win32_msvc2017
qt:
- 5.12.8
runs-on: windows-2016
steps:
- name: Cache Qt
id: cache-qt
uses: actions/cache@v1
with:
path: ../Qt
key: ${{ runner.os }}-QtCache-${{ matrix.qt }}
- name: Install Qt
uses: jurplel/install-qt-action@v2
with:
version: ${{ matrix.qt }}
arch: ${{ matrix.compiler }}
cached: ${{ steps.cache-qt.outputs.cache-hit }}
- uses: actions/checkout@v2
with:
submodules: true
- name: Build
run: |
mkdir build
cd build
cmake .. -DFLUID_WITH_DOCUMENTATION:BOOL=OFF
cmake --build .