Skip to content

Commit

Permalink
Extend CI for tvOS
Browse files Browse the repository at this point in the history
  • Loading branch information
lunij committed Jun 24, 2024
1 parent 74934b5 commit e44c2a9
Show file tree
Hide file tree
Showing 10 changed files with 41 additions and 4 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,39 @@ jobs:
name: xcresult-ios${{ matrix.ios }}.zip
path: .xcresults/xcresult-ios.zip

tvos:
strategy:
matrix:
include:
- tvos: "16.4"
macos: "13"
xcode: "14.3.1"
swift: "5.8.1"
- tvos: "17.5"
macos: "14"
xcode: "15.4"
swift: "5.10"

name: tvOS ${{ matrix.tvos }}, macOS ${{ matrix.macos }}, Xcode ${{ matrix.xcode }}, Swift ${{ matrix.swift }}
runs-on: macos-${{ matrix.macos }}
steps:
- uses: actions/checkout@v4
- name: Select Xcode ${{ matrix.xcode }}
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app
- name: Run tests
id: run-tests
run: make test-tvos TVOS_VERSION="${{ matrix.tvos }}"
- name: Zip XCResult
id: zip-xcresult
if: failure() && steps.run-tests.conclusion == 'failure'
run: cd .xcresults; zip -r xcresult-tvos.zip tvos.xcresult
- name: Upload XCResult
if: failure() && steps.zip-xcresult.conclusion == 'success'
uses: actions/upload-artifact@v4
with:
name: xcresult-tvos${{ matrix.tvos }}.zip
path: .xcresults/xcresult-tvos.zip

ubuntu:
strategy:
matrix:
Expand Down
12 changes: 8 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,18 @@ test-ios:
-resultBundlePath .xcresults/ios \
-workspace . | xcbeautify

test-swift:
swift test
TVOS_VERSION ?= 16.4

test-tvos:
set -o pipefail && \
xcodebuild test \
-scheme SnapshotTesting \
-destination platform="tvOS Simulator,name=Apple TV 4K,OS=13.3"
-scheme swift-snapshot-testing-Package \
-destination platform="tvOS Simulator,name=Apple TV 4K (3rd generation),OS=$(TVOS_VERSION)" \
-resultBundlePath .xcresults/tvos \
-workspace . | xcbeautify

test-swift:
swift test

format:
swift format \
Expand Down
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit e44c2a9

Please sign in to comment.