mirror of
https://github.com/apple/swift-nio
synced 2026-11-24 04:37:54 +00:00
Allow the specification of custom environment variables in our matrix workflow and those which use it. ### Motivation: It can be useful to supply custom environment variables to control build and runtime options. ### Modifications: Allow users to supply a string of custom environment variable key-value pairs which are supplied to the docker container running the matrix commands. To attempt to avoid issues with this string concatenation the change also allows the user to specify custom list entry and key-value-pair separators. To avoid parameter bloat the env vars are set for all Swift versions, hopefully that's sufficient for now. ### Result: Adopters can Examples of this working on Linux and Windows, note the presence of the test environment variables I injected: - https://github.com/apple/swift-nio/actions/runs/17917619451/job/50943847555?pr=3376 - https://github.com/apple/swift-crypto/pull/413/checks e.g. ``` Executing Docker command: docker run -v /home/runner/work/swift-nio/swift-nio:/swift-nio -w /swift-nio -e CI=true -e GITHUB_ACTIONS=true -e SWIFT_VERSION=6.0 -e workspace=/swift-nio -e TEST_DEBUG=1 -e TEST_LOG_LEVEL=info swift:6.0-jammy bash -c swift --version && swift test -Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error ```