Adopt strict concurrency checking #840
Workflow file for this run
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: CI | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
preflight: | |
name: License Header and Formatting Checks | |
runs-on: ubuntu-latest | |
container: | |
image: swift | |
steps: | |
- uses: actions/checkout@v3 | |
- name: "Formatting and License Headers check" | |
run: | | |
SWIFTFORMAT_VERSION=0.52.0 | |
git clone --depth 1 --branch "$SWIFTFORMAT_VERSION" "https://github.com/nicklockwood/SwiftFormat" "$HOME/SwiftFormat" | |
swift build -c release --package-path "$HOME/SwiftFormat" --product swiftformat | |
export PATH=$PATH:"$(swift build -c release --package-path "$HOME/SwiftFormat" --show-bin-path)" | |
./scripts/sanity.sh | |
unit-tests: | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- image: swiftlang/swift:nightly-focal | |
swift-build-flags: "-Xswiftc strict-concurrency=complete" | |
# No TSAN because of: https://github.com/apple/swift/issues/59068 | |
swift-test-flags: "-Xswiftc strict-concurrency=complete" # "--sanitize=thread" | |
- image: swift:5.8-jammy | |
swift-build-flags: "-Xswiftc strict-concurrency=complete" | |
# No TSAN because of: https://github.com/apple/swift/issues/59068 | |
swift-test-flags: "-Xswiftc strict-concurrency=complete" # "--sanitize=thread" | |
- image: swift:5.7-jammy | |
# No TSAN because of: https://github.com/apple/swift/issues/59068 | |
# swift-test-flags: "--sanitize=thread" | |
- image: swift:5.6-focal | |
# No TSAN because of: https://github.com/apple/swift/issues/59068 | |
# swift-test-flags: "--sanitize=thread" | |
name: Build and Test on ${{ matrix.image }} | |
runs-on: ubuntu-latest | |
container: | |
image: ${{ matrix.image }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: 🔧 Build | |
run: swift build ${{ matrix.swift-build-flags }} | |
timeout-minutes: 20 | |
- name: 🧪 Test | |
# Skip tests on 5.6: https://bugs.swift.org/browse/SR-15955 | |
if: ${{ matrix.image != 'swift:5.6-focal' }} | |
run: swift test ${{ matrix.swift-test-flags }} | |
timeout-minutes: 20 | |
performance-tests: | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- image: swiftlang/swift:nightly-focal | |
env: | |
MAX_ALLOCS_ALLOWED_bidi_1k_rpcs_10_requests: 246000 | |
MAX_ALLOCS_ALLOWED_bidi_1k_rpcs_1_request: 138000 | |
MAX_ALLOCS_ALLOWED_embedded_server_bidi_1k_rpcs_10_small_requests: 110000 | |
MAX_ALLOCS_ALLOWED_embedded_server_bidi_1k_rpcs_1_small_request: 65000 | |
MAX_ALLOCS_ALLOWED_embedded_server_unary_1k_rpcs_1_small_request: 61000 | |
MAX_ALLOCS_ALLOWED_unary_1k_ping_pong: 129000 | |
MAX_ALLOCS_ALLOWED_unary_1k_ping_pong_interceptors_client: 136000 | |
MAX_ALLOCS_ALLOWED_unary_1k_ping_pong_interceptors_server: 136000 | |
- image: swift:5.8-jammy | |
env: | |
MAX_ALLOCS_ALLOWED_bidi_1k_rpcs_10_requests: 246000 | |
MAX_ALLOCS_ALLOWED_bidi_1k_rpcs_1_request: 138000 | |
MAX_ALLOCS_ALLOWED_embedded_server_bidi_1k_rpcs_10_small_requests: 110000 | |
MAX_ALLOCS_ALLOWED_embedded_server_bidi_1k_rpcs_1_small_request: 65000 | |
MAX_ALLOCS_ALLOWED_embedded_server_unary_1k_rpcs_1_small_request: 61000 | |
MAX_ALLOCS_ALLOWED_unary_1k_ping_pong: 129000 | |
MAX_ALLOCS_ALLOWED_unary_1k_ping_pong_interceptors_client: 136000 | |
MAX_ALLOCS_ALLOWED_unary_1k_ping_pong_interceptors_server: 136000 | |
- image: swift:5.7-jammy | |
env: | |
MAX_ALLOCS_ALLOWED_bidi_1k_rpcs_10_requests: 246000 | |
MAX_ALLOCS_ALLOWED_bidi_1k_rpcs_1_request: 138000 | |
MAX_ALLOCS_ALLOWED_embedded_server_bidi_1k_rpcs_10_small_requests: 110000 | |
MAX_ALLOCS_ALLOWED_embedded_server_bidi_1k_rpcs_1_small_request: 65000 | |
MAX_ALLOCS_ALLOWED_embedded_server_unary_1k_rpcs_1_small_request: 61000 | |
MAX_ALLOCS_ALLOWED_unary_1k_ping_pong: 129000 | |
MAX_ALLOCS_ALLOWED_unary_1k_ping_pong_interceptors_client: 136000 | |
MAX_ALLOCS_ALLOWED_unary_1k_ping_pong_interceptors_server: 136000 | |
- image: swift:5.6-focal | |
env: | |
MAX_ALLOCS_ALLOWED_bidi_1k_rpcs_10_requests: 247000 | |
MAX_ALLOCS_ALLOWED_bidi_1k_rpcs_1_request: 139000 | |
MAX_ALLOCS_ALLOWED_embedded_server_bidi_1k_rpcs_10_small_requests: 110000 | |
MAX_ALLOCS_ALLOWED_embedded_server_bidi_1k_rpcs_1_small_request: 65000 | |
MAX_ALLOCS_ALLOWED_embedded_server_unary_1k_rpcs_1_small_request: 61000 | |
MAX_ALLOCS_ALLOWED_unary_1k_ping_pong: 130000 | |
MAX_ALLOCS_ALLOWED_unary_1k_ping_pong_interceptors_client: 137000 | |
MAX_ALLOCS_ALLOWED_unary_1k_ping_pong_interceptors_server: 137000 | |
name: Performance Tests on ${{ matrix.image }} | |
runs-on: ubuntu-latest | |
container: | |
image: ${{ matrix.image }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: 🧮 Allocation Counting Tests | |
run: ./Performance/allocations/test-allocation-counts.sh | |
env: ${{ matrix.env }} | |
timeout-minutes: 20 | |
integration-tests: | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- image: swiftlang/swift:nightly-focal | |
- image: swift:5.8-jammy | |
- image: swift:5.7-jammy | |
- image: swift:5.6-focal | |
name: Integration Tests on ${{ matrix.image }} | |
runs-on: ubuntu-latest | |
container: | |
image: ${{ matrix.image }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build without NIOSSL | |
run: swift build | |
env: | |
GRPC_NO_NIO_SSL: 1 | |
timeout-minutes: 20 | |
- name: Test without NIOSSL | |
run: swift test | |
env: | |
GRPC_NO_NIO_SSL: 1 | |
timeout-minutes: 20 |