-
-
Notifications
You must be signed in to change notification settings - Fork 12
118 lines (108 loc) · 4.39 KB
/
build.yml
File metadata and controls
118 lines (108 loc) · 4.39 KB
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
name: build
permissions:
contents: read
on:
push:
branches: [main, dev]
paths-ignore:
- 'Docs/**' # Docs folder in root of repo
- '**/*.md' # .md files anywhere in the repo
- '**/LICENSE' # LICENSE files anywhere in the repo
- '**/.gitignore' # .gitignore files anywhere in the repo
pull_request:
branches: [main]
paths-ignore:
- 'Docs/**' # Docs folder in root of repo
- '**/*.md' # .md files anywhere in the repo
- '**/LICENSE' # LICENSE files anywhere in the repo
- '**/.gitignore' # .gitignore files anywhere in the repo
workflow_dispatch:
schedule:
- cron: '40 11 * * *' # once a day @ 11:40am UTC (4:40am PST)
env:
SCHEME: swift-timecode
WORKSPACEPATH: .swiftpm/xcode/package.xcworkspace
jobs:
macOS:
name: Tests (macOS)
runs-on: macos-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@main
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Build
run: xcodebuild build -skipMacroValidation -workspace "$WORKSPACEPATH" -scheme "$SCHEME" -destination "generic/platform=macOS" | xcbeautify --renderer github-actions && exit ${PIPESTATUS[0]}
- name: Unit Tests
run: xcodebuild test -skipMacroValidation -workspace "$WORKSPACEPATH" -scheme "$SCHEME" -destination "platform=macOS" | xcbeautify --renderer github-actions && exit ${PIPESTATUS[0]}
macOS-swift6-2:
name: Tests (macOS - Swift 6.2)
runs-on: macos-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@main
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Set Package to Swift 6.2
run: swift package tools-version --set "6.2"
- name: Build
run: xcodebuild build -skipMacroValidation -workspace "$WORKSPACEPATH" -scheme "$SCHEME" -destination "generic/platform=macOS" | xcbeautify --renderer github-actions && exit ${PIPESTATUS[0]}
- name: Unit Tests
run: xcodebuild test -skipMacroValidation -workspace "$WORKSPACEPATH" -scheme "$SCHEME" -destination "platform=macOS" | xcbeautify --renderer github-actions && exit ${PIPESTATUS[0]}
macCatalyst:
name: Tests (macCatalyst)
runs-on: macos-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@main
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Build
run: xcodebuild build -skipMacroValidation -workspace "$WORKSPACEPATH" -scheme "$SCHEME" -destination "generic/platform=macOS,variant=Mac Catalyst" | xcbeautify --renderer github-actions && exit ${PIPESTATUS[0]}
- name: Unit Tests
run: xcodebuild test -skipMacroValidation -workspace "$WORKSPACEPATH" -scheme "$SCHEME" -destination "platform=macOS,variant=Mac Catalyst" | xcbeautify --renderer github-actions && exit ${PIPESTATUS[0]}
device-simulators:
name: Tests
runs-on: macos-latest
strategy:
matrix:
target: [iOS, tvOS, watchOS, visionOS]
continue-on-error: true
timeout-minutes: 20
steps:
- uses: actions/checkout@main
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Prepare Device Simulator
id: sim-setup
uses: orchetect/setup-xcode-simulator@v1
with:
refresh: true
download: true
scheme: ${{ env.SCHEME }}
target: ${{ matrix.target }}
- name: Build
run: xcodebuild build -skipMacroValidation -workspace "$WORKSPACEPATH" -scheme "$SCHEME" -destination "generic/platform=$PLATFORMSHORT" | xcbeautify --renderer github-actions && exit ${PIPESTATUS[0]}
env:
PLATFORMSHORT: ${{ steps.sim-setup.outputs.platform-short }}
WORKSPACEPATH: ${{ steps.sim-setup.outputs.workspace-path }}
- name: Unit Tests
run: xcodebuild test -skipMacroValidation -workspace "$WORKSPACEPATH" -scheme "$SCHEME" -destination "platform=$PLATFORM,id=$ID" | xcbeautify --renderer github-actions && exit ${PIPESTATUS[0]}
env:
ID: ${{ steps.sim-setup.outputs.id }}
PLATFORM: ${{ steps.sim-setup.outputs.platform }}
WORKSPACEPATH: ${{ steps.sim-setup.outputs.workspace-path }}
linux:
name: Tests (Linux)
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@main
- name: Build
run: swift build
- name: Unit Tests
run: swift test