19
19
20
20
jobs :
21
21
build :
22
+ strategy :
23
+ matrix :
24
+ os : [macOS-11, ubuntu-latest]
25
+
22
26
name : Build
23
- runs-on : macOS-11
27
+ runs-on : ${{ matrix.os }}
24
28
env :
25
29
LOGSDIR : /tmp/.cborcoding.swiftpm/Logs/Build
26
30
@@ -41,12 +45,16 @@ jobs:
41
45
uses : actions/upload-artifact@v2
42
46
if : always()
43
47
with :
44
- name : BuildLogs
48
+ name : BuildLogs-${{ runner.os }}
45
49
path : ${{ env.LOGSDIR }}/*.log
46
50
47
51
test :
52
+ strategy :
53
+ matrix :
54
+ os : [macOS-11, ubuntu-latest]
55
+
48
56
name : Test
49
- runs-on : macOS-11
57
+ runs-on : ${{ matrix.os }}
50
58
needs : build
51
59
env :
52
60
LOGSDIR : /tmp/.cborcoding.swiftpm/Logs/Test
@@ -64,12 +72,12 @@ jobs:
64
72
swift test --verbose --enable-code-coverage | tee "$LOGSDIR/Test.log"
65
73
66
74
- name : Generate Code Coverage File
67
- if : ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
75
+ if : ${{ runner.os == 'macOS' && github.event_name == 'push' && github.ref == 'refs/heads/main' }}
68
76
run : |
69
77
xcrun llvm-cov export --format=lcov --instr-profile=".build/debug/codecov/default.profdata" ".build/debug/CBORCodingPackageTests.xctest/Contents/MacOS/CBORCodingPackageTests" > "./codecov.lcov"
70
78
71
79
- name : Upload Code Coverage
72
- if : ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
80
+ if : ${{ runner.os == 'macOS' && github.event_name == 'push' && github.ref == 'refs/heads/main' }}
73
81
uses : codecov/codecov-action@v2
74
82
with :
75
83
token : ${{ secrets.CODECOV_TOKEN }}
80
88
uses : actions/upload-artifact@v2
81
89
if : always()
82
90
with :
83
- name : TestLogs
91
+ name : TestLogs-${{ runner.os }}
84
92
path : ${{ env.LOGSDIR }}/*.log
0 commit comments