-
Notifications
You must be signed in to change notification settings - Fork 292
65 lines (65 loc) · 2.66 KB
/
build.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
name: Build
on: [pull_request]
concurrency:
group: build-${{ github.event.number }}
cancel-in-progress: true
jobs:
cocoapods:
name: CocoaPods (Xcode 15.0.1)
runs-on: macOS-14-xlarge
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: Use Xcode 15.0.1
run: sudo xcode-select -switch /Applications/Xcode_15.0.1.app
- name: Install CocoaPod dependencies
run: pod install
- name: Run pod lib lint
run: pod lib lint
carthage:
name: Carthage (Xcode 15.0.1)
runs-on: macOS-14-xlarge
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: Use Xcode 15.0.1
run: sudo xcode-select -switch /Applications/Xcode_15.0.1.app
- name: Remove SPMTest
run: |
git checkout $GITHUB_HEAD_REF
rm -rf SampleApps/SPMTest
rm -rf /Users/runner/Library/Developer/Xcode/DerivedData
git add SampleApps/SPMTest
git commit -m 'Remove SPMTest app to avoid Carthage timeout'
- name: Use current branch
run: echo 'git "file://'$PWD'" "'$GITHUB_HEAD_REF'"' > SampleApps/CarthageTest/Cartfile
- name: Run carthage build
run: carthage build --no-skip-current --use-xcframeworks
- name: Run carthage update
run: cd SampleApps/CarthageTest && carthage update --use-xcframeworks
- name: Build CarthageTest
run: xcodebuild -project 'SampleApps/CarthageTest/CarthageTest.xcodeproj' -scheme 'CarthageTest' clean build CODE_SIGNING_ALLOWED=NO
spm:
name: SPM (Xcode 15.0.1)
runs-on: macOS-14-xlarge
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: Use Xcode 15.0.1
run: sudo xcode-select -switch /Applications/Xcode_15.0.1.app
- name: Use current branch
run: sed -i '' 's/branch = .*/branch = \"'"${GITHUB_HEAD_REF//\//\/}"'\";/' SampleApps/SPMTest/SPMTest.xcodeproj/project.pbxproj
- name: Run swift package resolve
run: cd SampleApps/SPMTest && swift package resolve
- name: Build & archive SPMTest
run: xcodebuild -project 'SampleApps/SPMTest/SPMTest.xcodeproj' -scheme 'SPMTest' clean build archive CODE_SIGNING_ALLOWED=NO