-
Notifications
You must be signed in to change notification settings - Fork 147
132 lines (124 loc) · 4.12 KB
/
swiftpm.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
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
131
132
name: SwiftPM
on:
push:
branches: [main]
paths:
- '.codecov.yml'
- '.github/workflows/swiftpm.yml'
- 'Package*'
- 'Sources/**/*.[ch]'
- 'Sources/**/*.swift'
- 'Sources/**/module.modulemap'
- 'Tests/**/*.swift'
- 'Tests/**/*.ya?ml'
pull_request:
paths:
- '.codecov.yml'
- '.github/workflows/swiftpm.yml'
- 'Package*'
- 'Sources/**/*.[ch]'
- 'Sources/**/*.swift'
- 'Sources/**/module.modulemap'
- 'Tests/**/*.swift'
- 'Tests/**/*.ya?ml'
jobs:
Xcode_Monterey:
strategy:
matrix:
xcode_version: ['13.3.1', '13.4', '14.0.1', '14.1', '14.2']
runs-on: macos-12
env:
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode_version }}.app
steps:
- uses: actions/checkout@v4
- run: swift -version
- run: YAMS_DEFAULT_ENCODING=UTF16 swift test --parallel
- run: YAMS_DEFAULT_ENCODING=UTF8 swift test --parallel
Xcode_Ventura:
strategy:
matrix:
xcode_version: ['14.3', '15.0']
runs-on: macos-13
env:
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode_version }}.app
steps:
- uses: actions/checkout@v4
- run: swift -version
- run: YAMS_DEFAULT_ENCODING=UTF16 swift test --parallel
- run: YAMS_DEFAULT_ENCODING=UTF8 swift test --parallel
- name: Code Coverage
if: matrix.xcode_version == '15.0'
run: |
swift test --enable-code-coverage
xcrun llvm-cov export -format="lcov" .build/debug/YamsPackageTests.xctest/Contents/MacOS/YamsPackageTests -instr-profile .build/debug/codecov/default.profdata > coverage.lcov
if [[ -n "${CODECOV_TOKEN}" ]]; then
bash <(curl -s https://codecov.io/bash) -f coverage.lcov
fi
env: { 'CODECOV_TOKEN': '${{ secrets.CODECOV_TOKEN }}' }
Xcode_Sonoma:
strategy:
matrix:
xcode_version: ['15.4']
runs-on: macos-14
env:
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode_version }}.app
steps:
- uses: actions/checkout@v4
- run: swift -version
- run: YAMS_DEFAULT_ENCODING=UTF16 swift test --parallel
- run: YAMS_DEFAULT_ENCODING=UTF8 swift test --parallel
- name: Code Coverage
if: matrix.xcode_version == '15.4'
run: |
swift test --enable-code-coverage
xcrun llvm-cov export -format="lcov" .build/debug/YamsPackageTests.xctest/Contents/MacOS/YamsPackageTests -instr-profile .build/debug/codecov/default.profdata > coverage.lcov
if [[ -n "${CODECOV_TOKEN}" ]]; then
bash <(curl -s https://codecov.io/bash) -f coverage.lcov
fi
env: { 'CODECOV_TOKEN': '${{ secrets.CODECOV_TOKEN }}' }
Linux:
strategy:
matrix:
tag: ['5.4', '5.5', '5.6', '5.7', '5.8', '5.9', '5.10']
runs-on: ubuntu-latest
container:
image: swift:${{ matrix.tag }}
steps:
- uses: actions/checkout@v3
- run: YAMS_DEFAULT_ENCODING=UTF16 swift test --parallel
- run: YAMS_DEFAULT_ENCODING=UTF8 swift test --parallel
Windows:
runs-on: windows-latest
strategy:
matrix:
include:
- branch: swift-5.6.3-release
tag: 5.6.3-RELEASE
- branch: swift-5.7.2-release
tag: 5.7.2-RELEASE
- branch: development
tag: DEVELOPMENT-SNAPSHOT-2021-11-20-a
steps:
- uses: actions/checkout@v4
- uses: compnerd/gha-setup-swift@main
with:
branch: ${{ matrix.branch }}
tag: ${{ matrix.tag }}
# Commands to run once connected via SSH:
#
# >d:
# >cd a\Yams\Yams
# >setx SDKROOT C:\Library\Developer\Platforms\Windows.platform\Developer\SDKs\Windows.sdk
# >setx DEVELOPER_DIR C:\Library\Developer
# >swift build -v
# >swift test -v
# >swift test -v --filter testBinary
# - name: Start SSH session
# uses: luchihoratiu/debug-via-ssh@main
# with:
# NGROK_AUTH_TOKEN: ${{ secrets.NGROK_AUTH_TOKEN }}
# SSH_PASS: ${{ secrets.SSH_PASS }}
- name: Build
run: swift build -v
- name: Test
run: swift test -v