Skip to content

Updated to final Swift 6.0 #10

Updated to final Swift 6.0

Updated to final Swift 6.0 #10

Workflow file for this run

name: CI
on:
workflow_dispatch:
pull_request:
jobs:
run_tests:
name: Test Swift v${{ matrix.swift }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
swift: ["6.0"]
fail-fast: false
steps:
- uses: SwiftyLab/setup-swift@latest
if: ${{ matrix.os == 'macos-latest' }}
with:
development: true
swift-version: 'https://download.swift.org/swift-6.0-branch/xcode/swift-6.0-DEVELOPMENT-SNAPSHOT-2024-08-22-a/swift-6.0-DEVELOPMENT-SNAPSHOT-2024-08-22-a-osx.pkg'
- uses: swift-actions/setup-swift@v1
if: ${{ matrix.os == 'ubuntu-latest' }}
with:
swift-version: '5.9'
- uses: compnerd/gha-setup-swift@main
if: ${{ matrix.os == 'windows-latest' }}
with:
branch: swift-5.10-release
tag: 5.10-RELEASE
- uses: actions/checkout@v2
- name: Run Tests
if: ${{ matrix.os == 'macos-latest' }}
run: swift test
- name: Run Build
if: ${{ matrix.os != 'macos-latest' }}
run: swift build # swift 6.0 required for swift-testing
# Ensure that compilation succeeds on iOS-based platforms
run_ios_build_tests:
name: Test ${{ matrix.ios_platform }} on Xcode v${{ matrix.xcode_version }}
runs-on: macos-latest
strategy:
matrix:
ios_platform: ["ios", "watchos", "tvos"] # , "visionos"]
xcode_version: ["15.0"]
steps:
# - uses: maxim-lobanov/setup-xcode@v1
# with:
# xcode-version: ${{ matrix.xcode_version }}
- uses: actions/checkout@v2
- name: Install xcpretty
run: |
gem install xcpretty --silent --quiet --no-document
- name: Run ${{ matrix.ios_platform }} Tests
run: xcrun xcodebuild -IDEClonedSourcePackagesDirPathOverride="$PWD/.dependencies" -derivedDataPath "$PWD/.derivedData" build -scheme FOSUtilities-Package -destination "generic/platform=${{ matrix.ios_platform }}" | xcpretty
#####################################
# swift 5.8 has removed generate-xcodeproj, so we'll need to find a different
# way to do this. I'm sure there will be an update soon.
#####################################
# analyze_code_coverage:
# runs-on: macos-12
# steps:
# - uses: actions/checkout@v2
# - name: Generate an xcodeproj
# run: swift package generate-xcodeproj
# - name: Run Tests w/ code coverage
# run: xcodebuild test -scheme CryptoScraper-Package -destination platform="macOS" -enableCodeCoverage YES
# - name: Upload coverage reports to Codecov
# uses: codecov/codecov-action@v3