Skip to content

Commit

Permalink
adding ci update (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
leogdion committed Nov 5, 2024
1 parent e3f51e5 commit 980b59c
Showing 1 changed file with 19 additions and 9 deletions.
28 changes: 19 additions & 9 deletions .github/workflows/IPSWDownloads.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
matrix:
runs-on: [ubuntu-20.04, ubuntu-22.04]
swift-version: [5.9, "5.10"]
swift-version: [5.9, "5.10", "6.0"]
steps:
- uses: actions/checkout@v4
- name: Cache swift package modules
Expand Down Expand Up @@ -58,7 +58,7 @@ jobs:
- name: Prepare Code Coverage
run: llvm-cov export -format="lcov" .build/x86_64-unknown-linux-gnu/debug/${{ env.PACKAGE_NAME }}PackageTests.xctest -instr-profile .build/debug/codecov/default.profdata > info.lcov
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: spm,${{ env.RELEASE_NAME }},${{ env.SWIFT_VER }}
Expand Down Expand Up @@ -89,6 +89,12 @@ jobs:
watchOSVersion: "10.2"
watchName: "Apple Watch Ultra 2 (49mm)"
iPhoneName: "iPhone 15 Pro Max"
- runs-on: macos-15
xcode: "/Applications/Xcode_16.1.app"
iOSVersion: "18.1"
watchOSVersion: "11.1"
watchName: "Apple Watch Ultra 2 (49mm)"
iPhoneName: "iPhone 16"
steps:
- uses: actions/checkout@v4
- name: Cache swift package modules
Expand All @@ -104,7 +110,7 @@ jobs:
${{ runner.os }}-build-
${{ runner.os }}-
- name: Cache mint
if: ${{ github.event_name == 'pull_request' && ( github.base_ref == 'main' || endsWith( github.ref_name , 'Prep') ) && matrix.xcode == '/Applications/Xcode_15.2.app' }}
if: ${{ github.event_name == 'pull_request' && ( github.base_ref == 'main' || endsWith( github.ref_name , 'Prep') ) && matrix.xcode == '/Applications/Xcode_16.1.app' }}
id: cache-mint
uses: actions/cache@v4
env:
Expand All @@ -121,7 +127,7 @@ jobs:
- name: Setup Xcode
run: sudo xcode-select -s ${{ matrix.xcode }}/Contents/Developer
- name: Install mint
if: ${{ github.event_name == 'pull_request' && ( github.base_ref == 'main' || endsWith( github.ref_name , 'Prep') ) && matrix.xcode == '/Applications/Xcode_15.2.app' }}
if: ${{ github.event_name == 'pull_request' && ( github.base_ref == 'main' || endsWith( github.ref_name , 'Prep') ) && matrix.xcode == '/Applications/Xcode_16.1.app' }}
run: |
brew update
brew install mint
Expand All @@ -130,6 +136,8 @@ jobs:
- name: Run Swift Package tests
run: swift test -v --enable-code-coverage
- uses: sersoft-gmbh/swift-coverage-action@v4
with:
fail-on-empty-output: true
- name: Upload SPM to CodeCov.io
run: bash <(curl https://codecov.io/bash) -F spm -F macOS -F ${XCODE_NAME}
env:
Expand All @@ -138,20 +146,22 @@ jobs:
run: rm -rf .build
- name: Lint
run: ./scripts/lint.sh
if: ${{ github.event_name == 'pull_request' && ( github.base_ref == 'main' || endsWith( github.ref_name , 'Prep') ) && matrix.xcode == '/Applications/Xcode_15.2.app' }}
if: ${{ github.event_name == 'pull_request' && ( github.base_ref == 'main' || endsWith( github.ref_name , 'Prep') ) && matrix.xcode == '/Applications/Xcode_16.1.app' }}
- name: Run iOS target tests
run: xcodebuild test -scheme IPSWDownloads -sdk iphonesimulator -destination 'platform=iOS Simulator,name=${{ matrix.iPhoneName }},OS=${{ matrix.iOSVersion }}' -enableCodeCoverage YES build test
run: xcodebuild test -scheme ${{ env.PACKAGE_NAME }} -sdk iphonesimulator -destination 'platform=iOS Simulator,name=${{ matrix.iPhoneName }},OS=${{ matrix.iOSVersion }}' -enableCodeCoverage YES build test
- uses: sersoft-gmbh/swift-coverage-action@v4
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: iOS,iOS${{ matrix.iOSVersion }},macOS,${{ env.XCODE_NAME }}
- name: Run watchOS target tests
run: xcodebuild test -scheme IPSWDownloads -sdk watchsimulator -destination 'platform=watchOS Simulator,name=${{ matrix.watchName }},OS=${{ matrix.watchOSVersion }}' -enableCodeCoverage YES build test
run: xcodebuild test -scheme ${{ env.PACKAGE_NAME }} -sdk watchsimulator -destination 'platform=watchOS Simulator,name=${{ matrix.watchName }},OS=${{ matrix.watchOSVersion }}' -enableCodeCoverage YES build test
- uses: sersoft-gmbh/swift-coverage-action@v4
with:
fail-on-empty-output: true
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: watchOS,watchOS${{ matrix.watchOSVersion }},macOS,${{ env.XCODE_NAME }}

0 comments on commit 980b59c

Please sign in to comment.