-
Notifications
You must be signed in to change notification settings - Fork 1
102 lines (94 loc) · 3.32 KB
/
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches:
- master
- develop
- develop-**
pull_request:
branches:
- master
- develop
- develop-**
env:
LANG: en_US.UTF-8
BSDiff_WORKSPACE: "BSDiff.xcworkspace"
BSDiff_PROJECT: "BSDiff.xcodeproj"
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
Cocoapods_Lint:
runs-on: macOS-14
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.sha }}
- name: cocoapods_lint
run: pod lib lint --allow-warnings --verbose
Carthage_Lint:
runs-on: macOS-13
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.sha }}
- name: carthage_lint
run: carthage build --no-skip-current --use-xcframeworks
Build_Examples:
runs-on: macOS-14
strategy:
matrix:
sdk: [ iOS16.4, iOS17.0 ]
include:
- sdk: iOS17.0
developer_dir: /Applications/Xcode_15.0.1.app
destination: OS=17.0,name=iPhone 15 Pro
scheme: BSDiffExample
- sdk: iOS16.4
developer_dir: /Applications/Xcode_14.3.1.app
destination: OS=16.4,name=iPhone 14 Pro
scheme: BSDiffExample
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.sha }}
- name: bundle_install
run: |
xcrun simctl list
bundle install
pod install
- name: build_examples
env:
DEVELOPER_DIR: ${{ matrix.developer_dir }}
run: |
echo ""
set -o pipefail
xcodebuild -version -sdk
xcodebuild build -workspace "${{ env.BSDiff_WORKSPACE }}" -scheme "${{ matrix.scheme }}" -destination "${{ matrix.destination }}" ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO | bundle exec xcpretty -c;
Unit_Tests:
runs-on: macos-10.15
strategy:
matrix:
sdk: [iOS17.0]
include:
- sdk: iOS17.0
developer_dir: /Applications/Xcode_15.0.1.app
destination: OS=17.0,name=iPhone 15 Pro
scheme: BSDiff
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.sha }}
- name: bundle_install
run: |
xcrun simctl list
bundle install
- name: unit_tests
env:
DEVELOPER_DIR: ${{ matrix.developer_dir }}
run: |
set -o pipefail
xcodebuild build build-for-testing -project "${{ env.BSDiff_PROJECT }}" -scheme "${{ matrix.scheme }}" -destination "${{ matrix.destination }}" -configuration Debug ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES ONLY_ACTIVE_ARCH=YES | bundle exec xcpretty -c;
xcodebuild analyze test-without-building -project "${{ env.BSDiff_PROJECT }}" -scheme "${{ matrix.scheme }}" -destination "${{ matrix.destination }}" -configuration Debug ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES ONLY_ACTIVE_ARCH=YES | bundle exec xcpretty -c;
- uses: codecov/codecov-action@v1