Update CI

This commit is contained in:
Christian Treffs 2024-10-10 10:49:53 +02:00
parent 11f46f354d
commit 7af87beb36
No known key found for this signature in database
GPG Key ID: 49A4B4B460BE3ED4
4 changed files with 18 additions and 2 deletions

View File

@ -5,6 +5,7 @@ on:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
jobs:
linux-test-build-release:

View File

@ -5,6 +5,11 @@ on:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
CODECOV_XCODE_VERSION: "15.4" # Xcode version used to generate code coverage
jobs:
macos-test-build-release-xcode:
@ -12,15 +17,19 @@ jobs:
strategy:
matrix:
xcode: ["14.3.1", "15.4", "16.0"]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Select Xcode ${{ matrix.xcode }}
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app
- name: Test
run: swift test -c release --parallel --xunit-output .build/xUnit-output.xml --enable-code-coverage
env:
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
- name: Upload test artifacts
if: failure()
uses: actions/upload-artifact@v4.4.2
@ -37,11 +46,15 @@ jobs:
if-no-files-found: warn
include-hidden-files: true
# Only run coverage steps if the CODECOV_TOKEN is available and the matrix.xcode matches CODECOV_XCODE_VERSION
- name: Generate coverage report
if: env.CODECOV_TOKEN != '' && matrix.xcode == env.CODECOV_XCODE_VERSION
run: xcrun llvm-cov export -format="lcov" .build/**/*PackageTests.xctest/Contents/MacOS/*PackageTests -instr-profile .build/**/codecov/default.profdata > coverage.lcov
- name: Upload code coverage report
if: env.CODECOV_TOKEN != '' && matrix.xcode == env.CODECOV_XCODE_VERSION
uses: codecov/codecov-action@v4.6.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
token: ${{ env.CODECOV_TOKEN }}
file: coverage.lcov
fail_ci_if_error: true
fail_ci_if_error: true

View File

@ -5,6 +5,7 @@ on:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
jobs:
wasm-build:

View File

@ -5,6 +5,7 @@ on:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
jobs:
windows-test-build-release: