Skip to content

Commit a6195a5

Browse files
authored
CI use 6.1 nightlies, enable more soundness (swift-server#185)
CI use 6.1 nightlies, enable more soundness checks now that we can specify a pre-build command to set up the dependencies.
1 parent ed9ce47 commit a6195a5

9 files changed

+38
-32
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ jobs:
1414
linux_5_9_arguments_override: "--explicit-target-dependency-import-check error"
1515
linux_5_10_arguments_override: "--explicit-target-dependency-import-check error"
1616
linux_6_0_arguments_override: "--explicit-target-dependency-import-check error"
17-
linux_nightly_6_0_arguments_override: "--explicit-target-dependency-import-check error"
17+
linux_nightly_6_1_arguments_override: "--explicit-target-dependency-import-check error"
1818
linux_nightly_main_arguments_override: "--explicit-target-dependency-import-check error"

.github/workflows/pull_request.yml

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@ jobs:
99
name: Soundness
1010
uses: swiftlang/github-workflows/.github/workflows/soundness.yml@main
1111
with:
12+
linux_pre_build_command: "apt-get update -y -q && apt-get install -y -q libsasl2-dev"
1213
license_header_check_project_name: "swift-kafka-client"
13-
api_breakage_check_enabled: false # requires libsasl2-dev
14-
docs_check_enabled: false # requires libsasl2-dev
1514

1615
unit-tests:
1716
name: Unit tests
@@ -20,20 +19,29 @@ jobs:
2019
linux_5_9_arguments_override: "--explicit-target-dependency-import-check error"
2120
linux_5_10_arguments_override: "--explicit-target-dependency-import-check error"
2221
linux_6_0_arguments_override: "--explicit-target-dependency-import-check error"
23-
linux_nightly_6_0_arguments_override: "--explicit-target-dependency-import-check error"
22+
linux_nightly_6_1_arguments_override: "--explicit-target-dependency-import-check error"
2423
linux_nightly_main_arguments_override: "--explicit-target-dependency-import-check error"
2524

25+
construct-cxx-matrix:
26+
name: Construct Cxx interop matrix
27+
runs-on: ubuntu-latest
28+
outputs:
29+
cxx-interop-matrix: '${{ steps.generate-matrix.outputs.cxx-interop-matrix }}'
30+
steps:
31+
- name: Checkout repository
32+
uses: actions/checkout@v4
33+
with:
34+
persist-credentials: false
35+
- id: generate-matrix
36+
run: echo "cxx-interop-matrix=$(curl -s https://raw.githubusercontent.com/apple/swift-nio/main/scripts/generate_matrix.sh | bash)" >> "$GITHUB_OUTPUT"
37+
env:
38+
MATRIX_LINUX_COMMAND: "curl -s https://raw.githubusercontent.com/apple/swift-nio/main/scripts/check-cxx-interop-compatibility.sh | bash"
39+
MATRIX_LINUX_SETUP_COMMAND: "apt-get update -y -q && apt-get install -y -q curl jq libsasl2-dev"
40+
2641
cxx-interop:
2742
name: Cxx interop
28-
uses: apple/swift-nio/.github/workflows/swift_matrix.yml@main
43+
needs: construct-cxx-matrix
44+
uses: apple/swift-nio/.github/workflows/swift_test_matrix.yml@main
2945
with:
3046
name: "Cxx interop"
31-
matrix_linux_command: "apt-get update -y -q && apt-get install -y -q jq && apt-get -y install libsasl2-dev && curl -s https://raw.githubusercontent.com/apple/swift-nio/main/scripts/check-cxx-interop-compatibility.sh | bash"
32-
matrix_linux_5_9_enabled: true
33-
matrix_linux_5_10_enabled: true
34-
matrix_linux_6_0_enabled: true
35-
matrix_linux_nightly_6_0_enabled: true
36-
matrix_linux_nightly_main_enabled: true
37-
matrix_windows_6_0_enabled: false
38-
matrix_windows_nightly_6_0_enabled: false
39-
matrix_windows_nightly_main_enabled: false
47+
matrix_string: '${{ needs.construct-cxx-matrix.outputs.cxx-interop-matrix }}'

.github/workflows/unit_tests.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ on:
2727
type: string
2828
description: "The arguments passed to swift test in the Linux 6.0 Swift version matrix job."
2929
default: ""
30-
linux_nightly_6_0_enabled:
30+
linux_nightly_6_1_enabled:
3131
type: boolean
32-
description: "Boolean to enable the Linux nightly 6.0 Swift version matrix job. Defaults to true."
32+
description: "Boolean to enable the Linux nightly 6.1 Swift version matrix job. Defaults to true."
3333
default: true
34-
linux_nightly_6_0_arguments_override:
34+
linux_nightly_6_1_arguments_override:
3535
type: string
36-
description: "The arguments passed to swift test in the Linux nightly 6.0 Swift version matrix job."
36+
description: "The arguments passed to swift test in the Linux nightly 6.1 Swift version matrix job."
3737
default: ""
3838
linux_nightly_main_enabled:
3939
type: boolean
@@ -46,7 +46,7 @@ on:
4646

4747
jobs:
4848
unit-tests:
49-
name: Unit tests
49+
name: Unit tests (${{ matrix.swift.swift_version }})
5050
runs-on: ubuntu-latest
5151
strategy:
5252
fail-fast: false
@@ -62,9 +62,9 @@ jobs:
6262
- image: "swift:6.0-jammy"
6363
swift_version: "6.0"
6464
enabled: ${{ inputs.linux_6_0_enabled }}
65-
- image: "swiftlang/swift:nightly-6.0-jammy"
66-
swift_version: "nightly-6.0"
67-
enabled: ${{ inputs.linux_nightly_6_0_enabled }}
65+
- image: "swiftlang/swift:nightly-6.1-jammy"
66+
swift_version: "nightly-6.1"
67+
enabled: ${{ inputs.linux_nightly_6_1_enabled }}
6868
- image: "swiftlang/swift:nightly-main-jammy"
6969
swift_version: "nightly-main"
7070
enabled: ${{ inputs.linux_nightly_main_enabled }}
@@ -87,7 +87,7 @@ jobs:
8787
COMMAND_OVERRIDE_5_9: "swift test ${{ inputs.linux_5_9_arguments_override }}"
8888
COMMAND_OVERRIDE_5_10: "swift test ${{ inputs.linux_5_10_arguments_override }}"
8989
COMMAND_OVERRIDE_6_0: "swift test ${{ inputs.linux_6_0_arguments_override }}"
90-
COMMAND_OVERRIDE_NIGHTLY_6_0: "swift test ${{ inputs.linux_nightly_6_0_arguments_override }}"
90+
COMMAND_OVERRIDE_NIGHTLY_6_1: "swift test ${{ inputs.linux_nightly_6_1_arguments_override }}"
9191
COMMAND_OVERRIDE_NIGHTLY_MAIN: "swift test ${{ inputs.linux_nightly_main_arguments_override }}"
9292
run: |
9393
apt-get -qq update && apt-get -qq -y install curl && apt-get -y install libsasl2-dev

Sources/Kafka/Configuration/KafkaConfiguration+Security.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ extension KafkaConfiguration {
134134
///
135135
/// - Parameters:
136136
/// - privateKey: The client's private key (PEM) used for authentication.
137-
/// - certificate: The client's public key (PEM) used for authentication.
137+
/// - certificates: The client's public key (PEM) used for authentication and potentially multiple intermediate certificates.
138138
public static func keyPair(
139139
privateKey: PrivateKey,
140140
certificates: LeafAndIntermediates

Sources/Kafka/Configuration/KafkaConsumerConfiguration.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,15 @@ public struct KafkaConsumerConfiguration {
5656
/// The consumer joins a consumer group identified by a group ID and consumes from multiple topics.
5757
///
5858
/// - Parameters:
59-
/// - id: The ID of the consumer group to join.
59+
/// - groupID: The ID of the consumer group to join.
6060
/// - topics: An array of topic names to consume from.
6161
public static func group(id groupID: String, topics: [String]) -> ConsumptionStrategy {
6262
.init(consumptionStrategy: .group(groupID: groupID, topics: topics))
6363
}
6464
}
6565

6666
/// The strategy used for consuming messages.
67-
/// See ``KafkaConsumerConfiguration/ConsumptionStrategy-swift.struct-swift.struct`` for more information.
67+
/// See ``KafkaConsumerConfiguration/ConsumptionStrategy-swift.struct`` for more information.
6868
public var consumptionStrategy: ConsumptionStrategy
6969

7070
// MARK: - Consumer-specific Config Properties
@@ -144,7 +144,7 @@ public struct KafkaConsumerConfiguration {
144144
public static let error = AutoOffsetReset(description: "error")
145145
}
146146

147-
/// Action to take when there is no initial offset in the offset store or the desired offset is out of range. See ``KafkaConfiguration/AutoOffsetReset`` for more information.
147+
/// Action to take when there is no initial offset in the offset store or the desired offset is out of range. See ``KafkaConsumerConfiguration/AutoOffsetReset-swift.struct`` for more information.
148148
/// Default: `.largest`
149149
public var autoOffsetReset: AutoOffsetReset = .largest
150150

Sources/Kafka/Configuration/KafkaProducerConfiguration.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public struct KafkaProducerConfiguration {
7272
public var messageLimit: MessageLimit = .maximumLimit(100_000)
7373

7474
/// Maximum total message size sum allowed on the producer queue. This queue is shared by all topics and partitions.
75-
/// This property has higher priority than ``KafkaConfiguration/QueueOptions/messageLimit``.
75+
/// This property has higher priority than ``KafkaProducerConfiguration/QueueConfiguration/MessageLimit-swift.struct``.
7676
/// Default: `1_048_576 * 1024`
7777
public var maximumMessageBytes: Int = 1_048_576 * 1024
7878

Sources/Kafka/Configuration/KafkaTopicConfiguration.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public struct KafkaTopicConfiguration {
9898
public static let fnv1aRandom = Partitioner(description: "fnv1a_random")
9999
}
100100

101-
/// Partitioner. See ``KafkaConfiguration/Partitioner`` for more information.
101+
/// Partitioner. See ``KafkaTopicConfiguration/Partitioner-swift.struct`` for more information.
102102
/// Default: `.consistentRandom`
103103
public var partitioner: Partitioner = .consistentRandom
104104

Sources/Kafka/KafkaConsumer.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ public struct KafkaConsumerMessages: Sendable, AsyncSequence {
140140

141141
// MARK: - KafkaConsumer
142142

143-
/// A ``KafkaConsumer `` can be used to consume messages from a Kafka cluster.
143+
/// Can be used to consume messages from a Kafka cluster.
144144
public final class KafkaConsumer: Sendable, Service {
145145
/// The configuration object of the consumer client.
146146
private let configuration: KafkaConsumerConfiguration
@@ -192,7 +192,6 @@ public final class KafkaConsumer: Sendable, Service {
192192
/// - Parameters:
193193
/// - configuration: The ``KafkaConsumerConfiguration`` for configuring the ``KafkaConsumer``.
194194
/// - logger: A logger.
195-
/// - Returns: The newly created ``KafkaConsumer``.
196195
/// - Throws: A ``KafkaError`` if the initialization failed.
197196
public convenience init(
198197
configuration: KafkaConsumerConfiguration,

Sources/Kafka/KafkaProducer.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ public final class KafkaProducer: Service, Sendable {
108108
/// - Parameters:
109109
/// - configuration: The ``KafkaProducerConfiguration`` for configuring the ``KafkaProducer``.
110110
/// - logger: A logger.
111-
/// - Returns: The newly created ``KafkaProducer``.
112111
/// - Throws: A ``KafkaError`` if initializing the producer failed.
113112
public convenience init(
114113
configuration: KafkaProducerConfiguration,

0 commit comments

Comments
 (0)