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:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
validation_rids:
|
||||||
|
type: string
|
||||||
|
default: '[]'
|
||||||
outputs:
|
outputs:
|
||||||
image:
|
image:
|
||||||
description: Immutable Debian 12 Zig toolchain image reference
|
description: Immutable Debian 12 Zig toolchain image reference
|
||||||
@@ -26,6 +30,7 @@ jobs:
|
|||||||
GH_TOKEN: ${{ github.token }}
|
GH_TOKEN: ${{ github.token }}
|
||||||
ACTOR: ${{ github.actor }}
|
ACTOR: ${{ github.actor }}
|
||||||
REPOSITORY: ${{ github.repository }}
|
REPOSITORY: ${{ github.repository }}
|
||||||
|
VALIDATION_RIDS: ${{ inputs.validation_rids || '[]' }}
|
||||||
BASE_HASH: ${{ hashFiles('build/linux-toolchain/Dockerfile') }}
|
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/**') }}
|
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: |
|
run: |
|
||||||
@@ -55,7 +60,7 @@ jobs:
|
|||||||
docker run --rm --user "$(id -u):$(id -g)" \
|
docker run --rm --user "$(id -u):$(id -g)" \
|
||||||
-e HOME=/tmp -e DOTNET_CLI_HOME=/tmp -e ZIG_GLOBAL_CACHE_DIR=/tmp/zig-cache \
|
-e HOME=/tmp -e DOTNET_CLI_HOME=/tmp -e ZIG_GLOBAL_CACHE_DIR=/tmp/zig-cache \
|
||||||
-v "$PWD/artifacts/toolchain-environment:/validation" \
|
-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
|
if [ "$built_image" = true ]; then
|
||||||
docker push "$image"
|
docker push "$image"
|
||||||
docker pull "$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 \
|
pkg-config cmake binutils file unzip xz-utils bzip2 patch \
|
||||||
libfontconfig1-dev libglib2.0-dev libgl1-mesa-dev libpci-dev \
|
libfontconfig1-dev libglib2.0-dev libgl1-mesa-dev libpci-dev \
|
||||||
libx11-dev libxcb1-dev libxext-dev libwayland-dev libexpat1-dev libicu72 libssl3 \
|
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"; \
|
ln -s "/usr/bin/$tool-16" "/usr/local/bin/$tool"; \
|
||||||
done \
|
done \
|
||||||
&& mkdir -p /opt/staticlink \
|
&& mkdir -p /opt/staticlink \
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ def run(command):
|
|||||||
def main():
|
def main():
|
||||||
parser = argparse.ArgumentParser(description=__doc__)
|
parser = argparse.ArgumentParser(description=__doc__)
|
||||||
parser.add_argument("--output", type=Path, required=True)
|
parser.add_argument("--output", type=Path, required=True)
|
||||||
|
parser.add_argument("--rids", default="[]")
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
args.output.mkdir(parents=True, exist_ok=True)
|
args.output.mkdir(parents=True, exist_ok=True)
|
||||||
report = {"python": sys.version, "targets": {}, "passed": False}
|
report = {"python": sys.version, "targets": {}, "passed": False}
|
||||||
@@ -41,6 +42,11 @@ def main():
|
|||||||
raise RuntimeError("Missing .NET SDK " + major)
|
raise RuntimeError("Missing .NET SDK " + major)
|
||||||
adapter = Path(__file__).with_name("zig-cross.py")
|
adapter = Path(__file__).with_name("zig-cross.py")
|
||||||
targets = runpy.run_path(str(adapter))["TARGETS"]
|
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")
|
sdk = Path("/opt/macos-sdk/MacOSX15.5.sdk")
|
||||||
if json.loads((sdk / "SDKSettings.json").read_text())["Version"] != "15.5":
|
if json.loads((sdk / "SDKSettings.json").read_text())["Version"] != "15.5":
|
||||||
raise RuntimeError("Unexpected macOS SDK version")
|
raise RuntimeError("Unexpected macOS SDK version")
|
||||||
|
|||||||
Reference in new issue
Block a user