Download visionOS in CI (#38) #289
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
name: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
pod-lint: | |
name: Pod Lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '3.3.1' | |
- name: Checkout Repo | |
uses: actions/checkout@v4 | |
- name: Setup Swift Environment | |
uses: swift-actions/setup-swift@v2 | |
with: | |
swift-version: 5.9 | |
- name: Bundle Install | |
run: bundle install | |
- name: Lint Podspec | |
run: bundle exec pod lib lint --verbose --fail-fast --swift-version=5.9 | |
spm-15: | |
name: Build Xcode 15 | |
runs-on: macos-14 | |
strategy: | |
matrix: | |
platforms: [ | |
'iOS_17,watchOS_10', | |
'macOS_14,tvOS_17', | |
'visionOS_1' | |
] | |
fail-fast: false | |
steps: | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '3.3.1' | |
- name: Checkout Repo | |
uses: actions/checkout@v4 | |
- name: Bundle Install | |
run: bundle install | |
- name: Select Xcode Version | |
run: sudo xcode-select --switch /Applications/Xcode_15.4.app/Contents/Developer | |
- name: Download visionOS | |
if: matrix.platforms == 'visionOS_1' | |
run: xcodebuild -downloadPlatform visionOS | |
- name: Build and Test Framework | |
run: Scripts/build.swift ${{ matrix.platforms }} | |
- name: Prepare Coverage Reports | |
run: ./Scripts/prepare-coverage-reports.sh | |
- name: Upload Coverage Reports | |
if: success() | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
spm-15-swift: | |
name: Swift Build Xcode 15 | |
runs-on: macos-14 | |
steps: | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '3.3.1' | |
- name: Checkout Repo | |
uses: actions/checkout@v4 | |
- name: Bundle Install | |
run: bundle install | |
- name: Select Xcode Version | |
run: sudo xcode-select --switch /Applications/Xcode_15.4.app/Contents/Developer | |
- name: Build and Test Framework | |
run: xcrun swift test -c release -Xswiftc -enable-testing | |
linux: | |
name: "Build and Test on Linux" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v4 | |
- name: Setup Swift Environment | |
uses: swift-actions/setup-swift@v2 | |
with: | |
swift-version: 5.9 | |
- name: Build and Test Framework | |
run: swift test -c release --enable-code-coverage -Xswiftc -enable-testing | |
- name: Prepare Coverage Reports | |
run: | | |
llvm-cov export -format="lcov" .build/x86_64-unknown-linux-gnu/release/swift-async-queuePackageTests.xctest -instr-profile .build/x86_64-unknown-linux-gnu/release/codecov/default.profdata > coverage.lcov | |
- name: Upload Coverage Reports | |
if: success() | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} |