-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (63 loc) · 2.24 KB
/
ci-win.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
name: ci-windows
on:
push:
branches: [ "dev" ]
pull_request:
branches: [ "dev" ]
# Allows you to run this workflow manually from the Actions tab.
workflow_dispatch:
jobs:
build:
name: ${{ matrix.config.name }}
runs-on: windows-2019
timeout-minutes: 120
strategy:
matrix:
build_type: [Release]
install_path: [installed]
c_compiler: [cl]
cpp_compiler: [cl]
arch: [win64_msvc2019_64]
platform: [x64]
qt: [6.5.2]
qt_modules: [qtwebengine qtwebchannel qtpositioning qtpdf qtimageformats qt5compat]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Init Submodules
shell: bash
run: |
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
git submodule sync --recursive
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive
# - name: Cache Qt
# id: cache-qt
# uses: actions/cache@v1 # not v2!
# with:
# path: ../Qt
# key: ${{runner.os}}-${{matrix.arch}}-QtCache-${{matrix.qt}}
# - name: Install Qt Official Build
# uses: jurplel/install-qt-action@v3
# with:
# version: ${{matrix.qt}}
# target: desktop
# arch: ${{matrix.arch}}
# modules: ${{matrix.qt_modules}}
# cache: 'true'
- name: Configure CMake
run: >
cmake -B ${{ github.workspace }}/build
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-DCMAKE_INSTALL_PREFIX=${{ matrix.install_path }}
-S ${{ github.workspace }}
- name: Build Project
run: cmake --build ${{ github.workspace }}/build --config ${{ matrix.build_type }} --target all_build --
- name: Install Project
run: cmake --build ${{ github.workspace }}/build --config ${{ matrix.build_type }} --target install --
# when stable to test
# - name: Test
# working-directory: ${{ github.workspace }}/build
# run: ctest --build-config ${{ matrix.build_type }}