Skip to content

Added code to select Xcode version #44

Added code to select Xcode version

Added code to select Xcode version #44

Workflow file for this run

name: Build
on:
pull_request:
branches:
- 'main'
paths:
- '**/*.swift'
push:
branches:
- 'main'
paths:
- '**/*.swift'
permissions:
contents: read
issues: read
checks: write
jobs:
macos:
name: macOS
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
with:
clean: true
submodules: recursive
- name: Select Xcode
env:
XCODE_VERSION: "26.0"
run: |
APPLICATIONS_FOLDER="/Applications"
ls "${APPLICATIONS_FOLDER}/Xcode_*.app"
TARGET="${APPLICATIONS_FOLDER}/Xcode_${XCODE_VERSION}.app"
if [ -d "$TARGET" ]; then
sudo xcode-select -s "$TARGET"
fi
xcode-select -p
xcodebuild -version
- name: Test
run: |
xcodebuild test \
-scheme "piper-objc-Package" \
-destination "platform=macOS" \
-only-testing:"piper-objc-tests"
- name: Build
run: |
swift build -c release