Skip to content

Commit

Permalink
Merge pull request #33 from brightdigit/v1.0.0-beta.6
Browse files Browse the repository at this point in the history
V1.0.0 beta.6
  • Loading branch information
leogdion authored Dec 17, 2024
2 parents f49b4c9 + 2242415 commit bed7214
Show file tree
Hide file tree
Showing 2 changed files with 92 additions and 66 deletions.
154 changes: 90 additions & 64 deletions .github/workflows/IPSWDownloads.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,34 +69,85 @@ jobs:
runs-on: ${{ matrix.runs-on }}
if: "!contains(github.event.head_commit.message, 'ci skip')"
strategy:
fail-fast: false
matrix:
include:
# SPM Build Matrix
- runs-on: macos-13
xcode: "/Applications/Xcode_15.0.1.app"
iOSVersion: "17.0.1"
watchOSVersion: "10.0"
watchName: "Apple Watch Series 9 (41mm)"
iPhoneName: "iPhone 15"
- runs-on: macos-13
xcode: "/Applications/Xcode_15.1.app"
iOSVersion: "17.2"
watchOSVersion: "10.2"
watchName: "Apple Watch Series 9 (45mm)"
iPhoneName: "iPhone 15 Pro"
- runs-on: macos-13
xcode: "/Applications/Xcode_15.2.app"
iOSVersion: "17.2"
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"
- runs-on: macos-15
xcode: "/Applications/Xcode_16.2.app"

# iOS Build Matrix
- type: ios
runs-on: macos-13
xcode: "/Applications/Xcode_15.0.1.app"
deviceName: "iPhone 15"
osVersion: "17.0.1"
- type: ios
runs-on: macos-13
xcode: "/Applications/Xcode_15.1.app"
deviceName: "iPhone 15 Pro"
osVersion: "17.2"
- type: ios
runs-on: macos-13
xcode: "/Applications/Xcode_15.2.app"
deviceName: "iPhone 15 Pro Max"
osVersion: "17.2"
- type: ios
runs-on: macos-15
xcode: "/Applications/Xcode_16.1.app"
deviceName: "iPhone 16"
osVersion: "18.1"
- type: ios
runs-on: macos-15
xcode: "/Applications/Xcode_16.2.app"
deviceName: "iPhone 16 Pro"
osVersion: "18.2"

# watchOS Build Matrix
- type: watchos
runs-on: macos-13
xcode: "/Applications/Xcode_15.0.1.app"
deviceName: "Apple Watch Series 9 (41mm)"
osVersion: "10.0"
- type: watchos
runs-on: macos-13
xcode: "/Applications/Xcode_15.1.app"
deviceName: "Apple Watch Series 9 (45mm)"
osVersion: "10.2"
- type: watchos
runs-on: macos-13
xcode: "/Applications/Xcode_15.2.app"
deviceName: "Apple Watch Ultra 2 (49mm)"
osVersion: "10.2"
- type: watchos
runs-on: macos-15
xcode: "/Applications/Xcode_16.1.app"
deviceName: "Apple Watch Ultra 2 (49mm)"
osVersion: "11.1"
- type: watchos
runs-on: macos-15
xcode: "/Applications/Xcode_16.2.app"
deviceName: "Apple Watch Ultra 2 (49mm)"
osVersion: "11.2"

steps:
- uses: actions/checkout@v4

- name: Set Xcode Name
run: echo "XCODE_NAME=$(basename -- ${{ matrix.xcode }} | sed 's/\.[^.]*$//' | cut -d'_' -f2)" >> $GITHUB_ENV

- name: Setup Xcode
run: sudo xcode-select -s ${{ matrix.xcode }}/Contents/Developer

# SPM Cache Step
- name: Cache swift package modules
id: cache-spm-macos
uses: actions/cache@v4
Expand All @@ -109,59 +160,34 @@ jobs:
${{ runner.os }}-build-${{ env.cache-name }}-
${{ 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_16.1.app' }}
id: cache-mint
uses: actions/cache@v4
env:
cache-name: cache-mint
with:
path: .mint
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('Mintfile') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Set Xcode Name
run: echo "XCODE_NAME=$(basename -- ${{ matrix.xcode }} | sed 's/\.[^.]*$//' | cut -d'_' -f2)" >> $GITHUB_ENV
- 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_16.1.app' }}
run: |
brew update
brew install mint
- name: Build
- name: Build SPM
if: "!matrix.type"
run: swift build

- name: Run Swift Package tests
if: "!matrix.type"
run: swift test -v --enable-code-coverage
- uses: sersoft-gmbh/swift-coverage-action@v4

# Common iOS/watchOS Test Steps
- name: Run Device Tests
if: matrix.type
run: >
xcodebuild test
-scheme ${{ env.PACKAGE_NAME }}
-sdk ${{ matrix.type == 'ios' && 'iphonesimulator' || 'watchsimulator' }}
-destination 'platform=${{ matrix.type == 'ios' && 'iOS Simulator' || 'watchOS Simulator' }},name=${{ matrix.deviceName }},OS=${{ matrix.osVersion }}'
-enableCodeCoverage YES
build test
# Common Coverage Steps
- name: Process 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:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Clean up spm build directory
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_16.1.app' }}
- name: Run iOS target tests
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@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: iOS,iOS${{ matrix.iOSVersion }},macOS,${{ env.XCODE_NAME }}
- name: Run watchOS target tests
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

- name: Upload Coverage
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: watchOS,watchOS${{ matrix.watchOSVersion }},macOS,${{ env.XCODE_NAME }}
flags: ${{ matrix.type && format('{0}{1}', matrix.type, matrix.osVersion) || 'spm' }}
4 changes: 2 additions & 2 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-openapi-runtime",
"state" : {
"revision" : "daa2fb54fe4a7f5187d7286047d5144c8cb97477",
"version" : "1.6.0"
"revision" : "5e119a3d52dde0229312ed586be99c666c6b6f64",
"version" : "1.7.0"
}
},
{
Expand Down

0 comments on commit bed7214

Please sign in to comment.