generated from StanfordBDHG/SwiftPackageTemplate
-
-
Notifications
You must be signed in to change notification settings - Fork 4
83 lines (80 loc) · 3.34 KB
/
build-and-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#
# This source file is part of the Stanford Spezi open source project
#
# SPDX-FileCopyrightText: 2022 Stanford University and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
#
name: Build and Test
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
jobs:
package_ios:
name: Build and Test Swift Package iOS
uses: StanfordSpezi/.github/.github/workflows/xcodebuild-or-fastlane.yml@v2
with:
runsonlabels: '["macOS", "self-hosted", "spezi"]'
scheme: SpeziBluetooth-Package
artifactname: SpeziBluetooth-iOS.xcresult
resultBundle: SpeziBluetooth-iOS.xcresult
buildandtest_visionos:
name: Build and Test Swift Package visionOS
uses: StanfordSpezi/.github/.github/workflows/xcodebuild-or-fastlane.yml@v2
with:
runsonlabels: '["macOS", "self-hosted"]'
scheme: SpeziBluetooth-Package
destination: 'platform=visionOS Simulator,name=Apple Vision Pro'
resultBundle: SpeziBluetooth-visionOS.xcresult
artifactname: SpeziBluetooth-visionOS.xcresult
buildandtest_watchos:
name: Build and Test Swift Package watchOS
uses: StanfordSpezi/.github/.github/workflows/xcodebuild-or-fastlane.yml@v2
with:
runsonlabels: '["macOS", "self-hosted"]'
scheme: SpeziBluetooth-Package
destination: 'platform=watchOS Simulator,name=Apple Watch Series 9 (45mm)'
resultBundle: SpeziBluetooth-watchOS.xcresult
artifactname: SpeziBluetooth-watchOS.xcresult
buildandtest_tvos:
name: Build and Test Swift Package tvOS
uses: StanfordSpezi/.github/.github/workflows/xcodebuild-or-fastlane.yml@v2
with:
runsonlabels: '["macOS", "self-hosted"]'
scheme: SpeziBluetooth-Package
destination: 'platform=tvOS Simulator,name=Apple TV 4K (3rd generation)'
resultBundle: SpeziBluetooth-tvOS.xcresult
artifactname: SpeziBluetooth-tvOS.xcresult
ios:
name: Build and Test iOS
uses: StanfordSpezi/.github/.github/workflows/xcodebuild-or-fastlane.yml@v2
with:
runsonlabels: '["macOS", "self-hosted", "spezi"]'
path: 'Tests/UITests'
scheme: TestApp
artifactname: TestApp-iOS.xcresult
resultBundle: TestApp-iOS.xcresult
macos:
name: Build and Test macOS
uses: StanfordSpezi/.github/.github/workflows/xcodebuild-or-fastlane.yml@v2
permissions:
contents: read
with:
runsonlabels: '["macOS", "self-hosted", "bluetooth"]'
path: 'Tests/UITests'
setupsigning: true
artifactname: TestApp-macOS.xcresult
resultBundle: TestApp-macOS.xcresult
customcommand: "set -o pipefail && xcodebuild test -scheme 'TestApp' -configuration 'Test' -destination 'platform=macOS,arch=arm64,variant=Mac Catalyst' -derivedDataPath '.derivedData' -resultBundlePath 'TestApp-macOS.xcresult' -skipPackagePluginValidation -skipMacroValidation | xcbeautify"
secrets: inherit
uploadcoveragereport:
name: Upload Coverage Report
needs: [package_ios, buildandtest_visionos, buildandtest_watchos, buildandtest_tvos, ios, macos]
uses: StanfordSpezi/.github/.github/workflows/create-and-upload-coverage-report.yml@v2
with:
coveragereports: SpeziBluetooth-iOS.xcresult SpeziBluetooth-visionOS.xcresult SpeziBluetooth-watchOS.xcresult SpeziBluetooth-tvOS.xcresult TestApp-iOS.xcresult TestApp-macOS.xcresult
secrets:
token: ${{ secrets.CODECOV_TOKEN }}