-
Notifications
You must be signed in to change notification settings - Fork 261
55 lines (46 loc) · 1.74 KB
/
macos-build.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
# Copyright 2021-2025, Collabora, Ltd.
# SPDX-License-Identifier: CC0-1.0
name: macOS builds
on:
workflow_call:
workflow_dispatch:
jobs:
macos-build:
name: macOS build
runs-on: macos-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Install Dependencies
run: |
brew update
brew install --formula cmake ninja
# Add any additional dependencies here
- name: Configure Build
run: |
cmake -S . \
-B build \
-G Ninja \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" \
-DCMAKE_INSTALL_PREFIX=install
- name: Build OpenXR SDK
run: ninja -C build/ all install
# Note: The com.apple.quarantine attribute is a macOS extended attribute that
# marks files as downloaded from the internet. When this flag is set, macOS's
# Gatekeeper enforces security checks, prompting users to confirm whether they
# want to open the file. For developers who download the pre-built OpenXR Loader
# using a web browser, they need to manually remove the quarantine attribute.
- name: Add a note about the Quarantine flag
run: |
cd install
echo "After unzipping the package, run 'xattr -d com.apple.quarantine lib/libopenxr_loader.dylib' to allow using the pre-built loader on macOS computers" > README.md
- name: Package Artifacts
run: |
cd install
tar -czvf openxr_loader_macos.tar.gz *
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: openxr_loader_macos
path: install/openxr_loader_macos.tar.gz