Skip to content

Adopt swift-log task-local logger (Logger.current) #1236

Adopt swift-log task-local logger (Logger.current)

Adopt swift-log task-local logger (Logger.current) #1236

Workflow file for this run

name: swift-aws-lambda-runtime-build
on:
pull_request:
types: [opened, reopened, synchronize]
# As per Checkov CKV2_GHA_1
permissions: read-all
jobs:
soundness:
name: Soundness
uses: swiftlang/github-workflows/.github/workflows/soundness.yml@main
with:
license_header_check_project_name: "SwiftAWSLambdaRuntime"
shell_check_enabled: true
python_lint_check_enabled: true
api_breakage_check_container_image: "swift:6.3-noble"
docs_check_container_image: "swift:6.3-noble"
format_check_container_image: "swift:6.3-noble"
yamllint_check_enabled: true
docs_check_enabled: true
unit-tests:
name: Unit tests
uses: swiftlang/github-workflows/.github/workflows/swift_package_test.yml@main
with:
enable_windows_checks: false
# nightly-main (6.5-dev) is temporarily excluded: the compiler crashes with a SIL
# verification error while compiling AWSLambdaRuntimeTests. This is a toolchain bug
# (the same code compiles on 6.1-6.4), not an issue in this package. Remove the
# nightly-main entry once fixed upstream: https://github.com/swiftlang/swift/issues/90211
linux_exclude_swift_versions: "[{\"swift_version\": \"5.9\"}, {\"swift_version\": \"5.10\"}, {\"swift_version\": \"6.0\"}, {\"swift_version\": \"nightly-main\"}]"
swift_flags: "--explicit-target-dependency-import-check error"
swift_nightly_flags: "--explicit-target-dependency-import-check error"
enable_linux_static_sdk_build: true
# On 6.4+ the default build system (Swift Build) fails to statically link AWSLambdaPluginHelper
# against the static Linux SDK: SotoCore transitively pulls in two vendored BoringSSL forks
# (swift-crypto's CCryptoBoringSSL and swift-nio-ssl's CNIOBoringSSL), and Swift Build emits
# duplicate libc++abi symbols (set_new_handler, __cxa_*, ...) at link time. The legacy (native)
# build system links the same package cleanly. Force it here until the upstream issue is fixed:
# https://github.com/swiftlang/swift/issues/90196
linux_static_sdk_build_command: "swift build --build-system native"
integration-tests:
name: Integration Tests
uses: ./.github/workflows/integration_tests.yml
with:
name: "Integration tests"
examples_enabled: true
matrix_linux_command: "swift build"
# We pass the list of examples here, but we can't pass an array as argument
# Instead, we pass a String with a valid JSON array.
# The workaround is mentioned here https://github.com/orgs/community/discussions/11692
examples: "[ 'APIGatewayV1', 'APIGatewayV2', 'APIGatewayV2+LambdaAuthorizer', 'BackgroundTasks', 'HelloJSON', 'HelloWorld', 'HelloWorldNoTraits', 'HummingbirdLambda', 'ManagedInstances', 'MultiSourceAPI', 'MultiTenant', 'ResourcesPackaging', 'S3EventNotifier', 'S3_AWSSDK', 'S3_Soto', 'Streaming+APIGateway', 'Streaming+FunctionUrl', 'Streaming+Codable', 'ServiceLifecycle+Postgres', 'Testing', 'Tutorial' ]"
archive_plugin_examples: "[ 'HelloWorld', 'ResourcesPackaging' ]"
archive_plugin_enabled: true
archive_plugin_swift64_enabled: true
archive_plugin_swift64_container_image: "swiftlang/swift:nightly-6.4.x-bookworm"
semver-label-check:
name: Semantic Version label check
runs-on: ubuntu-latest
timeout-minutes: 1
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
persist-credentials: false
- name: Check for Semantic Version label
uses: apple/swift-nio/.github/actions/pull_request_semver_label_checker@main