-
Notifications
You must be signed in to change notification settings - Fork 144
68 lines (47 loc) · 4.44 KB
/
github-actions-ci.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
name: Run CI
on: [push, pull_request]
jobs:
CI:
runs-on: macos-latest
# ℹ️ Available GitHub Actions Runner Images
# https://github.com/actions/runner-images
steps:
- name: Checkout
uses: actions/checkout@v2
- run: bundle install
- run: pod install --repo-update
- name: Set Xcode Version 14.2.0 (iOS 16.2)
run: sudo xcode-select -s /Applications/Xcode_14.2.0.app
- name: Build PinLayout-iOS
run: set -o pipefail && xcodebuild build -project PinLayout.xcodeproj -scheme PinLayout-iOS -sdk iphonesimulator16.2 -destination 'platform=iOS Simulator,name=iPhone SE (3rd generation),OS=16.2' | xcpretty
- name: Build PinLayout-tvOS
run: set -o pipefail && xcodebuild build -project PinLayout.xcodeproj -scheme PinLayout-tvOS -sdk appletvsimulator16.1 -destination 'platform=tvOS Simulator,name=Apple TV 4K (2nd generation),OS=16.1' | xcpretty
- name: Build PinLayout-macOS
run: set -o pipefail && xcodebuild build -project PinLayout.xcodeproj -scheme PinLayout-macOS -sdk macosx13.1 | xcpretty
- name: Build PinLayoutSample - iOS 16.2
run: set -o pipefail && xcodebuild build -workspace PinLayout.xcworkspace -scheme PinLayoutSample -sdk iphonesimulator16.2 -destination 'platform=iOS Simulator,name=iPhone SE (3rd generation),OS=16.2' | xcpretty
- name: iOS unit tests
run: set -o pipefail && xcodebuild build test -workspace PinLayout.xcworkspace -scheme PinLayout-iOS -sdk iphonesimulator16.2 -destination 'platform=iOS Simulator,name=iPhone SE (3rd generation),OS=16.2' | xcpretty
# # - name: tvOS unit tests
# # run: set -o pipefail && xcodebuild build test -workspace PinLayout.xcworkspace -scheme PinLayout-tvOS -sdk appletvos16.1 -destination 'platform=tvOS Simulator,name=Apple TV 4K (2nd generation),OS=16.2' | xcpretty
# # - name: macOS unit tests
# # run: set -o pipefail && xcodebuild test -workspace PinLayout.xcworkspace -scheme PinLayout-macOS -sdk macosx12.1 -destination 'platform=macOS,name=Any Mac' | xcpretty
- name: Cocoapods - iOS Empty project
run: set -o pipefail && cd TestProjects/cocoapods/ios && arch -x86_64 pod install && xcodebuild build -workspace PinLayout-iOS.xcworkspace -scheme PinLayout-iOS -sdk iphonesimulator16.2 -destination 'platform=iOS Simulator,name=iPhone SE (3rd generation),OS=16.2' | xcpretty && cd ../../..
# - name: Cocoapods - macOS Empty project
# run: set -o pipefail && cd TestProjects/cocoapods/macos && arch -x86_64 pod install && xcodebuild build -workspace PinLayout-macOS.xcworkspace -scheme PinLayout-macOS -sdk macosx12.1 | xcpretty && cd ../../..
# - name: Cocoapods - tvOS Empty project
# run: set -o pipefail && cd TestProjects/cocoapods/tvos && arch -x86_64 pod install && xcodebuild build -workspace PinLayout-tvOS.xcworkspace -scheme PinLayout-tvOS -sdk appletvsimulator16.1 -destination 'platform=tvOS Simulator,name=Apple TV 4K (2nd generation),OS=16.1' | xcpretty && cd ../../..
# - name: Carthage - iOS Empty project
# run: set -o pipefail && cd TestProjects/carthage/ios && rm Cartfile && echo "git \"file:///$BASEDIR\"" > Cartfile && carthage update --use-ssh --platform iOS --use-xcframeworks && xcodebuild build -project PinLayout-Carthage-iOS.xcodeproj -scheme PinLayout-Carthage-iOS -sdk iphonesimulator16.2 -destination 'platform=iOS Simulator,name=iPhone SE (3rd generation),OS=16.2' | xcpretty && rm Cartfile.resolved && cd ../../..
- name: Swift Package Manager - iOS Empty project
run: set -o pipefail && cd TestProjects/swift-package-manager/ios && rm -rf .build && xcodebuild build -project PinLayout-SPM-iOS.xcodeproj -scheme PinLayout-SPM-iOS -sdk iphonesimulator16.2 -destination 'platform=iOS Simulator,name=iPhone SE (3rd generation),OS=16.2' | xcpretty && cd ../../..
- name: Set XCode Version 13.4.1 (iOS 15.5)
run: sudo xcode-select -s /Applications/Xcode_13.4.1.app
- name: Build PinLayoutSample - iOS 15.5
run: set -o pipefail && xcodebuild clean build -workspace PinLayout.xcworkspace -scheme PinLayoutSample -sdk iphonesimulator15.5 -destination 'platform=iOS Simulator,name=iPhone 8,OS=15.5' | xcpretty
- name: Pod lib lint
run: set -o pipefail && bundle exec pod lib lint --allow-warnings
- name: Codecov
run: bash <(curl -s https://codecov.io/bash) -D /tmp/PinLayout
- run: echo "🍏 This job's status is ${{ job.status }}."