Skip to content

Commit

Permalink
CI/CI build and test, matrix platforms fix?
Browse files Browse the repository at this point in the history
Signed-off-by: Joseph Mattello <mail@joemattiello.com>
  • Loading branch information
JoeMatt committed Jan 27, 2024
1 parent 2f8096d commit c7a2f11
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 50 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,13 @@ jobs:
strategy:
matrix:
destination: [
'platform=iOS Simulator,OS=16.2,name=iPhone 14',
'platform=tvOS Simulator,OS=16.1,name=Apple TV 4']
'platform=Any iOS Simulator',
'platform=Any tvOS Simulator',
'platform=macOS,arch=x86_64',
'platform=macOS,arch=arm64',
'platform=macCatalyst,arch=x86_64',
'platform=macCatalyst,arch=arm64',
]
steps:
- name: Checkout
uses: actions/checkout@master
Expand Down
100 changes: 52 additions & 48 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:
- "Podfile.lock"
- "**/test.yml"
jobs:

swiftpm:
name: Test iOS (swiftpm)
runs-on: macOS-latest
Expand All @@ -24,6 +25,7 @@ jobs:
run: |
pod install
set -o pipefail && swift test --parallel
iOS:
name: Test iOS
runs-on: macOS-latest
Expand All @@ -32,67 +34,69 @@ jobs:
strategy:
matrix:
destination: [
'platform=iOS Simulator,iOS=16.2,name=iPhone 14'
]
'platform=iOS Simulator, OS: 16.2, name=iPhone 14 Pro Max',
'platform=tvOS Simulator, name=Apple TV 4K']
scheme: ["Hero", "Hero (tvOS)"]
include:
- destination: 'platform=iOS Simulator, OS: 16.2, name=iPhone 14 Pro Max'
scheme: "Hero"
- destination: 'platform=tvOS Simulator, name=Apple TV 4K'
scheme: "Hero (tvOS)"
steps:
- name: Checkout
uses: actions/checkout@master

- name: iOS - ${{ matrix.destination }}
run: |
pod install
set -o pipefail && xcodebuild clean test -workspace Hero.xcworkspace -scheme Hero -destination "${destination}" -configuration "Debug" -showBuildTimingSummary -enableThreadSanitizer YES -enableCodeCoverage YES CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO ONLY_ACTIVE_ARCH=YES | xcpretty
set -o pipefail && \
xcodebuild clean \
test \
-workspace Hero.xcworkspace \
-scheme "${scheme}"" \
-destination "${destination}" \
-configuration "Debug" \
-showBuildTimingSummary \
-parallelizeTargets \
-enableThreadSanitizer YES \
-enableCodeCoverage YES \
CODE_SIGN_IDENTITY="" \
CODE_SIGNING_REQUIRED=NO \
ONLY_ACTIVE_ARCH=YES \
| xcpretty
bash <(curl -s https://codecov.io/bash)
env:
destination: ${{ matrix.destination }}
scheme: ${{ matrix.scheme }}
- name: Upload Code Coverage
run: |
bash <(curl -s https://codecov.io/bash)
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
# iOS-legacy:
# name: Test iOS
# runs-on: macOS-latest
# env:
# DEVELOPER_DIR: /Applications/Xcode_10.3.1.app/Contents/Developer
# strategy:
# matrix:
# destination: [
# 'platform=iOS Simulator,OS=10.3.1,name=iPhone 7'
# ]
# steps:
# - name: Checkout
# uses: actions/checkout@master
# - name: iOS - ${{ matrix.destination }}
# run: |
# xcversion simulators --install='iOS 10.3.1'
# pod install
# set -o pipefail && xcodebuild clean test -workspace Hero.xcworkspace -scheme Hero -destination "${destination}" -parallelizeTargets -showBuildTimingSummary -enableThreadSanitizer YES -enableCodeCoverage YES CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO ONLY_ACTIVE_ARCH=NO | xcpretty
# bash <(curl -s https://codecov.io/bash)
# env:
# destination: ${{ matrix.destination }}
# - name: Upload Code Coverage
# run: |
# bash <(curl -s https://codecov.io/bash)
# env:
# CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
tvOS:
name: Test tvOS
runs-on: macOS-latest
env:
DEVELOPER_DIR: /Applications/Xcode_12.4.app/Contents/Developer
strategy:
matrix:
destination: [
'platform=tvOS Simulator,OS=14.3,name=Apple TV 4K'
]

steps:
- name: Checkout
uses: actions/checkout@master
- name: tvOS - ${{ matrix.destination }}
run: |
pod install
set -o pipefail && xcodebuild clean build -workspace Hero.xcworkspace -scheme "Hero (tvOS)" -destination "${destination}" -parallelizeTargets -showBuildTimingSummary -enableThreadSanitizer YES CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO ONLY_ACTIVE_ARCH=YES | xcpretty
env:
destination: ${{ matrix.destination }}
# iOS-legacy:
# name: Test iOS
# runs-on: macOS-latest
# env:
# DEVELOPER_DIR: /Applications/Xcode_10.3.1.app/Contents/Developer
# strategy:
# matrix:
# destination: [
# 'platform=iOS Simulator,OS=10.3.1,name=iPhone 7'
# ]
# steps:
# - name: Checkout
# uses: actions/checkout@master
# - name: iOS - ${{ matrix.destination }}
# run: |
# xcversion simulators --install='iOS 10.3.1'
# pod install
# set -o pipefail && xcodebuild clean test -workspace Hero.xcworkspace -scheme Hero -destination "${destination}" -parallelizeTargets -showBuildTimingSummary -enableThreadSanitizer YES -enableCodeCoverage YES CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO ONLY_ACTIVE_ARCH=NO | xcpretty
# bash <(curl -s https://codecov.io/bash)
# env:
# destination: ${{ matrix.destination }}
# - name: Upload Code Coverage
# run: |
# bash <(curl -s https://codecov.io/bash)
# env:
# CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

0 comments on commit c7a2f11

Please sign in to comment.