mirror of
https://github.com/apple/swift-nio
synced 2026-11-24 04:37:54 +00:00
Static SDK installation script improvements ### Motivation: Make static SDK installation scripts more modular and make failures easier to diagnose. ### Modifications: - Allow specification of binaries from outside the installation script - Remove script dependency installation from the script - Separate the Swift dependency installation into its own script - Fatal error explicitly if the installed Swift can't be found - Make curl operations for downloading artifacts explicitly fail ### Result: Scripts which are easier to maintain and operate. An example CI run with this in operation https://github.com/apple/swift-nio/actions/runs/14329482180/job/40162003318?pr=3186
38 lines
1.7 KiB
YAML
38 lines
1.7 KiB
YAML
name: Static SDK
|
|
|
|
on:
|
|
workflow_call:
|
|
|
|
jobs:
|
|
static-sdk:
|
|
name: Static SDK
|
|
# Workaround https://github.com/nektos/act/issues/1875
|
|
uses: apple/swift-nio/.github/workflows/swift_test_matrix.yml@main
|
|
with:
|
|
name: "Static SDK"
|
|
matrix_string: >-
|
|
{
|
|
"config":[
|
|
{
|
|
"name":"latest-release Jammy",
|
|
"swift_version":"latest-release",
|
|
"platform":"Linux",
|
|
"runner":"ubuntu-latest",
|
|
"image":"ubuntu:jammy",
|
|
"setup_command":"apt update -q && apt install -y -q curl jq tar && curl -s https://raw.githubusercontent.com/apple/swift-nio/main/scripts/install_swift_prerequisites.sh | bash && curl -s https://raw.githubusercontent.com/apple/swift-nio/main/scripts/install_static_sdk.sh | INSTALL_SWIFT_STATIC_SDK_VERSION=latest INSTALL_SWIFT_STATIC_SDK_ARCH=x86_64 bash && hash -r",
|
|
"command":"swift build",
|
|
"command_arguments":"--swift-sdk x86_64-swift-linux-musl"
|
|
},
|
|
{
|
|
"name":"main Jammy",
|
|
"swift_version":"main",
|
|
"platform":"Linux",
|
|
"runner":"ubuntu-latest",
|
|
"image":"ubuntu:jammy",
|
|
"setup_command":"apt update -q && apt install -y -q curl jq tar && curl -s https://raw.githubusercontent.com/apple/swift-nio/main/scripts/install_swift_prerequisites.sh | bash && curl -s https://raw.githubusercontent.com/apple/swift-nio/main/scripts/install_static_sdk.sh | INSTALL_SWIFT_STATIC_SDK_BRANCH=main INSTALL_SWIFT_STATIC_SDK_ARCH=x86_64 bash && hash -r",
|
|
"command":"swift build",
|
|
"command_arguments":"--swift-sdk x86_64-swift-linux-musl"
|
|
}
|
|
]
|
|
}
|