forked from mrkite/minutor
-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (58 loc) · 1.62 KB
/
cpp-qt-macos.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
name: MacOS Qt CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
project: 'minutor'
jobs:
build:
strategy:
fail-fast: false
matrix:
name: [macos-5.9, macos-5.12, macos-5.15]
include:
- name: macos-5.9
os: macos-12
qt: '5.9.9'
- name: macos-5.12
os: macos-12
qt: '5.12.12'
- name: macos-5.15
os: macos-latest
qt: '5.15.2'
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
# - name: Cache Qt
# id: cache-qt
# uses: actions/cache@v3
# with:
# path: ${{ runner.workspace }}/Qt
# key: ${{ runner.os }}-QtCache-${{ matrix.qt }}
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: ${{ matrix.qt }}
target: 'desktop'
# manually-cached: ${{ steps.cache-qt.outputs.cache-hit }}
cache: 'true'
cache-key-prefix: ${{ runner.os }}-QtCache-${{ matrix.qt }}
- name: Create BUILD folder
run: |
mkdir ../build
- name: Build (MacOS)
working-directory: ../build
run: |
qmake ${{ github.workspace }}/${{ env.project }}.pro -early QMAKE_DEFAULT_LIBDIRS=$(xcrun -show-sdk-path)/usr/lib
make
- name: Deploy Qt (macOS)
working-directory: ../build
run: |
macdeployqt ${{ env.project }}.app -codesign=- -dmg
- name: Archive build result
uses: actions/upload-artifact@v4
with:
name: Binary ${{ matrix.name }}
path: ${{ runner.workspace }}/build/${{ env.project }}.dmg