-
Notifications
You must be signed in to change notification settings - Fork 140
145 lines (131 loc) · 4.79 KB
/
macos.yml
File metadata and controls
145 lines (131 loc) · 4.79 KB
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
name: "macos"
on:
push:
branches: [ '**']
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
schedule:
- cron: '27 4 * * 2'
workflow_dispatch:
inputs:
attestation:
description: 'Generate attestation for binary artifacts'
required: false
default: false
type: boolean
jobs:
macos:
name: macOS Build
permissions:
id-token: write
contents: write
attestations: write
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- QT_VERSION: '6.5.3'
XCODE_VERSION: '15.4'
GENERATOR: 'Ninja'
RELEASE: false
os: macos-14
- QT_VERSION: '6.8.3'
XCODE_VERSION: '16.4'
GENERATOR: 'Xcode'
RELEASE: false
os: macos-15
- QT_VERSION: '6.8.3'
XCODE_VERSION: '16.4'
GENERATOR: 'Ninja'
RELEASE: true
os: macos-15
- QT_VERSION: '6.10.2'
XCODE_VERSION: '26.2'
GENERATOR: 'Ninja'
RELEASE: false
os: macos-26
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Cache Qt
uses: actions/cache/restore@v5
id: restore-cache
with:
path: ~/Cache
key: ${{ runner.os }}-${{ matrix.QT_VERSION }}
- name: Qt install setup
if: steps.restore-cache.outputs.cache-hit != 'true'
uses: actions/setup-python@v6
with:
python-version: '3.13'
- name: Qt install
if: steps.restore-cache.outputs.cache-hit != 'true'
env:
CI_BUILD_DIR: ${{ github.workspace }}
QT_INSTALLER_JWT_TOKEN: ${{secrets.QT_INSTALLER_JWT_TOKEN}}
run: |
./tools/ci_install_osx.sh ${{ matrix.QT_VERSION }} aqt
- name: Brew install
if: matrix.GENERATOR == 'Ninja'
run: |
# update/upgrade is causing issues
# https://github.com/orgs/Homebrew/discussions/3895
# https://github.com/actions/setup-python/issues/577
# https://github.com/actions/runner-images/issues/6459
# https://github.com/actions/runner-images/issues/6507
# https://github.com/actions/runner-images/issues/2322
# brew update # skip update for now to avoid link issues AND many slow dependency upGRADES.
brew list -1 | grep python
ls -l $(brew --prefix)/bin | grep -i python
# workaround for https://github.com/actions/setup-python/issues/577
brew list -1 | grep python | while read formula; do brew unlink $formula; brew link --overwrite $formula; done
brew list -1 | grep python
ls -l $(brew --prefix)/bin | grep -i python
brew install docbook docbook-xsl fop gnu-sed
# brew install is taking forever on macos-11, skip jing-trang and all it's dependencies.
# jing 20241231 is failing with "Unknown XPath version 0", https://github.com/relaxng/jing-trang/issues/284
#brew install jing-trang
- name: Install the Apple certificate
env:
BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }}
P12_PASSWORD: ${{ secrets.P12_PASSWORD }}
run: |
./tools/ci_load_keychain.sh
- name: Script
env:
XML_CATALOG_FILES: ${{ runner.arch == 'ARM64' && '/opt/homebrew/etc/xml/catalog' || '/usr/local/etc/xml/catalog' }}
run: |
source ${HOME}/Cache/qt-${{ matrix.QT_VERSION }}.env
sudo xcode-select --switch /Applications/Xcode_${{ matrix.XCODE_VERSION }}.app
if [ -z "${IDENTITY}" ]; then
IDENTITY="-"
fi
./tools/ci_script_osx.sh -g ${{ matrix.GENERATOR }} -i "${IDENTITY}" . ${{ matrix.QT_VERSION }}
- name: Generate artifact attestation
if: ${{ inputs.attestation && matrix.RELEASE }}
uses: actions/attest-build-provenance@v3
with:
subject-path: 'gui/GPSBabel-*.dmg'
- name: Deploy
# This only handles continous releases now, for other events artifacts may be saved in
# the 'Upload Artifacts' step.
if: ( github.event_name == 'push' ) && ( github.ref == 'refs/heads/master' ) && matrix.RELEASE
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RELEASE_NAME: Continuous-${{ runner.os }}
run: |
./tools/uploadtool/upload_github.sh gui/GPSBabel-*.dmg
- name: 'Upload Artifacts'
uses: actions/upload-artifact@v7
with:
name: MacOS_Installer ${{ join(matrix.*) }}
path: gui/GPSBabel-*.dmg
retention-days: 7
- name: Save Cache Qt
if: ( steps.restore-cache.outputs.cache-hit != 'true' ) && ( github.ref == 'refs/heads/master' )
uses: actions/cache/save@v5
with:
path: ~/Cache
key: ${{ steps.restore-cache.outputs.cache-primary-key }}