Skip to content

Commit 41bb3f1

Browse files
committed
Add GitHub Actions for CI builds
This moves us to a combination of GitHub Actions and Travis CI for our CI builds. This separation prefers GitHub Actions when available, since it has some advantages (more concurrent builds, artifact upload, etc.), but falls back to Travis CI for iOS versions that aren't easily supported with GitHub Actions.
1 parent 2df711c commit 41bb3f1

File tree

3 files changed

+50
-2
lines changed

3 files changed

+50
-2
lines changed

.github/workflows/ci.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
9+
jobs:
10+
xcode-build:
11+
name: Xcode Build
12+
runs-on: macOS-latest
13+
strategy:
14+
matrix:
15+
platform: ['iOS_13']
16+
fail-fast: false
17+
steps:
18+
- name: Checkout Repo
19+
uses: actions/checkout@v2
20+
- name: Bundle Install
21+
run: bundle install --gemfile=Example/Gemfile
22+
- name: Select Xcode Version
23+
run: sudo xcode-select --switch /Applications/Xcode_11.3.1.app/Contents/Developer
24+
- name: Pod Install
25+
run: bundle exec --gemfile=Example/Gemfile pod install --project-directory=Example
26+
- name: Build and Test
27+
run: Scripts/build.swift xcode ${{ matrix.platform }} `which xcpretty`
28+
- name: Upload Results
29+
uses: actions/upload-artifact@v2
30+
if: failure()
31+
with:
32+
name: Test Results
33+
path: .build/derivedData/**/Logs/Test/*.xcresult
34+
pod-lint:
35+
name: Pod Lint
36+
runs-on: macOS-latest
37+
steps:
38+
- name: Checkout Repo
39+
uses: actions/checkout@v2
40+
- name: Bundle Install
41+
run: bundle install --gemfile=Example/Gemfile
42+
- name: Pod Install
43+
run: bundle exec --gemfile=Example/Gemfile pod install --project-directory=Example
44+
- name: Lint Podspec
45+
run: bundle exec --gemfile=Example/Gemfile pod lib lint --verbose --fail-fast

.travis.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
language: objective-c
22
jobs:
3-
- osx_image: xcode11.3
4-
env: ACTIONS="xcode,pod-lint";PLATFORM="iOS_13"
53
- osx_image: xcode10.3
64
env: ACTIONS="xcode";PLATFORM="iOS_12"
75
- osx_image: xcode10.3

Scripts/build.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ enum Platform: String, CustomStringConvertible {
6161
}
6262
}
6363

64+
var derivedDataPath: String {
65+
return ".build/derivedData/\(rawValue)"
66+
}
67+
6468
var description: String {
6569
return rawValue
6670
}
@@ -136,6 +140,7 @@ xcodeBuildArguments.append(
136140
"-sdk", "iphonesimulator",
137141
"-PBXBuildsContinueAfterErrors=0",
138142
"-destination", platform.destination,
143+
"-derivedDataPath", platform.derivedDataPath,
139144
"ONLY_ACTIVE_ARCH=NO",
140145
]
141146
)

0 commit comments

Comments
 (0)