From 980b59c5fe5392148975d80147159e9733b57837 Mon Sep 17 00:00:00 2001 From: leogdion Date: Mon, 4 Nov 2024 18:32:54 -0500 Subject: [PATCH] adding ci update (#18) --- .github/workflows/IPSWDownloads.yml | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/.github/workflows/IPSWDownloads.yml b/.github/workflows/IPSWDownloads.yml index 71725c8..4e6c4b4 100644 --- a/.github/workflows/IPSWDownloads.yml +++ b/.github/workflows/IPSWDownloads.yml @@ -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 @@ -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 }} @@ -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 @@ -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: @@ -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 @@ -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: @@ -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 }}