Repository navigation
77 lines (63 loc) · 1.68 KB
/
Copy pathci.yml
File metadata and controls
77 lines (63 loc) · 1.68 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
name: CI
on:
pull_request:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
validate:
name: Validate
runs-on: xcode-27
timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Show toolchain
run: |
sw_vers
xcode-select -p
xcodebuild -version
xcrun swift --version
- name: Cache Swift packages
uses: actions/cache@v5
with:
path: |
~/.swiftpm/cache
~/Library/Caches/org.swift.swiftpm
.build/xcode/SourcePackages
key: ${{ runner.os }}-swiftpm-${{ hashFiles('Package.resolved') }}
restore-keys: |
${{ runner.os }}-swiftpm-
- name: Setup
run: ./scripts/setup.sh
- name: Lint
run: ./scripts/lint.sh
- name: Build
run: ./scripts/build.sh
- name: Test
run: ./scripts/test.sh
- name: Verify snapshots
run: ./scripts/snapshots.sh verify
- name: Collect failed snapshots
if: failure()
run: |
mkdir -p .build/snapshot-failures
if [ -d "$TMPDIR/BlockInputViewSnapshotTests" ]; then
ditto "$TMPDIR/BlockInputViewSnapshotTests" .build/snapshot-failures
fi
- name: Upload test logs
if: failure()
uses: actions/upload-artifact@v7
with:
name: xcode-test-logs
path: |
.build/xcode/Logs/Test
.build/snapshot-failures
if-no-files-found: ignore
retention-days: 7