-
Notifications
You must be signed in to change notification settings - Fork 88
74 lines (64 loc) · 1.89 KB
/
linux-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
name: Linux
on:
push:
branches: [ master, develop ]
pull_request:
branches: [ master, develop ]
jobs:
build:
runs-on: ubuntu-20.04
strategy:
max-parallel: 3
steps:
- uses: actions/checkout@v2
- name: setup dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential cmake ccache \
cmake qt5-default qttools5-dev libqt5svg5-dev qtdeclarative5-dev libx11-xcb1 libgtest-dev
- name: ccache timestamp
id: ccache_cache_timestamp
shell: cmake -P {0}
run: |
string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
message("::set-output name=timestamp::${current_date}")
- name: ccache files
uses: actions/[email protected]
with:
path: .ccache
key: qtmvvm-ubuntu-ccache-${{ steps.ccache_cache_timestamp.outputs.timestamp }}
restore-keys: |
qtmvvm-ubuntu-ccache-
- name: build
env:
CCACHE_DIR: $GITHUB_WORKSPACE/.ccache
CCACHE_COMPRESS: "true"
CCACHE_COMPRESSLEVEL: "6"
CCACHE_MAXSIZE: "400M"
QT_QPA_PLATFORM: offscreen
run: |
cd $GITHUB_WORKSPACE && pwd && ls
mkdir build && cd build
cmake -DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache ../
make package_source
make -j4
- name: Upload tarball
uses: actions/upload-artifact@v2
if: success()
with:
name: qt-mvvm
path: ./build/qt-mvvm-*.tar.gz
- name: ctest
env:
QT_QPA_PLATFORM: offscreen
run: |
cd $GITHUB_WORKSPACE/build
ccache -s
ctest -j4
- name: upload test logs
uses: actions/upload-artifact@v2
if: failure()
with:
name: LastTest.log
path: ./build/Testing/Temporary/LastTest.log