Skip to content

Commit

Permalink
Update ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
cpisciotta committed Aug 18, 2024
1 parent 2891bc1 commit feb1303
Showing 1 changed file with 89 additions and 72 deletions.
161 changes: 89 additions & 72 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,80 +11,97 @@ concurrency:
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-latest
- ubuntu-latest
version:
- swift_version: "5.9"
xcode_version: "15.2"
- swift_version: "5.10"
xcode_version: "15.4"
- swift_version: "6.0"
xcode_version: "16_beta_5"
exclude:
# Add Swift 6.0 to ubuntu-latest when its available via swift-actions/setup-swift
- platform: ubuntu-latest
version:
swift_version: "6.0"
env:
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.version.xcode_version }}.app/Contents/Developer
steps:
- uses: actions/checkout@v4
- name: Install Swift and Tools
if: ${{ matrix.platform == 'ubuntu-latest' }}
uses: swift-actions/setup-swift@3aed395c5397f62deb91d8fe7af1418a9ae4d16f
with:
swift-version: ${{ matrix.version.swift_version }}
- run: swift --version
- run: swift build --disable-sandbox --configuration release -Xswiftc -warnings-as-errors
# compile:
# name: Compile (Swift ${{ matrix.version.swift_version }}) (${{ matrix.platform }})
# runs-on: ${{ matrix.platform }}
# strategy:
# fail-fast: false
# matrix:
# platform:
# - macos-latest
# - ubuntu-latest
# version:
# - swift_version: "5.9"
# xcode_version: "15.2"
# - swift_version: "5.10"
# xcode_version: "15.4"
# - swift_version: "6.0"
# xcode_version: "16_beta_5"
# exclude:
# # Add Swift 6.0 to ubuntu-latest when its available via swift-actions/setup-swift
# - platform: ubuntu-latest
# version:
# swift_version: "6.0"
# env:
# DEVELOPER_DIR: /Applications/Xcode_${{ matrix.version.xcode_version }}.app/Contents/Developer
# steps:
# - uses: actions/checkout@v4
# - name: Install Swift and Tools
# if: ${{ matrix.platform == 'ubuntu-latest' }}
# uses: swift-actions/setup-swift@3aed395c5397f62deb91d8fe7af1418a9ae4d16f
# with:
# swift-version: ${{ matrix.version.swift_version }}
# - 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-latest
- ubuntu-latest
version:
- swift_version: "5.9"
xcode_version: "15.2"
- swift_version: "5.10"
xcode_version: "15.4"
- swift_version: "6.0"
xcode_version: "16_beta_5"
exclude:
# Add Swift 6.0 to ubuntu-latest when its available via swift-actions/setup-swift
- platform: ubuntu-latest
version:
swift_version: "6.0"
env:
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.version.xcode_version }}.app/Contents/Developer
# test:
# name: Test (Swift ${{ matrix.version.swift_version }}) (${{ matrix.platform }})
# runs-on: ${{ matrix.platform }}
# strategy:
# fail-fast: false
# matrix:
# platform:
# - macos-latest
# - ubuntu-latest
# version:
# - swift_version: "5.9"
# xcode_version: "15.2"
# - swift_version: "5.10"
# xcode_version: "15.4"
# - swift_version: "6.0"
# xcode_version: "16_beta_5"
# exclude:
# # Add Swift 6.0 to ubuntu-latest when its available via swift-actions/setup-swift
# - platform: ubuntu-latest
# version:
# swift_version: "6.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: Install Swift and Tools
# if: ${{ matrix.platform == 'ubuntu-latest' }}
# uses: swift-actions/setup-swift@3aed395c5397f62deb91d8fe7af1418a9ae4d16f
# with:
# swift-version: ${{ matrix.version.swift_version }}
# - 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@v4
# with:
# files: info.lcov
# env:
# CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

end-to-end:
name: End-to-End Test
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Load Swift Version
run: echo "SWIFT_VERSION=$(<.swift-version)" >> $GITHUB_ENV
- name: Install Swift and Tools
if: ${{ matrix.platform == 'ubuntu-latest' }}
uses: swift-actions/setup-swift@3aed395c5397f62deb91d8fe7af1418a9ae4d16f
with:
swift-version: ${{ matrix.version.swift_version }}
- 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@v4
- uses: actions/checkout@v4
with:
files: info.lcov
repository: "cpisciotta/GitHub-Issues-Browser"
path: "Demo"
- run: swift build
- run: ls -R
- run: |
set -euo pipefail && xcodebuild clean test -project 'Demo/GHIssues.xcodeproj' -scheme GHIssues -destination 'platform=iOS Simulator,name=iPhone 15 Pro' -derivedDataPath DerivedData CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGN_ENTITLEMENTS="" CODE_SIGNING_ALLOWED=NO ONLY_ACTIVE_ARCH=NO | .build/debug/xcbeautify --disable-colored-output --preserve-unbeautified
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
XCB_RECORD_UNCAPTURED: true
- run: ls -R

0 comments on commit feb1303

Please sign in to comment.