GitHub Actions workflow fixes #360
Workflow file for this run
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: SwiftPM | |
on: | |
push: | |
branches: [main] | |
paths: | |
- '.codecov.yml' | |
- '.github/workflows/swiftpm.yml' | |
- 'Package*' | |
- 'Sources/**/*.[ch]' | |
- 'Sources/**/*.swift' | |
- 'Sources/**/module.modulemap' | |
- 'Tests/**/*.swift' | |
- 'Tests/**/*.ya?ml' | |
pull_request: | |
paths: | |
- '.codecov.yml' | |
- '.github/workflows/swiftpm.yml' | |
- 'Package*' | |
- 'Sources/**/*.[ch]' | |
- 'Sources/**/*.swift' | |
- 'Sources/**/module.modulemap' | |
- 'Tests/**/*.swift' | |
- 'Tests/**/*.ya?ml' | |
concurrency: | |
group: swiftpm-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
Xcode_Monterey: | |
name: Xcode ${{ matrix.xcode_version }} on macOS 12 | |
strategy: | |
matrix: | |
xcode_version: ['13.3.1', '13.4', '14.0.1', '14.1', '14.2'] | |
runs-on: macos-12 | |
env: | |
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode_version }}.app | |
steps: | |
- uses: actions/checkout@v4 | |
- run: swift -version | |
- run: YAMS_DEFAULT_ENCODING=UTF16 swift test --parallel | |
- run: YAMS_DEFAULT_ENCODING=UTF8 swift test --parallel | |
Xcode_Ventura: | |
name: Xcode ${{ matrix.xcode_version }} on macOS 13 | |
strategy: | |
matrix: | |
xcode_version: ['14.3', '15.0'] | |
runs-on: macos-13 | |
env: | |
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode_version }}.app | |
steps: | |
- uses: actions/checkout@v4 | |
- run: swift -version | |
- run: YAMS_DEFAULT_ENCODING=UTF16 swift test --parallel | |
- run: YAMS_DEFAULT_ENCODING=UTF8 swift test --parallel | |
- name: Code Coverage | |
if: matrix.xcode_version == '15.0' | |
run: | | |
swift test --enable-code-coverage | |
xcrun llvm-cov export -format="lcov" .build/debug/YamsPackageTests.xctest/Contents/MacOS/YamsPackageTests -instr-profile .build/debug/codecov/default.profdata > coverage.lcov | |
if [[ -n "${CODECOV_TOKEN}" ]]; then | |
bash <(curl -s https://codecov.io/bash) -f coverage.lcov | |
fi | |
env: { 'CODECOV_TOKEN': '${{ secrets.CODECOV_TOKEN }}' } | |
Xcode_Sonoma: | |
name: Xcode ${{ matrix.xcode_version }} on macOS 14 | |
strategy: | |
matrix: | |
xcode_version: ['15.4'] | |
runs-on: macos-14 | |
env: | |
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode_version }}.app | |
steps: | |
- uses: actions/checkout@v4 | |
- run: swift -version | |
- run: YAMS_DEFAULT_ENCODING=UTF16 swift test --parallel | |
- run: YAMS_DEFAULT_ENCODING=UTF8 swift test --parallel | |
- name: Code Coverage | |
if: matrix.xcode_version == '15.4' | |
run: | | |
swift test --enable-code-coverage | |
xcrun llvm-cov export -format="lcov" .build/debug/YamsPackageTests.xctest/Contents/MacOS/YamsPackageTests -instr-profile .build/debug/codecov/default.profdata > coverage.lcov | |
if [[ -n "${CODECOV_TOKEN}" ]]; then | |
bash <(curl -s https://codecov.io/bash) -f coverage.lcov | |
fi | |
env: { 'CODECOV_TOKEN': '${{ secrets.CODECOV_TOKEN }}' } | |
Linux: | |
strategy: | |
matrix: | |
tag: ['5.7', '5.8', '5.9', '5.10'] | |
runs-on: ubuntu-latest | |
container: | |
image: swift:${{ matrix.tag }} | |
steps: | |
- uses: actions/checkout@v4 | |
- run: YAMS_DEFAULT_ENCODING=UTF16 swift test --parallel | |
- run: YAMS_DEFAULT_ENCODING=UTF8 swift test --parallel | |
Windows: | |
runs-on: windows-latest | |
strategy: | |
matrix: | |
include: | |
- branch: swift-5.7.3-release | |
tag: 5.7.3-RELEASE | |
- branch: swift-5.8.1-release | |
tag: 5.8.1-RELEASE | |
- branch: swift-5.9.1-release | |
tag: 5.9.1-RELEASE | |
- branch: swift-5.10.1-release | |
tag: 5.10.1-RELEASE | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: compnerd/gha-setup-swift@main | |
with: | |
branch: ${{ matrix.branch }} | |
tag: ${{ matrix.tag }} | |
# Commands to run once connected via SSH: | |
# | |
# >d: | |
# >cd a\Yams\Yams | |
# >setx SDKROOT C:\Library\Developer\Platforms\Windows.platform\Developer\SDKs\Windows.sdk | |
# >setx DEVELOPER_DIR C:\Library\Developer | |
# >swift build -v | |
# >swift test -v | |
# >swift test -v --filter testBinary | |
# - name: Start SSH session | |
# uses: luchihoratiu/debug-via-ssh@main | |
# with: | |
# NGROK_AUTH_TOKEN: ${{ secrets.NGROK_AUTH_TOKEN }} | |
# SSH_PASS: ${{ secrets.SSH_PASS }} | |
- name: Build | |
run: swift build -v | |
- name: Test | |
run: swift test -v |