Files
swift-nio/scripts/check-matrix-job.sh
Gus Cairo 3d1ee9d45a Add and enable 6.4 workflows (#3750)
### Motivation

* Swift 6.4 has been released, so we should add it to our CI coverage.

### Modifications

* Update `apple/swift-nio/scripts/generate_matrix.sh`
* Update `apple/swift-nio/scripts/check-matrix-job.sh`
* Update reusable adopters of `swift_test_matrix.yml`
* Update end-user adopter workflows of `swift_test_matrix.yml`
* Add Swift 6.4 inputs to `macos_tests.yml` and `macos_benchmarks.yml`
* Add a 6.4 release job to `wasm_swift_sdk.yml`
* Enable the Windows 6.4 unit test job in `main.yml` and
`pull_request.yml`
* Copy benchmark thresholds from 6.3

### Result

* NIO runs Swift 6.4 CI, and downstream repositories can opt-in.

---

- Successful run (minus broken nightlies):
https://github.com/apple/swift-nio/actions/runs/36403423635?pr=3750
2026-09-30 10:05:07 +01:00

66 lines
2.5 KiB
Bash
Executable File

#!/bin/bash
##===----------------------------------------------------------------------===##
##
## This source file is part of the SwiftNIO open source project
##
## Copyright (c) 2024 Apple Inc. and the SwiftNIO project authors
## Licensed under Apache License v2.0
##
## See LICENSE.txt for license information
## See CONTRIBUTORS.txt for the list of SwiftNIO project authors
##
## SPDX-License-Identifier: Apache-2.0
##
##===----------------------------------------------------------------------===##
set -euo pipefail
log() { printf -- "** %s\n" "$*" >&2; }
error() { printf -- "** ERROR: %s\n" "$*" >&2; }
fatal() { error "$@"; exit 1; }
test -n "${SWIFT_VERSION:-}" || fatal "SWIFT_VERSION unset"
test -n "${COMMAND:-}" || fatal "COMMAND unset"
swift_version="$SWIFT_VERSION"
command="$COMMAND"
command_5_9="${COMMAND_OVERRIDE_5_9:=""}"
command_5_10="${COMMAND_OVERRIDE_5_10:=""}"
command_6_0="${COMMAND_OVERRIDE_6_0:=""}"
command_6_1="${COMMAND_OVERRIDE_6_1:=""}"
command_6_2="${COMMAND_OVERRIDE_6_2:=""}"
command_6_3="${COMMAND_OVERRIDE_6_3:=""}"
command_6_4="${COMMAND_OVERRIDE_6_4:=""}"
command_nightly_next="${COMMAND_OVERRIDE_NIGHTLY_NEXT:=""}"
command_nightly_main="${COMMAND_OVERRIDE_NIGHTLY_MAIN:=""}"
if [[ "$swift_version" == "5.9" ]] && [[ -n "$command_5_9" ]]; then
log "Running 5.9 command override"
eval "$command_5_9"
elif [[ "$swift_version" == "5.10" ]] && [[ -n "$command_5_10" ]]; then
log "Running 5.10 command override"
eval "$command_5_10"
elif [[ "$swift_version" == "6.0" ]] && [[ -n "$command_6_0" ]]; then
log "Running 6.0 command override"
eval "$command_6_0"
elif [[ "$swift_version" == "6.1" ]] && [[ -n "$command_6_1" ]]; then
log "Running 6.1 command override"
eval "$command_6_1"
elif [[ "$swift_version" == "6.2" ]] && [[ -n "$command_6_2" ]]; then
log "Running 6.2 command override"
eval "$command_6_2"
elif [[ "$swift_version" == "6.3" ]] && [[ -n "$command_6_3" ]]; then
log "Running 6.3 command override"
eval "$command_6_3"
elif [[ "$swift_version" == "6.4" ]] && [[ -n "$command_6_4" ]]; then
log "Running 6.4 command override"
eval "$command_6_4"
elif [[ "$swift_version" == "nightly-next" ]] && [[ -n "$command_nightly_next" ]]; then
log "Running nightly next command override"
eval "$command_nightly_next"
elif [[ "$swift_version" == "nightly-main" ]] && [[ -n "$command_nightly_main" ]]; then
log "Running nightly main command override"
eval "$command_nightly_main"
else
log "Running default command"
eval "$command"
fi