]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Fixed S390X configure builds not running in forks.
authorNathan Moinvaziri <nathan@nathanm.com>
Sun, 14 Jan 2024 04:28:38 +0000 (20:28 -0800)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Wed, 21 Feb 2024 23:00:05 +0000 (00:00 +0100)
.github/workflows/configure.yml

index 9d870ce24ee2614636a4f3d993a8e650982e75f3..15b0189cbcbeb16ff12ba8b728b664bd8cf8bc4c 100644 (file)
@@ -168,14 +168,22 @@ jobs:
             ldflags: -static
 
           - name: Ubuntu GCC S390X DFLTCC
-            os: z15
-            compiler: gcc
+            os: ${{ github.repository == 'zlib-ng/zlib-ng' && 'z15' || 'ubuntu-latest' }}
+            compiler: ${{ github.repository == 'zlib-ng/zlib-ng' && 'gcc' || 's390x-linux-gnu-gcc' }}
             configure-args: --warn --static --with-dfltcc-deflate --with-dfltcc-inflate
+            chost: ${{ github.repository != 'zlib-ng/zlib-ng' &&  's390x-linux-gnu' || '' }}
+            packages: ${{ github.repository != 'zlib-ng/zlib-ng' && 'qemu qemu-user gcc-s390x-linux-gnu g++-s390x-linux-gnu libc-dev-s390x-cross' || '' }}
+            cflags: ${{ github.repository != 'zlib-ng/zlib-ng' && '-static' || '' }}
+            ldflags: ${{ github.repository != 'zlib-ng/zlib-ng' && '-static' || '' }}
 
           - name: Ubuntu GCC S390X DFLTCC Compat
-            os: z15
-            compiler: gcc
+            os: ${{ github.repository == 'zlib-ng/zlib-ng' && 'z15' || 'ubuntu-latest' }}
+            compiler: ${{ github.repository == 'zlib-ng/zlib-ng' && 'gcc' || 's390x-linux-gnu-gcc' }}
             configure-args: --warn --zlib-compat --static --with-dfltcc-deflate --with-dfltcc-inflate
+            chost: ${{ github.repository != 'zlib-ng/zlib-ng' &&  's390x-linux-gnu' || '' }}
+            packages: ${{ github.repository != 'zlib-ng/zlib-ng' && 'qemu qemu-user gcc-s390x-linux-gnu g++-s390x-linux-gnu libc-dev-s390x-cross' || '' }}
+            cflags: ${{ github.repository != 'zlib-ng/zlib-ng' && '-static' || '' }}
+            ldflags: ${{ github.repository != 'zlib-ng/zlib-ng' && '-static' || '' }}
 
           - name: Ubuntu Emscripten WASM32
             os: ubuntu-latest
@@ -209,8 +217,8 @@ jobs:
 
     - name: Add ubuntu mirrors
       if: runner.os == 'Linux' && matrix.packages
+      # Github Actions caching proxy is at times unreliable
       run: |
-        # Github Actions caching proxy is at times unreliable
         echo -e 'http://azure.archive.ubuntu.com/ubuntu\tpriority:1\n' | sudo tee /etc/apt/mirrors.txt
         curl http://mirrors.ubuntu.com/mirrors.txt | sudo tee --append /etc/apt/mirrors.txt
         sudo sed -i 's#http://azure.archive.ubuntu.com/ubuntu/#mirror+file:/etc/apt/mirrors.txt#' /etc/apt/sources.list