This repository has been archived by the owner on Oct 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 22
64 lines (54 loc) · 1.88 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
name: CI
on: [push]
env:
CI_DERIVED_DATA_PATH: "${{ github.workspace }}/DerivedData"
CI_RESULT_BUNDLE_PATH: "${{ github.workspace }}/resultbundle.xcresult"
CI_XCODE_PROJECT: Aware.xcodeproj
CI_XCODE_SCHEME: Aware
jobs:
build:
runs-on: macos-14
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- name: Set Xcode version
run: sudo xcode-select --switch /Applications/Xcode_15.3.app
- name: Print Xcode version
run: xcodebuild -version -sdk
- name: Resolve package dependencies
run: |
xcodebuild -resolvePackageDependencies \
-project "$CI_XCODE_PROJECT" \
-scheme "$CI_XCODE_SCHEME" \
-derivedDataPath "$CI_DERIVED_DATA_PATH" \
| xcpretty
exit ${PIPESTATUS[0]}
- name: Build
run: |
xcodebuild build-for-testing \
-scheme "$CI_XCODE_SCHEME" \
-project "$CI_XCODE_PROJECT" \
-derivedDataPath "$CI_DERIVED_DATA_PATH" \
-resultBundlePath "build-for-testing.xcresult" \
CODE_SIGN_IDENTITY=- \
AD_HOC_CODE_SIGNING_ALLOWED=YES \
| xcpretty
exit ${PIPESTATUS[0]}
- name: Test
run: |
xcodebuild test-without-building \
-scheme "$CI_XCODE_SCHEME" \
-project "$CI_XCODE_PROJECT" \
-derivedDataPath "$CI_DERIVED_DATA_PATH" \
-resultBundlePath "test-without-building.xcresult" \
-test-timeouts-enabled YES \
-maximum-test-execution-time-allowance 1800 \
| xcpretty
exit ${PIPESTATUS[0]}
- name: Upload xcresult
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.platform }}-test-xcresult
path: "*.xcresult"
if-no-files-found: error
retention-days: 7