-
Notifications
You must be signed in to change notification settings - Fork 127
128 lines (117 loc) · 4.13 KB
/
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
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
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.2.4'
XCODE_VERSION: '14.3.1'
GENERATOR: 'Ninja'
RELEASE: false
os: macos-13
- QT_VERSION: '6.5.3'
XCODE_VERSION: '15.4'
GENERATOR: 'Xcode'
RELEASE: false
os: macos-14
- QT_VERSION: '6.5.3'
XCODE_VERSION: '15.4'
GENERATOR: 'Ninja'
RELEASE: true
os: macos-14
- QT_VERSION: '6.8.0'
XCODE_VERSION: '16.0'
GENERATOR: 'Ninja'
RELEASE: false
os: macos-15
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Cache Qt
uses: actions/cache@v4
id: cache
with:
path: ~/Cache
key: ${{ runner.os }}-${{ matrix.QT_VERSION }}-${{ secrets.CACHE_VERSION }}
- name: Qt install setup
if: steps.cache.outputs.cache-hit != 'true'
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Qt install
if: steps.cache.outputs.cache-hit != 'true'
env:
CI_BUILD_DIR: ${{ github.workspace }}
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 ninja
brew install docbook docbook-xsl fop gnu-sed
# brew install is taking forever on macos-11, skip jing-trang and all it's dependencies.
if [ "${{ matrix.os }}" != "macos-11" ]; then
brew install jing-trang
fi
- 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
./tools/ci_script_osx.sh . ${{ matrix.QT_VERSION }} ${{ matrix.GENERATOR }}
- name: Generate artifact attestation
if: ${{ inputs.attestation && matrix.RELEASE }}
uses: actions/attest-build-provenance@v1
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@v4
with:
name: MacOS_Installer ${{ join(matrix.*) }}
path: gui/GPSBabel-*.dmg
retention-days: 7