This repository has been archived by the owner on Nov 27, 2023. It is now read-only.
Deprecate #27
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Continuous Integration | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
lint: | |
name: Lint | |
runs-on: macos-latest | |
steps: | |
- name: Clone | |
uses: actions/checkout@v2 | |
- name: Select Swift for swift-format | |
uses: mxcl/xcodebuild@v1 | |
with: | |
action: none | |
# Keep in sync with Homebrew's swift-format formula. | |
swift: ~5.5 | |
- name: Lint | |
run: script/lint | |
build-test: | |
name: Build & Test (Swift ${{ matrix.swift }}, ${{ matrix.platform-name || matrix.platform }}) | |
runs-on: macos-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
swift: ['5.5'] | |
platform: [macOS, mac-catalyst, iOS, tvOS, watchOS] | |
include: | |
- platform: mac-catalyst | |
platform-name: Mac Catalyst | |
steps: | |
- name: Clone | |
uses: actions/checkout@v2 | |
- name: Build & Test | |
uses: mxcl/xcodebuild@v1 | |
with: | |
platform: ${{ matrix.platform }} | |
swift: ~${{ matrix.swift }} | |
code-coverage: true | |
warnings-as-errors: true | |
- name: Prepare for Code Coverage | |
uses: sersoft-gmbh/xcode-coverage-action@v2 | |
with: | |
fail-on-empty-output: true | |
output: .xcodecov | |
target-name-filter: AsyncCloudKit | |
- name: Coverage | |
uses: codecov/codecov-action@v2 | |
with: | |
flags: ${{ matrix.platform }},swift${{ matrix.swift }} | |
token: ${{ secrets.CODECOV_TOKEN }} | |
fail_ci_if_error: true | |
directory: .xcodecov | |
sanitize: | |
name: ${{ matrix.name }} Sanitizer | |
runs-on: macos-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
# Something is amiss with async generics and thread sanitizer. | |
# https://bugs.swift.org/browse/SR-15475 | |
# TODO: Add 'scudo' once it is supported by Swift. | |
sanitizer: [address, undefined] | |
include: | |
- sanitizer: address | |
name: Address | |
# - sanitizer: thread | |
# name: Thread | |
- sanitizer: undefined | |
name: Undefined Behavior | |
steps: | |
- name: Clone | |
uses: actions/checkout@v2 | |
- name: Select Latest Swift | |
uses: mxcl/xcodebuild@v1 | |
with: | |
action: none | |
swift: ^5 | |
- name: Sanitize | |
run: swift test --sanitize=${{ matrix.sanitizer }} |