This repository has been archived by the owner on May 14, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
112 lines (106 loc) · 2.94 KB
/
ci.yaml
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
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- "*"
jobs:
"validity-Tests":
runs-on: macOS-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install swiftformat
run: brew install swiftformat
- name: Run validity
run: ./scripts/validity.sh .
"tuxOS-Tests":
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
images:
- swift:5.1
- swift:5.2
- swift:5.3
- swiftlang/swift:nightly-bionic
container:
image: ${{ matrix.images }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Test
run: swift test --enable-code-coverage --enable-test-discovery
- name: Convert coverage files
run: |
llvm-cov export -format="lcov" \
.build/debug/swift-extras-uuidPackageTests.xctest \
-ignore-filename-regex="\/Tests\/" \
-instr-profile .build/debug/codecov/default.profdata > info.lcov
- name: Install curl
run: apt-get update && apt-get install -y curl # required by the codecov action.
- name: Upload to codecov.io
uses: codecov/codecov-action@v1
with:
file: info.lcov
"tuxOS-Performance-Tests":
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
images:
- swift:5.1
- swift:5.2
- swift:5.3
- swiftlang/swift:nightly-bionic
container:
image: ${{ matrix.images }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Build and run test
run: swift run -c release --enable-test-discovery
"macOS-Tests":
runs-on: macOS-latest
strategy:
fail-fast: false
matrix:
xcode:
- Xcode_11.1.app
- Xcode_11.6.app
- Xcode_12.2.app
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Show all Xcode versions
run: ls -an /Applications/ | grep Xcode*
- name: Change Xcode command line tools
run: sudo xcode-select -s /Applications/${{ matrix.xcode }}/Contents/Developer
- name: Swift version
run: swift --version
- name: Xcode Tests
run: |
swift package generate-xcodeproj --skip-extra-files --enable-code-coverage
xcodebuild -quiet -parallel-testing-enabled YES -scheme swift-extras-uuid-Package -enableCodeCoverage YES build test
- name: Codecov
run: bash <(curl -s https://codecov.io/bash) -f info.lcov
"macOS-Performance-Tests":
runs-on: macOS-latest
strategy:
fail-fast: false
matrix:
xcode:
- Xcode_11.1.app
- Xcode_11.6.app
- Xcode_12.2.app
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Change Xcode command line tools
run: sudo xcode-select -s /Applications/${{ matrix.xcode }}/Contents/Developer
- name: Swift version
run: swift --version
- name: Build and run test
run: swift run -c release