Skip to content

Commit 3e3527d

Browse files
committed
Migrate the main ci from travis-ci to github actions
1 parent 9fbb7df commit 3e3527d

File tree

2 files changed

+71
-45
lines changed

2 files changed

+71
-45
lines changed

.github/workflows/ci.yml

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: ci
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- '*'
10+
11+
jobs:
12+
build:
13+
runs-on: macOS-11.15
14+
steps:
15+
- uses: actions/checkout@v1
16+
- name: "Swift 5.1"
17+
run: xcodebuild -scheme FloatingPanel SWIFT_VERSION=5.1 clean build
18+
env:
19+
DEVELOPER_DIR: /Applications/Xcode_11.3.1.app/Contents/Developer
20+
- name: "Swift 5.2"
21+
run: xcodebuild -scheme FloatingPanel SWIFT_VERSION=5.2 clean build
22+
env:
23+
DEVELOPER_DIR: /Applications/Xcode_11.7.app/Contents/Developer
24+
- name: "Swift 5.3"
25+
run: xcodebuild -scheme FloatingPanel SWIFT_VERSION=5.3 clean build
26+
env:
27+
DEVELOPER_DIR: /Applications/Xcode_12.3.app/Contents/Developer
28+
29+
testing:
30+
runs-on: macOS-10.15
31+
steps:
32+
- uses: actions/checkout@v1
33+
- name: "Testing in iOS 13.7"
34+
run: xcodebuild clean test -scheme FloatingPanel -workspace FloatingPanel.xcworkspace -destination 'platform=iOS Simulator,OS=13.7,name=iPhone 11 Pro'
35+
env:
36+
DEVELOPER_DIR: /Applications/Xcode_11.7.app/Contents/Developer
37+
- name: "Testing in iOS 14.3"
38+
run: xcodebuild clean test -scheme FloatingPanel -workspace FloatingPanel.xcworkspace -destination 'platform=iOS Simulator,OS=14.3,name=iPhone 12 Pro'
39+
env:
40+
DEVELOPER_DIR: /Applications/Xcode_12.3.app/Contents/Developer
41+
42+
example:
43+
runs-on: macOS-10.15
44+
env:
45+
DEVELOPER_DIR: /Applications/Xcode_12.3.app/Contents/Developer
46+
steps:
47+
- uses: actions/checkout@v1
48+
- name: "Build Maps"
49+
run: xcodebuild -workspace FloatingPanel.xcworkspace -scheme Maps -sdk iphonesimulator clean build
50+
- name: "Build Stocks"
51+
run: xcodebuild -workspace FloatingPanel.xcworkspace -scheme Stocks -sdk iphonesimulator clean build
52+
- name: "Build Samples"
53+
run: xcodebuild -workspace FloatingPanel.xcworkspace -scheme Samples -sdk iphonesimulator clean build
54+
55+
swiftpm:
56+
runs-on: macOS-10.15
57+
env:
58+
DEVELOPER_DIR: /Applications/Xcode_12.3.app/Contents/Developer
59+
steps:
60+
- uses: actions/checkout@v1
61+
- name: "Swift Package build"
62+
run: swift build -Xswiftc "-sdk" -Xswiftc "`xcrun --sdk iphonesimulator --show-sdk-path`" -Xswiftc "-target" -Xswiftc "x86_64-apple-ios14.3-simulator"
63+
64+
cocoapods:
65+
runs-on: macOS-10.15
66+
steps:
67+
- uses: actions/checkout@v1
68+
- name: "CocoaPods: pod lib lint"
69+
run: pod lib lint --allow-warnings
70+
- name: "CocoaPods: pod spec lint"
71+
run: pod spec lint --allow-warnings

.travis.yml

-45
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,6 @@ env:
88
- LC_ALL=en_US.UTF-8
99
jobs:
1010
include:
11-
- stage: "Builds"
12-
script: xcodebuild -scheme FloatingPanel SWIFT_VERSION=5.1 SUPPORTS_MACCATALYST=NO clean build
13-
# SUPPORTS_MACCATALYST=NO because Xcode 11 runs on macOS 10.14 in Travis CI
14-
osx_image: xcode11.3
15-
name: "Swift 5.1"
16-
- script: xcodebuild -scheme FloatingPanel SWIFT_VERSION=5.2 clean build
17-
osx_image: xcode11.6
18-
name: "Swift 5.2"
19-
- script: xcodebuild -scheme FloatingPanel SWIFT_VERSION=5.3 clean build
20-
osx_image: xcode12
21-
name: "Swift 5.3"
22-
2311
- stage: "Tests"
2412
script: xcodebuild clean test -scheme FloatingPanel -workspace FloatingPanel.xcworkspace -destination 'platform=iOS Simulator,OS=10.3.1,name=iPhone SE (1st generation)'
2513
osx_image: xcode11.6
@@ -30,31 +18,6 @@ jobs:
3018
- script: xcodebuild clean test -scheme FloatingPanel -workspace FloatingPanel.xcworkspace -destination 'platform=iOS Simulator,OS=12.4,name=iPhone X'
3119
osx_image: xcode11.6
3220
name: "iPhone X (iOS 12.4)"
33-
- script: xcodebuild clean test -scheme FloatingPanel -workspace FloatingPanel.xcworkspace -destination 'platform=iOS Simulator,OS=13.6,name=iPhone 11'
34-
osx_image: xcode11.6
35-
name: "iPhone X (iOS 13.6)"
36-
37-
- stage: "Build examples"
38-
osx_image: xcode11.6
39-
script: xcodebuild -workspace FloatingPanel.xcworkspace -scheme Maps -sdk iphonesimulator clean build
40-
name: "Maps"
41-
- script: xcodebuild -workspace FloatingPanel.xcworkspace -scheme Stocks -sdk iphonesimulator clean build
42-
osx_image: xcode11.6
43-
name: "Stocks"
44-
- script: xcodebuild -workspace FloatingPanel.xcworkspace -scheme Samples -sdk iphonesimulator clean build
45-
osx_image: xcode11.6
46-
name: "Samples"
47-
- script: xcodebuild -workspace FloatingPanel.xcworkspace -scheme SamplesObjC -sdk iphonesimulator clean build
48-
osx_image: xcode11.6
49-
name: "SamplesObjC"
50-
51-
- stage: "Swift Package Manager"
52-
script: swift build -Xswiftc "-sdk" -Xswiftc "`xcrun --sdk iphoneos --show-sdk-path`" -Xswiftc "-target" -Xswiftc "arm64-apple-ios13.0"
53-
osx_image: xcode11.6
54-
name: "iPhone OS"
55-
- script: swift build -Xswiftc "-sdk" -Xswiftc "`xcrun --sdk iphonesimulator --show-sdk-path`" -Xswiftc "-target" -Xswiftc "x86_64-apple-ios13.0-simulator"
56-
osx_image: xcode11.6
57-
name: "iPhone Simulator"
5821

5922
- stage: "Carthage"
6023
# Carthage doesn't fix the issue with Xcode 12: https://github.com/Carthage/Carthage/releases/tag/0.36.0
@@ -64,11 +27,3 @@ jobs:
6427
- brew outdated carthage || brew upgrade carthage
6528
script:
6629
- carthage build --no-skip-current
67-
68-
- stage: "CocoaPods"
69-
osx_image: xcode11.6
70-
before_install:
71-
- gem install cocoapods
72-
script:
73-
- pod spec lint --allow-warnings
74-
- pod lib lint --allow-warnings

0 commit comments

Comments
 (0)