-
Notifications
You must be signed in to change notification settings - Fork 2
130 lines (106 loc) · 3.79 KB
/
pull-request.yml
File metadata and controls
130 lines (106 loc) · 3.79 KB
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
name: Pull Request
on:
pull_request:
paths-ignore:
- '*.md'
- '.github/**'
- Bucketeer/Sources/Internal/Utils/Version.swift
- Bucketeer.podspec
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
XCODE_VERSION: '16.2'
jobs:
generate-xcode-project:
uses: ./.github/workflows/generate-xcode-project.yml
lint-swift:
needs: generate-xcode-project
runs-on: macos-14-xlarge
steps:
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
# Pre-cache mint packages directory
- name: Cache Mint packages
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
with:
path: |
~/.mint
~/Library/Caches/Mint
~/Library/Developer/Xcode/DerivedData
~/.swiftpm
key: ${{ runner.os }}-mint-packages-${{ hashFiles('**/Mintfile') }}-v4
restore-keys: |
${{ runner.os }}-mint-packages-${{ hashFiles('**/Mintfile') }}-
${{ runner.os }}-mint-packages-
# Use setup-mint action with optimized settings
- name: Setup Mint
uses: irgaly/setup-mint@d61b6ece0c0f5486ea8a17de6026e8da5468af60 # v1.7.0
with:
bootstrap: true
bootstrap-link: true
use-cache: true
cache-prefix: "mint-setup-v4"
clean: true
- name: Lint swift
run: mint run swiftlint --strict
lint-pod:
runs-on: macos-14-xlarge
steps:
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
- name: Lint Pods
run: pod lib lint --allow-warnings
build:
needs: generate-xcode-project
runs-on: macos-14-xlarge
steps:
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
- name: Select Xcode version
run: sudo xcode-select -s '/Applications/Xcode_${{ env.XCODE_VERSION }}.app/Contents/Developer'
- name: Download xcode project file
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: output-xcodeproj-file
path: ./Bucketeer.xcodeproj
- name: Build
env:
CI: true
run: make build
build-example:
needs: generate-xcode-project
runs-on: macos-14-xlarge
steps:
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
- name: Select Xcode version
run: sudo xcode-select -s '/Applications/Xcode_${{ env.XCODE_VERSION }}.app/Contents/Developer'
- name: Download environment file
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: output-environment-file
path: ./environment.xcconfig
- name: Download xcode project file
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: output-xcodeproj-file
path: ./Bucketeer.xcodeproj
- name: Build example
env:
CI: true
run: make build-example
unit-test:
needs: generate-xcode-project
runs-on: macos-14-xlarge
steps:
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
- name: Select Xcode version
run: sudo xcode-select -s '/Applications/Xcode_${{ env.XCODE_VERSION }}.app/Contents/Developer'
- name: Download xcode project file
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: output-xcodeproj-file
path: ./Bucketeer.xcodeproj
- name: Build for testing
env:
CI: true
run: make build-for-testing
- name: Unit Test
run: make test-without-building