-
Notifications
You must be signed in to change notification settings - Fork 2
155 lines (129 loc) · 3.54 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
name: CI Tests
on: [pull_request,push]
jobs:
Ubuntu:
runs-on: ubuntu-22.04
name: Ubuntu
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install prerequisties
run: |
sudo apt update
sudo apt install -y --no-install-recommends \
qtbase5-dev \
libqt5opengl5-dev \
qttools5-dev \
libgl2ps-dev
- name: Configuring
run: |
mkdir build && cd build
cmake .. \
-DBUILD_SHARED_LIBS=ON
- name: Building
run: |
make -j$(nproc) -C build
MSVC:
name: MSVC_Qt_${{ matrix.qt_version }}
runs-on: windows-latest
env:
VCPKG_BINARY_SOURCES: 'clear;nuget,GitHub,readwrite'
strategy:
fail-fast: false
matrix:
qt_version: [5.15.2, 6.3.0]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Cache Qt
id: cache-qt
uses: actions/cache@v3
with:
path: ${{ github.workspace }}/Qt
key: ${{ runner.os }}-QtCache-${{ matrix.qt_version }}
- name: Install Qt
uses: jurplel/install-qt-action@v2
with:
version: ${{ matrix.qt_version }}
cached: ${{ steps.cache-qt.outputs.cache-hit }}
- name: Setup NuGet Credentials
run: |
& $(vcpkg fetch nuget | select -last 1) sources add `
-source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" `
-name "GitHub" `
-username ${{ github.repository_owner }} `
-password "${{ secrets.GITHUB_TOKEN }}"
- name: vcpkg package restore
run: |
vcpkg install gl2ps --triplet x64-windows
- name: Configuring
run: |
mkdir build; cd build
cmake .. `
-DCMAKE_BUILD_TYPE=Release `
-DBUILD_SHARED_LIBS=ON `
-DCMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake
- name: Building
run: |
cmake --build build --config Release -- -maxCpuCount
MinGW-w64:
runs-on: windows-2022
name: MSYS2 ${{ matrix.msystem }}
strategy:
fail-fast: false
matrix:
msystem: [UCRT64, CLANG64]
defaults:
run:
shell: msys2 {0}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install MinGW-w64 packages
uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.msystem }}
release: false
update: true
pacboy: >-
cmake:p
ninja:p
cc:p
qt6-base:p
gl2ps:p
- name: Configuring
run: |
mkdir build && cd build
cmake ..
- name: Building
run: |
cmake --build build
macos:
runs-on: macos-12
name: macos
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Cache Qt
id: cache-qt
uses: actions/cache@v3
with:
path: ${{ github.workspace }}/Qt
key: ${{ runner.os }}-QtCache
- name: Install Qt
uses: jurplel/install-qt-action@v2
with:
cached: ${{ steps.cache-qt.outputs.cache-hit }}
- name: Install prerequisties
run: |
brew install gl2ps
- name: Configuring
run: |
mkdir build && cd build
cmake .. \
-DBUILD_SHARED_LIBS=ON
- name: Building
run: |
make -j$(sysctl -n hw.logicalcpu) -C build