-
-
Notifications
You must be signed in to change notification settings - Fork 8
92 lines (79 loc) · 4.81 KB
/
build.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
84
85
86
87
88
89
90
91
92
name: build
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)
jobs:
macOS:
name: macOS
runs-on: macos-latest
steps:
- uses: actions/checkout@main
- name: Build
run: xcodebuild build -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "OSCKit-CI" -destination "generic/platform=macOS,name=Any Mac"
- name: Unit Tests
run: xcodebuild test -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "OSCKit-CI" -destination "platform=macOS"
macCatalyst:
name: macCatalyst
runs-on: macos-latest
steps:
- uses: actions/checkout@main
- name: Build
run: xcodebuild build -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "OSCKit-CI" -destination "generic/platform=macOS,variant=Mac Catalyst,name=Any Mac"
- name: Unit Tests
run: xcodebuild test -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "OSCKit-CI" -destination "platform=macOS,variant=Mac Catalyst"
iOS:
name: iOS
runs-on: macos-latest # this must be macOS, GitHub does not offer iOS directly but we can use xcodebuild
steps:
- uses: actions/checkout@main
- name: iPhone 12 Simulator - Build
run: xcodebuild build -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "OSCKit-CI" -destination "generic/platform=iOS Simulator,name=Any iOS Device"
- name: iPhone 12 Simulator - Unit Tests
run: xcodebuild test -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "OSCKit-CI" -destination "platform=iOS Simulator,name=iPhone 12"
tvOS:
name: tvOS
runs-on: macos-latest # this must be macOS, GitHub does not offer tvOS directly but we can use xcodebuild
steps:
- uses: actions/checkout@main
- name: Apple TV - Build
run: xcodebuild build -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "OSCKit-CI" -destination "generic/platform=tvOS Simulator,name=Any tvOS Simulator Device"
- name: Apple TV - Unit Tests
run: xcodebuild test -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "OSCKit-CI" -destination "platform=tvOS Simulator,name=Apple TV 4K (2nd generation)"
Examples:
name: Examples
runs-on: macos-latest
steps:
- uses: actions/checkout@main
- name: OSCKitBasicExample - Resolve Package Dependencies # needed because sometimes xcodebuild fails otherwise
run: xcodebuild -project "Examples/OSCKitBasicExample/OSCKitBasicExample.xcodeproj" -resolvePackageDependencies
- name: OSCKitBasicExample - Build
run: xcodebuild build -project "Examples/OSCKitBasicExample/OSCKitBasicExample.xcodeproj" -scheme "OSCKitBasicExample" -destination "generic/platform=macOS,name=Any Mac"
- name: OSCKitMethodBlocksExample - Resolve Package Dependencies # needed because sometimes xcodebuild fails otherwise
run: xcodebuild -project "Examples/OSCKitMethodBlocksExample/OSCKitMethodBlocksExample.xcodeproj" -resolvePackageDependencies
- name: OSCKitMethodBlocksExample - Build
run: xcodebuild build -project "Examples/OSCKitMethodBlocksExample/OSCKitMethodBlocksExample.xcodeproj" -scheme "OSCKitMethodBlocksExample" -destination "generic/platform=macOS,name=Any Mac"
- name: OSCKitMethodIDsExample - Resolve Package Dependencies # needed because sometimes xcodebuild fails otherwise
run: xcodebuild -project "Examples/OSCKitMethodIDsExample/OSCKitMethodIDsExample.xcodeproj" -resolvePackageDependencies
- name: OSCKitMethodIDsExample - Build
run: xcodebuild build -project "Examples/OSCKitMethodIDsExample/OSCKitMethodIDsExample.xcodeproj" -scheme "OSCKitMethodIDsExample" -destination "generic/platform=macOS,name=Any Mac"
- name: OSCKitSocketExample - Resolve Package Dependencies # needed because sometimes xcodebuild fails otherwise
run: xcodebuild -project "Examples/OSCKitSocketExample/OSCKitSocketExample.xcodeproj" -resolvePackageDependencies
- name: OSCKitSocketExample - Build
run: xcodebuild build -project "Examples/OSCKitSocketExample/OSCKitSocketExample.xcodeproj" -scheme "OSCKitSocketExample" -destination "generic/platform=macOS,name=Any Mac"
# xcodebuild test reference:
# https://developer.apple.com/library/archive/documentation/DeveloperTools/Conceptual/testing_with_xcode/chapters/08-automation.html