Skip to content

Support Swift 6

Support Swift 6 #522

Workflow file for this run

name: Swift Build & Test
on:
workflow_dispatch:
push:
branches: [ tretnfckit-main ]
pull_request:
branches: [ tretnfckit-main ]
env:
XCODE_SELECT_PATH: '/Applications/Xcode_16_beta_6.app/Contents/Developer'
jobs:
show_software_information:
name: Show software information
strategy:
fail-fast: false
matrix:
# os: [macos-14, ubuntu-20.04, ubuntu-22.04]
os: [macos-14]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Show Swift version
run: swift --version
- name: Show Swift Package Manager version
run: swift package --version
swift-build:
name: Swift Build & Test
strategy:
fail-fast: false
matrix:
# os: [macos-14, ubuntu-20.04, ubuntu-22.04]
os: [macos-14]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set Xcode version
if: ${{ matrix.os == 'macos-14' }}
run: sudo xcode-select -s '${{ env.XCODE_SELECT_PATH }}'
- name: Build
run: swift build -v | tee swift-build_${{ matrix.os }}.log && exit ${PIPESTATUS[0]}
- name: Upload build log
if: always()
uses: actions/upload-artifact@v4
with:
name: swift build log (${{ matrix.os }})
path: |
swift-build_${{ matrix.os }}.log
- name: Test
run: swift test -v | tee swift-test_${{ matrix.os }}.log && exit ${PIPESTATUS[0]}
- name: Upload test log
if: always()
uses: actions/upload-artifact@v4
with:
name: swift test log (${{ matrix.os }})
path: |
swift-test_${{ matrix.os }}.log