Bump to SwiftFormat 0.55.4 #592
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: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
compile: | |
name: Compile (Swift ${{ matrix.version.swift_version }}) (${{ matrix.platform }}) | |
runs-on: ${{ matrix.platform }} | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: [macos-14, ubuntu-22.04] | |
version: | |
- swift_version: "5.9" | |
xcode_version: "15.2" | |
- swift_version: "5.10" | |
xcode_version: "15.4" | |
- swift_version: "6.0" | |
xcode_version: "16.0" | |
env: | |
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.version.xcode_version }}.app/Contents/Developer | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Download Swift ${{ matrix.version.swift_version }} | |
if: ${{ matrix.platform == 'ubuntu-22.04' }} | |
run: wget https://download.swift.org/swift-${{ matrix.version.swift_version }}-release/ubuntu2204/swift-${{ matrix.version.swift_version }}-RELEASE/swift-${{ matrix.version.swift_version }}-RELEASE-ubuntu22.04.tar.gz | |
- name: Extract Swift ${{ matrix.version.swift_version }} | |
if: ${{ matrix.platform == 'ubuntu-22.04' }} | |
run: tar xzf swift-${{ matrix.version.swift_version }}-RELEASE-ubuntu22.04.tar.gz | |
- name: Add Swift toolchain to PATH | |
if: ${{ matrix.platform == 'ubuntu-22.04' }} | |
run: echo "$GITHUB_WORKSPACE/swift-${{ matrix.version.swift_version }}-RELEASE-ubuntu22.04/usr/bin" >> $GITHUB_PATH | |
- run: swift --version | |
- run: swift build --disable-sandbox --configuration release -Xswiftc -warnings-as-errors | |
test: | |
name: Test (Swift ${{ matrix.version.swift_version }}) (${{ matrix.platform }}) | |
runs-on: ${{ matrix.platform }} | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: [macos-14, ubuntu-22.04] | |
version: | |
- swift_version: "5.9" | |
xcode_version: "15.2" | |
- swift_version: "5.10" | |
xcode_version: "15.4" | |
- swift_version: "6.0" | |
xcode_version: "16.0" | |
env: | |
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.version.xcode_version }}.app/Contents/Developer | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Load Swift Version | |
run: echo "SWIFT_VERSION=$(<.swift-version)" >> $GITHUB_ENV | |
- name: Download Swift ${{ matrix.version.swift_version }} | |
if: ${{ matrix.platform == 'ubuntu-22.04' }} | |
run: wget https://download.swift.org/swift-${{ matrix.version.swift_version }}-release/ubuntu2204/swift-${{ matrix.version.swift_version }}-RELEASE/swift-${{ matrix.version.swift_version }}-RELEASE-ubuntu22.04.tar.gz | |
- name: Extract Swift ${{ matrix.version.swift_version }} | |
if: ${{ matrix.platform == 'ubuntu-22.04' }} | |
run: tar xzf swift-${{ matrix.version.swift_version }}-RELEASE-ubuntu22.04.tar.gz | |
- name: Add Swift toolchain to PATH | |
if: ${{ matrix.platform == 'ubuntu-22.04' }} | |
run: echo "$GITHUB_WORKSPACE/swift-${{ matrix.version.swift_version }}-RELEASE-ubuntu22.04/usr/bin" >> $GITHUB_PATH | |
- run: swift --version | |
- run: swift test --enable-code-coverage | |
- name: Prepare Code Coverage | |
if: ${{ matrix.version.swift_version == env.SWIFT_VERSION}} | |
run: ./tools/export_coverage | |
- name: Upload coverage reports to Codecov | |
if: ${{ matrix.version.swift_version == env.SWIFT_VERSION}} | |
uses: codecov/codecov-action@v5 | |
with: | |
files: info.lcov | |
token: ${{ secrets.CODECOV_TOKEN }} |