Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add workflow to include pre-built loader on macOS #514

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions .github/workflows/macos-build-preset.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Copyright 2021-2024, Collabora, Ltd.
# SPDX-License-Identifier: CC0-1.0

name: macOS builds
on:
workflow_call:
workflow_dispatch:

jobs:
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: |
mkdir build
cd build
cmake -G Ninja \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" \
-DCMAKE_INSTALL_PREFIX=../install \
..

- name: Build OpenXR Loader
run: |
cd build
cmake --build . --target 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
3 changes: 3 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@ jobs:
uses: ./.github/workflows/windows-matrix.yml
with:
organizeAndRelease: true

macos-build:
uses: ./.github/workflows/macos-build-preset.yml
Loading