From 0839fa4c752f4d5688550f5eb7f5c74953684905 Mon Sep 17 00:00:00 2001 From: Joe Newton Date: Mon, 29 Nov 2021 16:21:16 -0500 Subject: [PATCH] Added back erroneously removed Linux run from Swift Package workflow --- .github/workflows/swift-package.yml | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/workflows/swift-package.yml b/.github/workflows/swift-package.yml index 7c9d1bc..0ade64f 100644 --- a/.github/workflows/swift-package.yml +++ b/.github/workflows/swift-package.yml @@ -19,8 +19,12 @@ on: jobs: build: + strategy: + matrix: + os: [macOS-11, ubuntu-latest] + name: Build - runs-on: macOS-11 + runs-on: ${{ matrix.os }} env: LOGSDIR: /tmp/.cborcoding.swiftpm/Logs/Build @@ -41,12 +45,16 @@ jobs: uses: actions/upload-artifact@v2 if: always() with: - name: BuildLogs + name: BuildLogs-${{ runner.os }} path: ${{ env.LOGSDIR }}/*.log test: + strategy: + matrix: + os: [macOS-11, ubuntu-latest] + name: Test - runs-on: macOS-11 + runs-on: ${{ matrix.os }} needs: build env: LOGSDIR: /tmp/.cborcoding.swiftpm/Logs/Test @@ -64,12 +72,12 @@ jobs: swift test --verbose --enable-code-coverage | tee "$LOGSDIR/Test.log" - name: Generate Code Coverage File - if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} + if: ${{ runner.os == 'macOS' && github.event_name == 'push' && github.ref == 'refs/heads/main' }} run: | xcrun llvm-cov export --format=lcov --instr-profile=".build/debug/codecov/default.profdata" ".build/debug/CBORCodingPackageTests.xctest/Contents/MacOS/CBORCodingPackageTests" > "./codecov.lcov" - name: Upload Code Coverage - if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} + if: ${{ runner.os == 'macOS' && github.event_name == 'push' && github.ref == 'refs/heads/main' }} uses: codecov/codecov-action@v2 with: token: ${{ secrets.CODECOV_TOKEN }} @@ -80,5 +88,5 @@ jobs: uses: actions/upload-artifact@v2 if: always() with: - name: TestLogs + name: TestLogs-${{ runner.os }} path: ${{ env.LOGSDIR }}/*.log