1919
2020jobs :
2121 build :
22+ strategy :
23+ matrix :
24+ os : [macOS-11, ubuntu-latest]
25+
2226 name : Build
23- runs-on : macOS-11
27+ runs-on : ${{ matrix.os }}
2428 env :
2529 LOGSDIR : /tmp/.cborcoding.swiftpm/Logs/Build
2630
@@ -41,12 +45,16 @@ jobs:
4145 uses : actions/upload-artifact@v2
4246 if : always()
4347 with :
44- name : BuildLogs
48+ name : BuildLogs-${{ runner.os }}
4549 path : ${{ env.LOGSDIR }}/*.log
4650
4751 test :
52+ strategy :
53+ matrix :
54+ os : [macOS-11, ubuntu-latest]
55+
4856 name : Test
49- runs-on : macOS-11
57+ runs-on : ${{ matrix.os }}
5058 needs : build
5159 env :
5260 LOGSDIR : /tmp/.cborcoding.swiftpm/Logs/Test
@@ -64,12 +72,12 @@ jobs:
6472 swift test --verbose --enable-code-coverage | tee "$LOGSDIR/Test.log"
6573
6674 - 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' }}
6876 run : |
6977 xcrun llvm-cov export --format=lcov --instr-profile=".build/debug/codecov/default.profdata" ".build/debug/CBORCodingPackageTests.xctest/Contents/MacOS/CBORCodingPackageTests" > "./codecov.lcov"
7078
7179 - 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' }}
7381 uses : codecov/codecov-action@v2
7482 with :
7583 token : ${{ secrets.CODECOV_TOKEN }}
8088 uses : actions/upload-artifact@v2
8189 if : always()
8290 with :
83- name : TestLogs
91+ name : TestLogs-${{ runner.os }}
8492 path : ${{ env.LOGSDIR }}/*.log
0 commit comments