Update actions/checkout action to v4 #39
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
name: macOS | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
workflow_dispatch: | |
jobs: | |
macos-test-build-release: | |
runs-on: macos-latest | |
strategy: | |
matrix: | |
xcode: ["14.2"] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4.1.1 | |
- name: Select Xcode ${{ matrix.xcode }} | |
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app | |
- name: Homebrew cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/Library/Caches/Homebrew/vulkansdk--* | |
~/Library/Caches/Homebrew/downloads/*--vulkansdk-* | |
key: ${{ runner.os }}-brew-vulkan-sdk-${{ hashFiles('.github/brew-formulae') }} | |
restore-keys: ${{ runner.os }}-brew-vulkansdk- | |
- name: SPM cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
.build/repositories | |
key: ${{ runner.os }}-spm-repos-${{ hashFiles('**/Package.resolved') }} | |
restore-keys: | | |
${{ runner.os }}-spm-repos- | |
- name: Setup Vulkan SDK | |
run: | | |
brew tap ctreffs/homebrew-vulkan | |
brew update | |
mkdir -p /usr/local/include/vulkan | |
mkdir -p /usr/local/lib | |
mkdir -p /usr/local/share | |
brew install --cask vulkan-sdk | |
#sed -i '' 's/Version:.*/Version: $(shell vulkaninfo --summary | tail -n +5 | head -n 1 | cut -c26-)/' vulkan.pc | |
#cp vulkan.pc $(shell brew --prefix)/lib/pkgconfig/vulkan.pc | |
#pkg-config --libs --cflags vulkan | |
- name: Test | |
run: swift test --parallel | |
env: | |
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer | |
- name: Build Release | |
run: swift build -c release | |
env: | |
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer |