-
Notifications
You must be signed in to change notification settings - Fork 456
66 lines (55 loc) · 1.85 KB
/
build-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
---
name: macOS Build
# yamllint disable-line rule:truthy
on:
- push
jobs:
build:
name: ${{matrix.buildname}}
runs-on: ${{matrix.os}}
strategy:
matrix:
include:
- os: macos-13
buildname: macOS 10.15
bundle_suffix: '-macos-10'
cmake_preset: macOS-10
- os: macos-14
buildname: macOS 12 M1
bundle_suffix: '-macos-12-m1'
cmake_preset: macOS-12-m1
steps:
- name: Checkout source code
uses: actions/checkout@v4
with:
submodules: false
fetch-depth: 1
- name: Enable ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
key: ${{ github.job }}-${{ matrix.os }}
- name: Set up ccache
run: |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
- name: Install dependencies
env:
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1
HOMEBREW_NO_AUTO_UPDATE: 1
HOMEBREW_NO_INSTALL_CLEANUP: 1
run: '${{github.workspace}}/utils/github/install-macos.sh'
- name: Build with CMake
uses: lukka/run-cmake@v10
with:
configurePreset: '${{ matrix.cmake_preset }}'
buildPreset: '${{ matrix.cmake_preset }}'
packagePreset: '${{ matrix.cmake_preset }}'
- name: Create gnupg directory for tests
run: mkdir -p ~/.gnupg && chmod go-rwx ~/.gnupg
- name: Create macOS bundle
working-directory: '${{runner.workspace}}/build/copyq/${{ matrix.cmake_preset }}'
run: '${{github.workspace}}/utils/github/bundle-macos.sh'
- name: Upload macOS bundle
uses: actions/upload-artifact@v4
with:
name: 'CopyQ${{ matrix.bundle_suffix }}.dmg'
path: '${{runner.workspace}}/build/copyq/${{ matrix.cmake_preset }}/CopyQ.dmg'