forked from pointfreeco/sqlite-data
-
Notifications
You must be signed in to change notification settings - Fork 0
89 lines (85 loc) · 2.49 KB
/
ci.yml
File metadata and controls
89 lines (85 loc) · 2.49 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
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- '*'
workflow_dispatch:
jobs:
library:
name: macOS (Swift ${{ matrix.swift }}, ${{ matrix.config }})
strategy:
matrix:
include:
- xcode: '16.0'
swift: '6.0'
config: 'debug'
- xcode: '16.0'
swift: '6.0'
config: 'release'
- xcode: '16.2'
swift: '6.2'
config: 'debug'
- xcode: '16.2'
swift: '6.2'
config: 'release'
- xcode: '16.4'
swift: '6.3'
config: 'debug'
- xcode: '16.4'
swift: '6.3'
config: 'release'
runs-on: macos-15
steps:
- uses: actions/checkout@v4
- name: Select Xcode ${{ matrix.xcode }}
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app
- name: Run ${{ matrix.config }} tests
run: swift test -c ${{ matrix.config }}
examples:
name: Examples
strategy:
matrix:
xcode: ['16.4']
config: ['debug']
scheme: ['Reminders', 'CaseStudies', 'SyncUps']
runs-on: macos-15
continue-on-error: true
steps:
- uses: actions/checkout@v4
- name: Select Xcode ${{ matrix.xcode }}
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app
- name: List devices available
run: xcrun simctl list --json devices available 'iPhone'
- name: xcodebuild ${{ matrix.scheme }}
run: make DERIVED_DATA_PATH=~/.derivedData SCHEME="${{ matrix.scheme }}" xcodebuild-raw
- name: Output test failures
run: |
xcrun xcresulttool get test-results tests --path TestResults.xcresult --format json | jq -r '
.testNodes[]
| .. | objects | select(.nodeType=="Test Case")
| . as $tc
| ($tc.children // [])[]
| select(.nodeType=="Failure Message")
| "✘ Test \($tc.name) recorded an issue at \(.name)\n"
'
if: failure()
# NB: GRDB 7.6.1 does not currently build on Linux.
# linux:
# name: Linux
# strategy:
# matrix:
# swift:
# - '6.1'
# runs-on: ubuntu-latest
# container: swift:${{ matrix.swift }}
# steps:
# - uses: actions/checkout@v4
# - name: Install Build Dependencies
# run: |
# apt-get update
# apt-get install -y libsqlite3-dev
# - name: Build
# run: swift build