-
-
Notifications
You must be signed in to change notification settings - Fork 32
158 lines (144 loc) · 4.7 KB
/
main.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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
name: CI
on:
push:
branches: [ master, ci-sandbox ]
# pull_request:
# branches: [ master ]
jobs:
build-qmake:
strategy:
matrix:
os: [macos-latest]
runs-on: ${{ matrix.os }}
env:
QT_VERSION: '6.8.1'
steps:
- name: Look for cached Qt ${{ env.QT_VERSION }}
id: cache-qt
uses: actions/[email protected]
with:
path: ${{ runner.workspace }}/Qt${{ env.QT_VERSION }}
key: ${{ runner.os }}-Qt${{ env.QT_VERSION }}
- name: Install Qt ${{ env.QT_VERSION }}
uses: jurplel/install-qt-action@v4
with:
version: ${{ env.QT_VERSION }}
dir: ${{ runner.workspace }}/Qt${{ env.QT_VERSION }}
cached: ${{ steps.cache-qt.outputs.cache-hit }}
- name: Checkout sources
uses: actions/[email protected]
- name: configure
run: qmake
- name: make
run: make
build:
# name: build ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest]
arch: [x64, x86]
qt: ['6.8.1']
exclude:
- os: macos-latest
arch: x86
# - os: ubuntu-latest
# arch: x86
# - os: windows-latest
# arch: x86
include:
- os: macos-latest
triplet: x64-osx
vcpkg_packages: 'zlib'
# - os: ubuntu-latest
# arch: x64
# triplet: x64-linux
# vcpkg_packages: 'zlib'
# - os: windows-latest
# arch: x64
# triplet: x64-windows
# qt_arch: win64_msvc2017_64
# vcpkg_packages: 'zlib'
# - os: windows-latest
# arch: x86
# triplet: x86-windows
# qt_arch: win32_msvc2017
# vcpkg_packages: 'zlib'
env:
VCPKG_COMMIT_ID: 'c7ab9d3110813979a873b2dbac630a9ab79850dc' # tag 2020.04
steps:
- name: Install pulseaudio
if: ${{ runner.os == 'Linux' }}
run: brew install pulseaudio
- name: Look for cached Qt ${{ matrix.qt }}
id: cache-qt
uses: actions/[email protected]
with:
path: ${{ runner.workspace }}/Qt${{ matrix.qt }}-${{ matrix.arch }}
key: Qt-${{ runner.os }}-${{ matrix.qt }}-${{ matrix.arch }}
- name: Install Qt ${{ matrix.qt }}
uses: jurplel/install-qt-action@v4
with:
version: ${{ matrix.qt }}
arch: ${{ matrix.qt_arch }}
dir: ${{ runner.workspace }}/Qt${{ matrix.qt }}-${{ matrix.arch }}
cached: ${{ steps.cache-qt.outputs.cache-hit }}
- name: Checkout sources
uses: actions/[email protected]
# see example at https://github.com/lukka/CppBuildTasks-Validation/blob/master/.github/workflows/hosted-basic.yml
- uses: lukka/get-cmake@latest
#- name: dir
# run: gci -recurse ${{ runner.workspace }}
- name: Restore artifacts, or run vcpkg, build and cache artifacts
uses: lukka/run-vcpkg@v2
id: runvcpkg
with:
vcpkgArguments: '${{ matrix.vcpkg_packages }}'
vcpkgTriplet: ${{ matrix.triplet }}
vcpkgDirectory: ${{ runner.workspace }}/b/vcpkg
vcpkgGitCommitId: ${{ env.VCPKG_COMMIT_ID }}
#- name: Prints outputs of run-vcpkg task
#run: echo "'${{ steps.runvcpkg.outputs.RUNVCPKG_VCPKG_ROOT_OUT }}' '${{ steps.runvcpkg.outputs.RUNVCPKG_VCPKG_TRIPLET_OUT }}' "
- name: configure && make
uses: lukka/run-cmake@v2
id: runcmake_cmd
with:
cmakeGenerator: Ninja
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced
useVcpkgToolchainFile: true
cmakeAppendedArgs: ${{ matrix.cmakeConfigureArgs }}
vcpkgTriplet: ${{ steps.runvcpkg.outputs.RUNVCPKG_VCPKG_TRIPLET_OUT }}
buildDirectory: '${{ runner.workspace }}/b/ninja/'
- name: make test
if: ${{ runner.os != 'Windows' }}
run: cd '${{ runner.workspace }}/b/ninja' && ctest -V
build-min:
runs-on: ubuntu-16.04
env:
QT_VERSION: '5.7'
steps:
- name: Cache Qt ${{ env.QT_VERSION }}
id: cache-qt
uses: actions/[email protected]
with:
path: ${{ runner.workspace }}/Qt${{ env.QT_VERSION }}
key: ${{ runner.os }}-Qt${{ env.QT_VERSION }}
- name: Install Qt ${{ env.QT_VERSION }}
uses: jurplel/install-qt-action@v4
with:
version: ${{ env.QT_VERSION }}
dir: ${{ runner.workspace }}/Qt${{ env.QT_VERSION }}
cached: ${{ steps.cache-qt.outputs.cache-hit }}
- name: Checkout sources
uses: actions/[email protected]
- name: configure
run: >-
cmake -S . -B _build
-DENABLE_SOUNDS=OFF
-DENABLE_TTS=OFF
-DENABLE_SCID_SUPPORT=OFF
- name: make
run: cmake --build _build
- name: make test
run: cd _build && ctest -V