-
Notifications
You must be signed in to change notification settings - Fork 639
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 Apple Silicon Build #969
Open
tomadamatkinson
wants to merge
4
commits into
KhronosGroup:main
Choose a base branch
from
tomadamatkinson:m1-runner
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,48 +12,94 @@ concurrency: | |
|
||
jobs: | ||
build: | ||
name: "Build ${{ matrix.platform }} in ${{ matrix.build_type }}" | ||
name: "Build ${{ matrix.platform.runtime }} in ${{ matrix.build_type }}" | ||
strategy: | ||
matrix: | ||
platform: [windows, ubuntu, macos] | ||
platform: [{ os: windows, runtime: windows-latest }, { os: ubuntu, runtime: ubuntu-latest }, { os: macos, runtime: macos-12 }] | ||
build_type: [Debug, Release] | ||
env: | ||
PARALLEL: -j 2 | ||
runs-on: "${{ matrix.platform }}-latest" | ||
runs-on: "${{ matrix.platform.runtime }}" | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: "recursive" | ||
- if: ${{ matrix.platform == 'ubuntu' }} | ||
- if: ${{ matrix.platform.os == 'ubuntu' }} | ||
name: Install RandR headers | ||
run: | | ||
sudo apt-get update | ||
sudo apt install xorg-dev libglu1-mesa-dev | ||
- if: ${{ matrix.platform == 'windows' }} | ||
- if: ${{ matrix.platform.os == 'windows' }} | ||
name: Setup MSVC | ||
uses: ilammy/msvc-dev-cmd@v1 | ||
- if: ${{ matrix.platform == 'windows' }} | ||
- if: ${{ matrix.platform.os == 'windows' }} | ||
name: sccache | ||
uses: hendrikmuhs/[email protected] | ||
with: | ||
key: ${{ github.job }}-${{ matrix.os }} | ||
variant: sccache | ||
- if: ${{ matrix.platform != 'windows' }} | ||
- if: ${{ matrix.platform.os != 'windows' }} | ||
name: ccache | ||
uses: hendrikmuhs/[email protected] | ||
with: | ||
key: ${{ github.job }}-${{ matrix.os }} | ||
- if: ${{ matrix.platform == 'windows' }} | ||
- if: ${{ matrix.platform.os == 'windows' }} | ||
name: Configure and build | ||
shell: pwsh | ||
run: | | ||
cmake -B"build/${{ matrix.platform }}" -G"Ninja" -DVKB_BUILD_TESTS=ON -DVKB_BUILD_SAMPLES=ON -DCMAKE_C_COMPILER_LAUNCHER=C:\\Users\\runneradmin\\.cargo\\bin\\sccache -DCMAKE_CXX_COMPILER_LAUNCHER=C:\\Users\\runneradmin\\.cargo\\bin\\sccache | ||
cmake --build "build/${{ matrix.platform }}" --target vulkan_samples --config ${{ matrix.build_type }} -j 1 | ||
- if: ${{ matrix.platform != 'windows' }} | ||
cmake -B"build/${{ matrix.platform.os }}" -G"Ninja" -DVKB_BUILD_TESTS=ON -DVKB_BUILD_SAMPLES=ON -DCMAKE_C_COMPILER_LAUNCHER=C:\\Users\\runneradmin\\.cargo\\bin\\sccache -DCMAKE_CXX_COMPILER_LAUNCHER=C:\\Users\\runneradmin\\.cargo\\bin\\sccache | ||
cmake --build "build/${{ matrix.platform.os }}" --target vulkan_samples --config ${{ matrix.build_type }} -j 1 | ||
- if: ${{ matrix.platform.os != 'windows' }} | ||
name: Configure and build | ||
run: | | ||
cmake -B"build/${{ matrix.platform }}" -DVKB_BUILD_TESTS=ON -DVKB_BUILD_SAMPLES=ON | ||
cmake --build "build/${{ matrix.platform }}" --target vulkan_samples --config ${{ matrix.build_type }} ${{ env.PARALLEL }} | ||
cmake -B"build/${{ matrix.platform.os }}" -DVKB_BUILD_TESTS=ON -DVKB_BUILD_SAMPLES=ON | ||
cmake --build "build/${{ matrix.platform.os }}" --target vulkan_samples --config ${{ matrix.build_type }} ${{ env.PARALLEL }} | ||
|
||
build_apple_silicon: | ||
name: "Build Apple Silicon in ${{ matrix.build_type }}" | ||
strategy: | ||
matrix: | ||
platform: [{ os: macos, runtime: macos-14 }] | ||
build_type: [Debug, Release] | ||
env: | ||
PARALLEL: -j 2 | ||
# Only run on main due to provisioning time for Apple Silicon runners | ||
if: ${{ github.ref == 'refs/heads/main' }} | ||
runs-on: "${{ matrix.platform.runtime }}" | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: "recursive" | ||
- if: ${{ matrix.platform.os == 'ubuntu' }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If I get it right, this part is only used with platform = { macos, macos-14 }? |
||
name: Install RandR headers | ||
run: | | ||
sudo apt-get update | ||
sudo apt install xorg-dev libglu1-mesa-dev | ||
- if: ${{ matrix.platform.os == 'windows' }} | ||
name: Setup MSVC | ||
uses: ilammy/msvc-dev-cmd@v1 | ||
- if: ${{ matrix.platform.os == 'windows' }} | ||
name: sccache | ||
uses: hendrikmuhs/[email protected] | ||
with: | ||
key: ${{ github.job }}-${{ matrix.os }} | ||
variant: sccache | ||
- if: ${{ matrix.platform.os != 'windows' }} | ||
name: ccache | ||
uses: hendrikmuhs/[email protected] | ||
with: | ||
key: ${{ github.job }}-${{ matrix.os }} | ||
- if: ${{ matrix.platform.os == 'windows' }} | ||
name: Configure and build | ||
shell: pwsh | ||
run: | | ||
cmake -B"build/${{ matrix.platform.os }}" -G"Ninja" -DVKB_BUILD_TESTS=ON -DVKB_BUILD_SAMPLES=ON -DCMAKE_C_COMPILER_LAUNCHER=C:\\Users\\runneradmin\\.cargo\\bin\\sccache -DCMAKE_CXX_COMPILER_LAUNCHER=C:\\Users\\runneradmin\\.cargo\\bin\\sccache | ||
cmake --build "build/${{ matrix.platform.os }}" --target vulkan_samples --config ${{ matrix.build_type }} -j 1 | ||
- if: ${{ matrix.platform.os != 'windows' }} | ||
name: Configure and build | ||
run: | | ||
cmake -B"build/${{ matrix.platform.os }}" -DVKB_BUILD_TESTS=ON -DVKB_BUILD_SAMPLES=ON | ||
cmake --build "build/${{ matrix.platform.os }}" --target vulkan_samples --config ${{ matrix.build_type }} ${{ env.PARALLEL }} | ||
|
||
build_d2d: | ||
name: "Build Ubuntu with Direct To Display" | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe, instead of duplicating most of this file, you could add macos-14 to the matrix and just have a condition here like
if: ${{ github.ref == 'refs/heads/main' || matrix.platform.runtime != 'macos-14' }}