-
Notifications
You must be signed in to change notification settings - Fork 204
123 lines (99 loc) · 3.35 KB
/
cmake.yaml
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
name: CMake
on: [ push, pull_request ]
env:
BUILD_TYPE: Release
MSYS: D:\msys2
jobs:
build:
strategy:
matrix:
os: [ ubuntu, macos, windows ]
qt: [ "5.15.2", "6.6.2" ]
include:
- os: ubuntu
generator: Unix Makefiles
openssl_root: /usr
artifact: build/xca-*-Linux.tar.gz
host: linux
runs: ubuntu-latest
- os: macos
generator: Unix Makefiles
openssl_root: /opt/homebrew/opt/openssl
artifact: build/xca-*.dmg
host: mac
runs: macos-latest
- os: windows
generator: MinGW Makefiles
openssl_root: D:\msys2\msys64\mingw64
artifact: |
build/xca-*.msi
build/xca-portable-*.zip
host: windows
- os: windows
qt: "5.15.2"
winarch: win64_mingw81
runs: windows-2019
exclude:
- os: windows
qt: "6.6.2"
- os: macos
qt: "5.15.2"
runs-on: ${{matrix.runs}}
steps:
- name: Install Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install Sphinx
run: |
python -m pip install --upgrade pip
pip install sphinx
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
arch: ${{matrix.winarch}}
version: ${{matrix.qt}}
- name: Install MSYS2 and OpenSSL on Windows
uses: msys2/setup-msys2@v2
if: matrix.os == 'windows'
with:
location: ${{env.MSYS}}
msystem: mingw64
install: mingw-w64-x86_64-openssl openssl-devel base-devel mingw-w64-x86_64-gcc
- name: Brew install OpenSSL
if: matrix.os == 'macos'
run: brew install openssl
- name: Checkout XCA
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure
# No YAML Multiline mechanism (>, |, \, >-, >+2 whatever) works as expected
# Give up. Live with the long line
run: cmake -B ${{github.workspace}}/build -G "${{matrix.generator}}" -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DOPENSSL_ROOT_DIR=${{matrix.openssl_root}} --warn-uninitialized -DCMAKE_OSX_ARCHITECTURES=arm64 -DCMAKE_OSX_DEPLOYMENT_TARGET="10.15"
- name: Build
run: cmake --build ${{github.workspace}}/build -j 5 -v
- name: Fixup after WindeployQT and Install
if: matrix.os == 'windows'
run: |
cd ${{env.MSYS}}\msys64\mingw64\bin
cmake -E copy libgcc_s_seh-1.dll libstdc++-6.dll libwinpthread-1.dll ${{github.workspace}}\build
cmake --build ${{github.workspace}}/build -t install
- name: Test
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: |
cmake --build ${{github.workspace}}/build -t tests
ctest --test-dir ${{github.workspace}}/build -L console
- name: Install
if: matrix.os != 'windows'
run: DESTDIR=${{github.workspace}}/build/INSTALL cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -t install
- name: Pack
run: |
cd ${{github.workspace}}/build
cpack -C ${{env.BUILD_TYPE}}
- name: Deploy
uses: actions/upload-artifact@v4
with:
path: ${{matrix.artifact}}
name: ${{matrix.os}}-${{matrix.qt}}