-
Notifications
You must be signed in to change notification settings - Fork 2
66 lines (59 loc) 路 1.72 KB
/
Copy pathpr_build_test.yml
File metadata and controls
66 lines (59 loc) 路 1.72 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
name: Build and Unit Tests
on:
push:
branches:
- main
paths:
- "Brew/**"
- "BrewTests/**"
- "BrewUITests/**"
- "Brew.xcodeproj/**"
- "Brew.entitlements"
- "Package.resolved"
- ".github/workflows/pr_build_test.yml"
pull_request:
types: [opened, reopened, synchronize]
paths:
- "Brew/**"
- "BrewTests/**"
- "BrewUITests/**"
- "Brew.xcodeproj/**"
- "Brew.entitlements"
- "Package.resolved"
- ".github/workflows/pr_build_test.yml"
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
build-and-test:
name: Build + unit tests
runs-on: macos-26
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Resolve package dependencies
run: xcodebuild -resolvePackageDependencies -project Brew.xcodeproj
- name: Build and test
run: |
set -o pipefail
xcodebuild test \
-project Brew.xcodeproj \
-scheme Brew-Unit \
-destination "platform=macOS" \
-skipPackagePluginValidation \
-skipMacroValidation \
CODE_SIGN_STYLE=Manual \
CODE_SIGN_IDENTITY=- \
CODE_SIGNING_REQUIRED=NO \
CODE_SIGNING_ALLOWED=NO \
| tee xcodebuild.log
- name: Upload logs on failure
if: failure() || cancelled()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: pr-build-test-logs
path: xcodebuild.log
retention-days: 7