mirror of
https://github.com/apple/swift-nio-imap
synced 2026-11-22 04:30:43 +00:00
77 lines
3.1 KiB
YAML
77 lines
3.1 KiB
YAML
name: PR
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
on:
|
|
pull_request:
|
|
types: [opened, reopened, synchronize]
|
|
|
|
jobs:
|
|
soundness:
|
|
name: Soundness
|
|
uses: swiftlang/github-workflows/.github/workflows/soundness.yml@main
|
|
with:
|
|
license_header_check_project_name: "SwiftNIO"
|
|
|
|
unit-tests:
|
|
name: Unit tests
|
|
uses: apple/swift-nio/.github/workflows/unit_tests.yml@main
|
|
with:
|
|
# `Package.swift` requires Swift 6.2, so the older matrix entries cannot build this
|
|
# package and are not configured here.
|
|
linux_6_2_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error"
|
|
linux_6_3_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error"
|
|
linux_nightly_main_arguments_override: "--explicit-target-dependency-import-check error"
|
|
|
|
cxx-interop:
|
|
name: Cxx interop
|
|
uses: apple/swift-nio/.github/workflows/cxx_interop.yml@main
|
|
|
|
android-sdk:
|
|
name: Android Swift SDK
|
|
uses: apple/swift-nio/.github/workflows/android_swift_sdk.yml@main
|
|
with:
|
|
# swift-collections 1.6.0 uses `@inline(always)` under `#if compiler(>=6.3)`, but the
|
|
# attribute is still gated behind the experimental `InlineAlways` feature in the nightly
|
|
# `main` toolchain this job builds with. Enable it until the dependency's guard is fixed
|
|
# upstream (cf. apple/swift-collections #580/#584).
|
|
additional_command_arguments: "-Xswiftc -enable-experimental-feature -Xswiftc InlineAlways"
|
|
|
|
macos-tests:
|
|
name: macOS tests
|
|
uses: apple/swift-nio/.github/workflows/macos_tests.yml@main
|
|
with:
|
|
runner_pool: general
|
|
# Xcode auto-generates the schemes for this package (`.swiftpm` is not checked in).
|
|
# A package with two or more products gets one scheme per product plus an aggregate
|
|
# `<package>-Package` scheme; a package with a single product gets just one scheme,
|
|
# named `<package>`. Since this package vends both `NIOIMAP` and `IMAPCommands`, the
|
|
# aggregate scheme is `swift-nio-imap-Package`. Verify with `xcodebuild -list` in a
|
|
# clean checkout if the product list ever changes.
|
|
build_scheme: swift-nio-imap-Package
|
|
# macos_tests.yml requires explicit disable of 6.1.
|
|
swift_6_1_enabled: false
|
|
swift_6_2_build_arguments_override: "-Xswiftc -Xfrontend -Xswiftc -require-explicit-sendable -Xswiftc -warnings-as-errors"
|
|
swift_6_3_build_arguments_override: "-Xswiftc -Xfrontend -Xswiftc -require-explicit-sendable -Xswiftc -warnings-as-errors"
|
|
|
|
examples:
|
|
name: Build examples
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
example: [IMAPTool, CLI, Proxy, Fuzzer, PerformanceTester]
|
|
container:
|
|
image: swift:6.2
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
persist-credentials: false
|
|
- name: Build
|
|
run: swift build --package-path "Examples/${{ matrix.example }}"
|
|
- name: Test
|
|
if: matrix.example == 'CLI' || matrix.example == 'IMAPTool'
|
|
run: swift test --package-path "Examples/${{ matrix.example }}"
|