Merge pull request #3679 from dreampiggy/ci/visionOS

[github-action] Try to workaround visionOS simulator bug in unit tests
This commit is contained in:
DreamPiggy 2024-02-24 15:56:06 +08:00 committed by GitHub
commit 7f05e213a9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 10 additions and 7 deletions

View File

@ -103,7 +103,7 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
platform: [iOS, macOS, tvOS, visionOS] platform: [iOS, macOS, tvOS]
include: include:
- platform: iOS - platform: iOS
destination: platform=iOS Simulator,name=iPhone 15 Pro destination: platform=iOS Simulator,name=iPhone 15 Pro
@ -114,12 +114,14 @@ jobs:
- platform: tvOS - platform: tvOS
destination: platform=tvOS Simulator,name=Apple TV 4K (3rd generation) destination: platform=tvOS Simulator,name=Apple TV 4K (3rd generation)
scheme: TV scheme: TV
- platform: visionOS # - platform: visionOS
destination: platform=visionOS Simulator,name=Apple Vision Pro # destination: platform=visionOS Simulator,name=Apple Vision Pro
scheme: Vision # scheme: Vision
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install Cocoapods - name: Install Cocoapods
run: gem install cocoapods --no-document --quiet run: gem install cocoapods --no-document --quiet
@ -141,15 +143,16 @@ jobs:
- name: Run test - name: Run test
run: | run: |
set -o pipefail set -o pipefail
xcodebuild test -workspace "${{ env.WORKSPACE_NAME }}" -scheme "Tests ${{ matrix.scheme }}" -destination "${{ matrix.destination }}" -configuration Debug CODE_SIGNING_ALLOWED=NO xcodebuild build-for-testing -workspace "${{ env.WORKSPACE_NAME }}" -scheme "Tests ${{ matrix.scheme }}" -destination "${{ matrix.destination }}" -configuration Debug CODE_SIGNING_ALLOWED=NO | xcpretty -c
mv ~/Library/Developer/Xcode/DerivedData/ "./DerivedData/{{ matrix.platform }}" xcodebuild test-without-building -workspace "${{ env.WORKSPACE_NAME }}" -scheme "Tests ${{ matrix.scheme }}" -destination "${{ matrix.destination }}" -configuration Debug CODE_SIGNING_ALLOWED=NO
mv ~/Library/Developer/Xcode/DerivedData/ "./DerivedData/${{ matrix.platform }}"
- name: Code Coverage - name: Code Coverage
run: | run: |
set -o pipefail set -o pipefail
export PATH="/usr/local/opt/curl/bin:$PATH" export PATH="/usr/local/opt/curl/bin:$PATH"
curl --version curl --version
bash <(curl -s https://codecov.io/bash) -v -D "./DerivedData/{{ matrix.platform }}" -J '^SDWebImage$' -c -X gcov -F "{{ matrix.platform }}" bash <(curl -s https://codecov.io/bash) -v -D "./DerivedData/${{ matrix.platform }}" -J '^SDWebImage$' -c -X gcov -F "${{ matrix.platform }}"
Build: Build:
name: Build Library name: Build Library