Skip to content

Added strict concurrency checking and Sendable conformances #21

Added strict concurrency checking and Sendable conformances

Added strict concurrency checking and Sendable conformances #21

Workflow file for this run

name: Swift Package
defaults:
run:
shell: bash -eo pipefail {0}
on:
workflow_dispatch:
push:
branches:
- '**'
tags-ignore:
- '**'
paths-ignore:
- '.github/**' # Ignore all files under '.github'
- '!.github/workflows/swift-package.yml' # Except for this workflow
- '.gitignore'
- '.remarkrc'
- '.swiftlint.yml'
- 'Documentation/**'
- 'LICENSE'
- 'README.md'
- 'CBORCoding.podspec'
jobs:
build:
strategy:
matrix:
os: [macOS-13, ubuntu-latest]
xcode: ['15.0']
name: Build
runs-on: ${{ matrix.os }}
env:
LOGSDIR: /tmp/.cborcoding.swiftpm/Logs/Build
steps:
- name: Select Xcode Version
if: ${{ runner.os == 'macOS' }}
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: ${{ matrix.xcode }}
- name: Checkout Code
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Environment
run: |
mkdir -p "$LOGSDIR"
- name: Build
run: |
swift --version | tee "$LOGSDIR/Build.log"
swift build --verbose | tee -a "$LOGSDIR/Build.log"
- name: Upload Logs
uses: actions/upload-artifact@v3
if: always()
with:
name: BuildLogs-${{ runner.os }}
path: ${{ env.LOGSDIR }}/*.log
test:
strategy:
matrix:
os: [macOS-13, ubuntu-latest]
xcode: ['15.0']
name: Test
runs-on: ${{ matrix.os }}
needs: build
env:
LOGSDIR: /tmp/.cborcoding.swiftpm/Logs/Test
steps:
- name: Select Xcode Version
if: ${{ runner.os == 'macOS' }}
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: ${{ matrix.xcode }}
- name: Checkout Code
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Environment
run: |
mkdir -p "$LOGSDIR"
- name: Test
run: |
swift test --verbose --enable-code-coverage | tee "$LOGSDIR/Test.log"
- name: Generate Code Coverage File
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: ${{ runner.os == 'macOS' && github.event_name == 'push' && github.ref == 'refs/heads/main' }}
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./codecov.lcov
verbose: true
- name: Upload Logs
uses: actions/upload-artifact@v3
if: always()
with:
name: TestLogs-${{ runner.os }}
path: ${{ env.LOGSDIR }}/*.log