]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
s390x: Add workaround to install custom Clang 19.1.5 rpms to actions-runner
authorHans Kristian Rosbach <hk-git@circlestorm.org>
Sun, 26 Jan 2025 14:05:24 +0000 (15:05 +0100)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Mon, 27 Jan 2025 11:39:53 +0000 (12:39 +0100)
image in order to avoid the VX compiler bug in older clang versions.

arch/s390/self-hosted-builder/actions-runner
arch/s390/self-hosted-builder/actions-runner-rebuild.sh
arch/s390/self-hosted-builder/actions-runner.Dockerfile

index a1d031bcf88cd54b4b0a394ee7d89532270d82d0..8d194bac3fb9efde1a2e85b01975acd5ca8ff28f 100755 (executable)
@@ -44,6 +44,7 @@ if [ $REG_TOKEN = "null" ]; then
 fi
 
 # (Re-)register the runner.
+./config.sh remove --token "$REG_TOKEN" || true
 set -x
 ./config.sh \
     --url "https://github.com/$REPO" \
index eb39f929deace30187673e657679c3957bf6ca0d..703448fca0f6b8a3a06b8d0c6403f351adf30032 100644 (file)
@@ -1,17 +1,24 @@
 #!/usr/bin/bash
 set -ex
 
+TMPDIR="$(mktemp -d)"
+
 if [ -f actions-runner.Dockerfile ]; then
     MODE=1
+    cp actions-runner.Dockerfile actions-runner entrypoint $TMPDIR
+    cd $TMPDIR
 else
     MODE=2
-    TMPDIR="$(mktemp -d)"
     cd $TMPDIR
     wget https://raw.githubusercontent.com/zlib-ng/zlib-ng/refs/heads/develop/arch/s390/self-hosted-builder/actions-runner.Dockerfile
     wget https://raw.githubusercontent.com/zlib-ng/zlib-ng/refs/heads/develop/arch/s390/self-hosted-builder/actions-runner
     wget https://raw.githubusercontent.com/zlib-ng/zlib-ng/refs/heads/develop/arch/s390/self-hosted-builder/entrypoint
 fi
 
+# Copy rpms needed to workaround VX compiler bug, ref #1852
+mkdir clang
+cp /clang-19/*.rpm clang/
+
 # Stop service
 systemctl stop actions-runner || true
 
@@ -19,7 +26,7 @@ systemctl stop actions-runner || true
 podman container rm gaplib-actions-runner || true
 
 # Delete old image
-podman image rm localhost/zlib-ng/actions-runner
+podman image rm localhost/zlib-ng/actions-runner || true
 
 # Build new image
 podman build --squash -f actions-runner.Dockerfile --tag zlib-ng/actions-runner . 2>&1 | tee /var/log/actions-runner-build.log
@@ -40,6 +47,7 @@ if [ "$MODE" == "2" ] ; then
     rm actions-runner.Dockerfile
     rm actions-runner
     rm entrypoint
+    rm -rf clang
     cd ..
     rmdir $TMPDIR
     echo "Deleted tempfiles."
index 9f4666b1160aca6d4ab877ad680b223f645f87c9..f43ab85f03d8d73c75467db40e5319de4adf7e62 100644 (file)
@@ -32,6 +32,15 @@ RUN     tar -xf /tmp/runner/_package/*.tar.gz -C /home/actions-runner && \
 
 #VOLUME  /home/actions-runner
 
+# Workaround: Install custom clang version to avoid compiler bug, ref #1852
+RUN     mkdir /tmp/clang
+
+COPY    clang/*.rpm /tmp/clang
+
+RUN     dnf -y upgrade /tmp/clang/*.rpm && \
+        rm -rf /tmp/clang
+
+# Cleanup
 RUN     rm -rf /tmp/runner /var/cache/dnf/* /tmp/runner.patch /tmp/global.json && \
         dnf clean all