Skip to content

Commit f2776a7

Browse files
Merge pull request #20 from SomeRandomiOSDev/Linux
Added back erroneously removed Linux run from Swift Package workflow
2 parents 48b1a27 + 0839fa4 commit f2776a7

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

.github/workflows/swift-package.yml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,12 @@ on:
1919

2020
jobs:
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 }}
@@ -80,5 +88,5 @@ jobs:
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

Comments
 (0)