fix(quic): statically link MsQuic for Alpine nodes [CI]
This commit is contained in:
1 parent
0d08e90dab
commit
a44895d860
17 files changed
+363
-65
No files matched your search
@@ -113,7 +113,7 @@ mkdir -p "$nuget_cache"
|
||||
commit_epoch="$(git -C "$root" show -s --format=%ct "$CI_COMMIT_SHA")"
|
||||
built_at="$(date -u -d "@$commit_epoch" +%Y-%m-%dT%H:%M:%SZ)"
|
||||
|
||||
python3 "$root/ci/stage-node-image.py" "$component" "$context"
|
||||
python3 "$root/ci/stage-node-image.py" "$component" "$node_rid" "$context"
|
||||
run_bounded 30m buildah bud --layers --network host --tls-verify=true --arch "$arch" \
|
||||
--volume "$nuget_cache:/root/.nuget/packages:rw" \
|
||||
--build-arg "APP_VERSION=$image_version" \
|
||||
|
||||
+11
-2
@@ -9,6 +9,7 @@ from pathlib import Path
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
BACKEND = ROOT / "backend"
|
||||
STATIC_MSQUIC = ROOT / "packaging/native/msquic"
|
||||
IGNORED_PARTS = {".git", ".release", "artifacts", "bin", "obj", "TestResults", "tests"}
|
||||
GLOBAL_BACKEND_FILES = {
|
||||
"Directory.Build.props",
|
||||
@@ -27,7 +28,7 @@ CONTAINERFILES = {
|
||||
}
|
||||
|
||||
|
||||
def stage(component: str, destination: Path) -> None:
|
||||
def stage(component: str, runtime_identifier: str, destination: Path) -> None:
|
||||
if destination.exists():
|
||||
shutil.rmtree(destination)
|
||||
restore = destination / "restore/backend"
|
||||
@@ -57,6 +58,13 @@ def stage(component: str, destination: Path) -> None:
|
||||
for directory in (restore, source):
|
||||
shutil.copy2(ROOT / name, directory / name)
|
||||
|
||||
static_library = STATIC_MSQUIC / runtime_identifier / "libmsquic.a"
|
||||
if not static_library.is_file():
|
||||
raise FileNotFoundError(f"static MsQuic archive is missing for {runtime_identifier}: {static_library}")
|
||||
staged_library = destination / "source/packaging/native/msquic" / runtime_identifier / "libmsquic.a"
|
||||
staged_library.parent.mkdir(parents=True, exist_ok=True)
|
||||
shutil.copy2(static_library, staged_library)
|
||||
|
||||
config = destination / "config"
|
||||
config.mkdir()
|
||||
(config / ".keep").write_text("", encoding="utf-8")
|
||||
@@ -68,9 +76,10 @@ def stage(component: str, destination: Path) -> None:
|
||||
def main() -> None:
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("component", choices=tuple(CONTAINERFILES))
|
||||
parser.add_argument("runtime_identifier", choices=("linux-musl-x64", "linux-musl-arm64"))
|
||||
parser.add_argument("destination", type=Path)
|
||||
args = parser.parse_args()
|
||||
stage(args.component, args.destination)
|
||||
stage(args.component, args.runtime_identifier, args.destination)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in new issue
Block a user