Sync verified Native toolchain fixes for graphics Actions tests
This commit is contained in:
1 parent
2550092870
commit
af373cd174
3 files changed
+13
-2
No files matched your search
@@ -2,6 +2,10 @@ name: pinned-zig-toolchain-image
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
validation_rids:
|
||||
type: string
|
||||
default: '[]'
|
||||
outputs:
|
||||
image:
|
||||
description: Immutable Debian 12 Zig toolchain image reference
|
||||
@@ -26,6 +30,7 @@ jobs:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
ACTOR: ${{ github.actor }}
|
||||
REPOSITORY: ${{ github.repository }}
|
||||
VALIDATION_RIDS: ${{ inputs.validation_rids || '[]' }}
|
||||
BASE_HASH: ${{ hashFiles('build/linux-toolchain/Dockerfile') }}
|
||||
RECIPE_HASH: ${{ hashFiles('build/linux-toolchain/Dockerfile*', 'build/linux-toolchain/*.py', 'build/linux-toolchain/*.c', 'build/linux-toolchain/*.gn.in', 'build/linux-toolchain/*lock.json', 'build/linux-toolchain/versions/*.json', 'build/linux-toolchain/patches/**') }}
|
||||
run: |
|
||||
@@ -55,7 +60,7 @@ jobs:
|
||||
docker run --rm --user "$(id -u):$(id -g)" \
|
||||
-e HOME=/tmp -e DOTNET_CLI_HOME=/tmp -e ZIG_GLOBAL_CACHE_DIR=/tmp/zig-cache \
|
||||
-v "$PWD/artifacts/toolchain-environment:/validation" \
|
||||
--entrypoint python3 "$image" /opt/staticlink/validate-toolchain.py --output /validation
|
||||
--entrypoint python3 "$image" /opt/staticlink/validate-toolchain.py --output /validation --rids "$VALIDATION_RIDS"
|
||||
if [ "$built_image" = true ]; then
|
||||
docker push "$image"
|
||||
docker pull "$image"
|
||||
|
||||
@@ -21,7 +21,7 @@ RUN rm -f /etc/apt/sources.list.d/debian.sources \
|
||||
pkg-config cmake binutils file unzip xz-utils bzip2 patch \
|
||||
libfontconfig1-dev libglib2.0-dev libgl1-mesa-dev libpci-dev \
|
||||
libx11-dev libxcb1-dev libxext-dev libwayland-dev libexpat1-dev libicu72 libssl3 \
|
||||
&& for tool in clang clang++ llvm-ar llvm-ranlib llvm-nm; do \
|
||||
&& for tool in clang clang++ llvm-ar llvm-ranlib llvm-nm lld ld.lld lld-link ld64.lld; do \
|
||||
ln -s "/usr/bin/$tool-16" "/usr/local/bin/$tool"; \
|
||||
done \
|
||||
&& mkdir -p /opt/staticlink \
|
||||
|
||||
@@ -20,6 +20,7 @@ def run(command):
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description=__doc__)
|
||||
parser.add_argument("--output", type=Path, required=True)
|
||||
parser.add_argument("--rids", default="[]")
|
||||
args = parser.parse_args()
|
||||
args.output.mkdir(parents=True, exist_ok=True)
|
||||
report = {"python": sys.version, "targets": {}, "passed": False}
|
||||
@@ -41,6 +42,11 @@ def main():
|
||||
raise RuntimeError("Missing .NET SDK " + major)
|
||||
adapter = Path(__file__).with_name("zig-cross.py")
|
||||
targets = runpy.run_path(str(adapter))["TARGETS"]
|
||||
requested = json.loads(args.rids)
|
||||
if not isinstance(requested, list) or any(rid not in targets for rid in requested):
|
||||
raise ValueError("Expected a JSON array of supported RIDs")
|
||||
if requested:
|
||||
targets = {rid: targets[rid] for rid in requested}
|
||||
sdk = Path("/opt/macos-sdk/MacOSX15.5.sdk")
|
||||
if json.loads((sdk / "SDKSettings.json").read_text())["Version"] != "15.5":
|
||||
raise RuntimeError("Unexpected macOS SDK version")
|
||||
|
||||
Reference in new issue
Block a user