Fix GitHub Actions not supporting latest macOS SDK and runner #37
Workflow file for this run
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
# This workflow will build a Swift project | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-swift | |
name: Swift | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: macos-13 | |
env: | |
CUSTOM_SDK_PATH: '/Applications/Xcode_15.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk' | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Print Xcodes 🙈 | |
uses: ./.github/actions/xcode-select/ | |
- name: Print SDKs 🙈 | |
run: | | |
echo "Installed SDKs:" | |
ls /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs | |
- uses: swift-actions/setup-swift@65540b95f51493d65f5e59e97dcef9629ddf11bf | |
with: | |
swift-version: "5.5" | |
- uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: '15.1.0' | |
- name: Set up Custom SDK Path | |
run: | | |
echo "export SDKROOT=$CUSTOM_SDK_PATH" >> $GITHUB_ENV | |
- name: Build | |
run: | | |
SDKROOT=$CUSTOM_SDK_PATH swift build -v | |
- name: Run tests | |
run: | | |
SDKROOT=$CUSTOM_SDK_PATH swift test -v | |