From 7b9035fb056848d0e861e17ea13c2e460df6116a Mon Sep 17 00:00:00 2001 From: utzcoz Date: Sun, 15 Sep 2024 16:55:49 +0800 Subject: [PATCH 1/2] ci: Add GitHub Action for macOS building humbletim/setup-vulkan-sdk's cache mechanism doesn't work for the same OS but different architectures. So this CL only tests with macOS 14 with arm64 architecture. Signed-off-by: utzcoz Reviewed-by: Rylie Pavlik --- .github/workflows/macOS.yml | 41 +++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/macOS.yml diff --git a/.github/workflows/macOS.yml b/.github/workflows/macOS.yml new file mode 100644 index 000000000..a06d129b7 --- /dev/null +++ b/.github/workflows/macOS.yml @@ -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/get-cmake@v3.30.2" + - name: Prepare Vulkan SDK + uses: humbletim/setup-vulkan-sdk@v1.2.0 + 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 From c71e1aaf9f6f5491d0b94f56ddeb8880be246cf4 Mon Sep 17 00:00:00 2001 From: utzcoz Date: Tue, 17 Sep 2024 16:19:05 +0800 Subject: [PATCH 2/2] doc: Add command to build OpenXR targets on macOS Signed-off-by: utzcoz Reviewed-by: Rylie Pavlik --- BUILDING.md | 11 ++++++++++- changes/sdk/pr.501.gh.OpenXR-SDK-Source.md | 2 ++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 changes/sdk/pr.501.gh.OpenXR-SDK-Source.md diff --git a/BUILDING.md b/BUILDING.md index 9e4335df6..59671aadb 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -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 diff --git a/changes/sdk/pr.501.gh.OpenXR-SDK-Source.md b/changes/sdk/pr.501.gh.OpenXR-SDK-Source.md new file mode 100644 index 000000000..c0954c36f --- /dev/null +++ b/changes/sdk/pr.501.gh.OpenXR-SDK-Source.md @@ -0,0 +1,2 @@ +- ci: Add GitHub Action for macOS building +- doc: Add command to build OpenXR targets on macOS