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

ci: Add GitHub Action for macOS building #501

Merged
Merged
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
41 changes: 41 additions & 0 deletions .github/workflows/macOS.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Copyright (c) 2024, The Khronos Group Inc.
# SPDX-License-Identifier: CC0-1.0

name: macOS

on:
push:
branches: [ main ]

pull_request:
branches: [ main ]

permissions:
contents: read

jobs:
macOS-build:
strategy:
matrix:
device: [
macos-14, # Tests Mac arm64
]
runs-on: ${{ matrix.device }}

steps:
- uses: actions/checkout@v4
- name: "Get modern CMake and Ninja"
uses: "lukka/[email protected]"
- name: Prepare Vulkan SDK
uses: humbletim/[email protected]
with:
vulkan-query-version: 1.3.290.0
vulkan-components: Vulkan-Headers, Vulkan-Loader
vulkan-use-cache: true
- name: Build
run: |
mkdir -p build/macos
cd build/macos
cmake -G "Xcode" ../..
xcodebuild -list -project OPENXR.xcodeproj/
xcodebuild -scheme ALL_BUILD build
11 changes: 10 additions & 1 deletion BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,16 @@ cd build/macos
cmake -G "Xcode" ../..
```

Finally, open the build/macos/OPENXR.xcodeproj in Xcode to build the samples.
Finally, open the `build/macos/OPENXR.xcodeproj` in Xcode to build the samples.

If you want to build on the command line, you can run the following command to
check available targets and built `ALL_BUILD` target as example:

```shell
# In build/macos directory
xcodebuild -list -project OPENXR.xcodeproj/
xcodebuild -scheme ALL_BUILD build
```

### Android

Expand Down
2 changes: 2 additions & 0 deletions changes/sdk/pr.501.gh.OpenXR-SDK-Source.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- ci: Add GitHub Action for macOS building
- doc: Add command to build OpenXR targets on macOS
Loading