Skip to content

CI

CI #40

Workflow file for this run

name: CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
swift-package:
name: Swift Package (Xcode ${{ matrix.xcode }}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: macos-13 # x86_64 (Intel)
xcode: 15.2 # Swift 5.9.2
- os: macos-14 # arm64 (Apple Silicon)
xcode: 15.3 # Swift 5.10
- os: macos-latest # arm64 (Apple Silicon)
xcode: 16.2 # Swift 6.0
steps:
- uses: actions/checkout@v4
- name: Select Xcode version ${{ matrix.xcode }}
run: |
sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app
xcodebuild -version
- name: Print system and architecture info
run: |
echo "Architecture: $(uname -m)"
echo "Processor: $(sysctl -n machdep.cpu.brand_string 2>/dev/null || echo 'N/A')"
echo "macOS Version: $(sw_vers -productVersion) ($(sw_vers -buildVersion))"
echo "Xcode Path: $(xcode-select -p)"
echo "macOS SDK: $(xcrun --sdk macosx --show-sdk-path)"
- name: Build
run: swift build -v
- name: Run tests
run: swift test -v
xcode-example:
name: Xcode Example App (latest macOS)
runs-on: macos-latest
needs: swift-package
steps:
- uses: actions/checkout@v4
- name: Select Xcode version
run: |
sudo xcode-select -s /Applications/Xcode_16.2.app
xcodebuild -version
- name: Build example app
run: |
xcodebuild \
-project Example/InterposeKitExample.xcodeproj \
-scheme InterposeKitExample \
-destination 'platform=macOS' \
clean build