-
Notifications
You must be signed in to change notification settings - Fork 2
122 lines (108 loc) · 3.66 KB
/
github_actions_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
name: build
on:
push:
branches:
- '*'
pull_request:
branches:
- '*'
schedule:
- cron: '16 0 * * 6' # <https://crontab.guru/#16_0_*_*_6> - "At 00:16 on Saturday."
workflow_dispatch:
jobs:
clang-format:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@master
- uses: DoozyX/[email protected]
with:
source: '.'
exclude: './lib'
inplace: True
clangFormatVersion: 9
- uses: EndBug/add-and-commit@v4
with:
author_name: Clang GitHub Action
author_email: [email protected]
message: 'r Reformat with clang-format'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
markdown-link-check:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@v1
with:
node-version: '12.x'
- name: Install markdown-link-check
run: npm i -g markdown-link-check
- name: Run markdown-link-check on *.md files
run: ./scripts/check_links.sh
build:
env:
BUILD_PATH: ${{ github.workspace }}/${{ matrix.relative_build_dir_path }}build_space
strategy:
fail-fast: false
matrix:
include:
- job-name: windows-latest
os: windows-latest
generator: '"Visual Studio 17 2022"'
relative_build_dir_path: ''
- job-name: windows-latest (clangcl)
os: windows-latest
generator: '"Visual Studio 17 2022" -T "clangcl"'
relative_build_dir_path: ''
# TODO Fix windows-2016 build: Disabled due to:
# Qt5Cored.lib(Qt5Cored.dll) : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'x86'
# - job-name: windows-2016
# os: windows-2016
# generator: '"Visual Studio 15 2017"'
# relative_build_dir_path: ''
- job-name: ubuntu-18.04
os: ubuntu-18.04
generator: '"Unix Makefiles"'
relative_build_dir_path: ''
- job-name: ubuntu-18.04-ninja
os: ubuntu-18.04
generator: '"Ninja"'
relative_build_dir_path: '../'
- job-name: macOS-latest
os: macOS-latest
generator: '"Unix Makefiles"'
relative_build_dir_path: ''
- job-name: macOS-latest-unity
os: macOS-latest
generator: '"Unix Makefiles" -DCMAKE_UNITY_BUILD=yes -DCMAKE_UNITY_BUILD_BATCH_SIZE=50'
relative_build_dir_path: ''
- job-name: macOS-latest-ninja
os: macOS-latest
generator: '"Ninja"'
relative_build_dir_path: '../'
- job-name: macOS-latest-ninja-unity
os: macOS-latest
generator: '"Ninja" -DCMAKE_UNITY_BUILD=yes -DCMAKE_UNITY_BUILD_BATCH_SIZE=50 -DCMAKE_CXX_FLAGS_INIT=-DAPPROVAL_TESTS_DISABLE_FILE_MACRO_CHECK'
relative_build_dir_path: ''
runs-on: ${{ matrix.os }}
name: ${{ matrix.job-name }}
steps:
- uses: actions/checkout@master
- uses: seanmiddleditch/gha-setup-ninja@v3
if: contains(matrix.generator, 'Ninja')
- name: install qt
uses: jurplel/install-qt-action@v2
- name: configure
run: |
mkdir ${{ env.BUILD_PATH }}
cd ${{ env.BUILD_PATH }}
cmake --version
cmake -G ${{ matrix.generator }} ${{ github.workspace }} -DCMAKE_BUILD_TYPE=Debug
- name: build
run: |
cd ${{ env.BUILD_PATH }}
cmake --build . --parallel 4
# Not running tests for now: hangs forever on Windows, and doesn't find display on other platforms
# - name: test
# run: |
# cd ${{ env.BUILD_PATH }}
# ctest --verbose --output-on-failure -C Debug