Skip to content

Merge pull request #24 from roboflow/polygon-selection #52

Merge pull request #24 from roboflow/polygon-selection

Merge pull request #24 from roboflow/polygon-selection #52

Workflow file for this run

# This workflow will build and test a Swift project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-swift
name: Swift Build and Test
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:
jobs:
build-and-test:
name: Build and Test Swift Package
runs-on: macos-15
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Xcode
uses: maxim-lobanov/[email protected]
with:
xcode-version: '16.0' # Required for iOS 18.0+ and macOS 15.0+
- name: Setup Swift environment
uses: swift-actions/[email protected]
with:
swift-version: '6.0' # Use Swift 6.0 for better iOS 18 support
- name: Verify build environment
run: |
echo "Xcode version:"
xcodebuild -version
echo "Swift version:"
swift --version
echo "Available SDKs:"
xcodebuild -showsdks
echo "Core ML availability test:"
swift -e 'import CoreML; print("Core ML framework is available")' || {
echo "Warning: Basic Core ML framework not found"
}
- name: Cache Swift Package Manager dependencies
uses: actions/cache@v4
with:
path: |
~/.cache/org.swift.swiftpm
.build
key: ${{ runner.os }}-swift-${{ hashFiles('**/Package.swift') }}
restore-keys: |
${{ runner.os }}-swift-
- name: Resolve Swift Package Manager dependencies
run: swift package resolve
- name: Build Swift package
run:
swift build
- name: Run Swift package tests
run:
swift test
- name: Run Xcode tests
run: |
xcodebuild test -scheme RoboflowTests -destination 'platform=macOS,variant=Mac Catalyst,arch=arm64'
- name: Validate package structure
run: swift package describe