forked from bugsnag/bugsnag-cocoa
-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (47 loc) · 1.72 KB
/
pull_request.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
name: "Pull Request"
on: [pull_request]
jobs:
build:
runs-on: macos-latest
steps:
- name: Checkout base branch
uses: actions/checkout@v2
with:
ref: ${{ github.base_ref }}
- name: Build framework
# Base branch may not have the latest Makefile, so cannot use `make` here
run: |
xcodebuild -project Bugsnag.xcodeproj -configuration Release -scheme Bugsnag-iOS -destination generic/platform=iOS -derivedDataPath DerivedData -quiet clean build VALID_ARCHS=arm64
eval $(stat -s DerivedData/Build/Products/Release-iphoneos/Bugsnag.framework/Bugsnag)
echo $st_size > .size_before
rm -rf DerivedData
- name: Checkout PR branch
uses: actions/checkout@v2
with:
ref: ${{ github.ref }}
fetch-depth: 0
clean: false
- uses: actions/cache@v2
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
- name: Bundle install
run: |
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
- name: Build framework
run: |
make compile_commands.json
eval $(stat -s DerivedData/Build/Products/Release-iphoneos/Bugsnag.framework/Bugsnag)
echo $st_size > .size_after
- name: Infer
run: make infer
- name: OCLint
run: make oclint
- name: Danger
run: bundle exec danger
env:
# https://docs.github.com/en/free-pro-team@latest/actions/reference/authentication-in-a-workflow
DANGER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}