forked from msrd0/QtWebApp
-
Notifications
You must be signed in to change notification settings - Fork 2
112 lines (100 loc) · 3.2 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
name: Build
on:
push:
branches: [main]
pull_request:
jobs:
build:
name: ${{ matrix.os }}-${{ matrix.compiler.cc }}-Qt${{ matrix.qt.version }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- "ubuntu-latest"
- "macos-latest"
compiler:
- cc: "gcc"
cxx: "g++"
- cc: "clang"
cxx: "clang++"
qt:
- version: "6.5.0"
exclude:
- os: "macos-latest"
compiler:
cc: "gcc"
steps:
- uses: actions/checkout@v2
- uses: jurplel/install-qt-action@v2
with:
version: ${{ matrix.qt.version }}
modules: qt5compat
- name: Build QtWebApp
run: |
if [ "${{ matrix.os }}" == "ubuntu-latest" ] && [ "$CC" == "clang" ]; then export LDFLAGS=-fuse-ld=lld; fi
mkdir build
pushd build
cmake -G 'Unix Makefiles' -DWITH_TEMPLATEENGINE=on -DCMAKE_BUILD_TYPE=Release ..
make
sudo make install
popd # build
env:
CC: ${{ matrix.compiler.cc }}
CXX: ${{ matrix.compiler.cxx }}
- name: Build Demo1
run: |
if [ "${{ matrix.os }}" == "ubuntu-latest" ] && [ "$CC" == "clang" ]; then export LDFLAGS=-fuse-ld=lld; fi
pushd Demo1
mkdir build
pushd build
cmake -G 'Unix Makefiles' ..
make
popd # Demo1
env:
CC: ${{ matrix.compiler.cc }}
CXX: ${{ matrix.compiler.cxx }}
- name: Build Demo2
run: |
if [ "${{ matrix.os }}" == "ubuntu-latest" ] && [ "$CC" == "clang" ]; then export LDFLAGS=-fuse-ld=lld; fi
pushd Demo2
mkdir build
pushd build
cmake -G 'Unix Makefiles' ..
make
popd # Demo2
env:
CC: ${{ matrix.compiler.cc }}
CXX: ${{ matrix.compiler.cxx }}
windows-mingw:
name: "Windows"
runs-on: windows-2019
strategy:
matrix:
include:
- name: Windows MSVC 2019
arch: win64_msvc2019_64
generator: ""
qt_version: "6.5.0"
steps:
- uses: actions/checkout@v2
- uses: jurplel/install-qt-action@v2
with:
arch: ${{ matrix.arch }}
version: ${{ matrix.qt_version }}
modules: qt5compat
- uses: jurplel/install-qt-action@v2
if: matrix.arch == 'win32_mingw81'
with:
tools-only: 'true'
tools: 'tools_mingw,8.1.0-1-202004170606,qt.tools.win32_mingw810'
- name: Add g++ to PATH
if: matrix.arch == 'win32_mingw81'
run: echo "$env:IQTA_TOOLS/mingw810_32/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- run: cmake -B build-qtwebapp ${{ matrix.generator }} -DCMAKE_BUILD_TYPE=Release -DWITH_TEMPLATEENGINE=on
- run: cmake --build build-qtwebapp
- run: cmake --build build-qtwebapp --target install
- run: cmake -S Demo1 -B build-demo1 ${{ matrix.generator }}
- run: cmake --build build-demo1
- run: cmake -S Demo2 -B build-demo2 ${{ matrix.generator }}
- run: cmake --build build-demo2