From 17eff0aed4dfeb4e8feda4b1f9d4028f795c4d70 Mon Sep 17 00:00:00 2001 From: "Markus F.X.J. Oberhumer" Date: Fri, 29 Dec 2023 05:45:00 +0100 Subject: [PATCH] CI updates --- ...linux.yml => test-minimal-alpinelinux.yml} | 8 +-- .../workflows/test-minimal-chimera-linux.yml | 41 ----------- .../workflows/test-minimal-chimeralinux.yml | 71 +++++++++++++++++++ .github/workflows/weekly-ci-bs-by-hand.yml | 2 +- 4 files changed, 76 insertions(+), 46 deletions(-) rename .github/workflows/{test-minimal-alpine-linux.yml => test-minimal-alpinelinux.yml} (88%) delete mode 100644 .github/workflows/test-minimal-chimera-linux.yml create mode 100644 .github/workflows/test-minimal-chimeralinux.yml diff --git a/.github/workflows/test-minimal-alpine-linux.yml b/.github/workflows/test-minimal-alpinelinux.yml similarity index 88% rename from .github/workflows/test-minimal-alpine-linux.yml rename to .github/workflows/test-minimal-alpinelinux.yml index 656f36af..a471042b 100644 --- a/.github/workflows/test-minimal-alpine-linux.yml +++ b/.github/workflows/test-minimal-alpinelinux.yml @@ -12,7 +12,7 @@ env: DEBIAN_FRONTEND: noninteractive jobs: - job-alpine-clang: # uses cmake + make + job-alpinelinux-clang-static: # uses cmake + make if: true strategy: { matrix: { container: ['alpine:edge','i386/alpine:edge'] } } name: ${{ format('clang {0}', matrix.container) }} @@ -30,7 +30,7 @@ jobs: make -C build/debug test make -C build/release test make -C build/release install DESTDIR="$PWD/Install" - N=$(echo "upx-test-minimal-alpine-linux-clang-${{ matrix.container }}" | sed 's/[^0-9a-zA-Z_.-]/-/g') + N=$(echo "upx-test-minimal-alpinelinux-clang-static-${{ matrix.container }}" | sed 's/[^0-9a-zA-Z_.-]/-/g') echo "artifact_name=$N" >> $GITHUB_ENV - name: ${{ format('Upload artifact {0}', env.artifact_name) }} if: ${{ !startsWith(matrix.container, 'i386/') }} # i386: missing nodejs on host @@ -39,7 +39,7 @@ jobs: name: ${{ env.artifact_name }} path: 'upx*/build/*/upx' - job-alpine-gcc: # uses cmake + make + job-alpinelinux-gcc-static: # uses cmake + make if: true strategy: { matrix: { container: ['alpine:edge','i386/alpine:edge'] } } name: ${{ format('gcc {0}', matrix.container) }} @@ -57,7 +57,7 @@ jobs: make -C build/debug test make -C build/release test make -C build/release install DESTDIR="$PWD/Install" - N=$(echo "upx-test-minimal-alpine-linux-gcc-${{ matrix.container }}" | sed 's/[^0-9a-zA-Z_.-]/-/g') + N=$(echo "upx-test-minimal-alpinelinux-gcc-static-${{ matrix.container }}" | sed 's/[^0-9a-zA-Z_.-]/-/g') echo "artifact_name=$N" >> $GITHUB_ENV - name: ${{ format('Upload artifact {0}', env.artifact_name) }} if: ${{ !startsWith(matrix.container, 'i386/') }} # i386: missing nodejs on host diff --git a/.github/workflows/test-minimal-chimera-linux.yml b/.github/workflows/test-minimal-chimera-linux.yml deleted file mode 100644 index a0538d5d..00000000 --- a/.github/workflows/test-minimal-chimera-linux.yml +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (C) Markus Franz Xaver Johannes Oberhumer -# test minimal number of packages required for building UPX under Chimera Linux -# clang: apk add clang cmake curl gmake gtar -# - -name: 'Test - Minimal Chimera build' -on: [workflow_dispatch] -env: - CMAKE_REQUIRED_QUIET: 'OFF' - CMAKE_VERBOSE_MAKEFILE: 'ON' - CTEST_OUTPUT_ON_FAILURE: 'ON' - DEBIAN_FRONTEND: noninteractive - -jobs: - job-chimera-clang: # uses cmake + make - if: true - strategy: { matrix: { container: ['chimeralinux/chimera:latest'] } } - name: ${{ format('clang {0}', matrix.container) }} - runs-on: ubuntu-latest - container: ${{ matrix.container }} - steps: - - name: ${{ format('Build clang {0}', matrix.container) }} - run: | - apk update && apk upgrade && apk add clang cmake curl gmake gtar - for p in make tar; do ln -s -v ../../bin/g$p /usr/local/bin/$p; done - curl -OL https://github.com/upx/upx/releases/download/v4.2.1/upx-4.2.1-src.tar.xz - tar -xoaf upx-*-src.tar.xz - cd upx-*-src - make build/debug CC="clang" CXX="clang++" - make build/release CC="clang" CXX="clang++" - make -C build/debug test - make -C build/release test - make -C build/release install DESTDIR="$PWD/Install" - N=$(echo "upx-test-minimal-chimera-linux-clang-${{ matrix.container }}" | sed 's/[^0-9a-zA-Z_.-]/-/g') - echo "artifact_name=$N" >> $GITHUB_ENV - - name: ${{ format('Upload artifact {0}', env.artifact_name) }} - if: false # missing nodejs on host - uses: actions/upload-artifact@v4 - with: - name: ${{ env.artifact_name }} - path: 'upx*/build/*/upx' diff --git a/.github/workflows/test-minimal-chimeralinux.yml b/.github/workflows/test-minimal-chimeralinux.yml new file mode 100644 index 00000000..3b8355eb --- /dev/null +++ b/.github/workflows/test-minimal-chimeralinux.yml @@ -0,0 +1,71 @@ +# Copyright (C) Markus Franz Xaver Johannes Oberhumer +# test minimal number of packages required for building UPX under Chimera Linux +# clang: apk add clang cmake curl gmake gtar +# + +name: 'Test - Minimal Chimera build' +on: [workflow_dispatch] +env: + CMAKE_REQUIRED_QUIET: 'OFF' + CMAKE_VERBOSE_MAKEFILE: 'ON' + CTEST_OUTPUT_ON_FAILURE: 'ON' + DEBIAN_FRONTEND: noninteractive + +jobs: + job-chimeralinux-clang: # uses cmake + make + if: true + strategy: { matrix: { container: ['chimeralinux/chimera:latest'] } } + name: ${{ format('clang {0}', matrix.container) }} + runs-on: ubuntu-latest + container: ${{ matrix.container }} + steps: + - name: ${{ format('Build clang {0}', matrix.container) }} + run: | + apk update && apk upgrade && apk add clang cmake curl gmake gtar + for p in make tar; do ln -s -v ../../bin/g$p /usr/local/bin/$p; done + curl -OL https://github.com/upx/upx/releases/download/v4.2.1/upx-4.2.1-src.tar.xz + tar -xoaf upx-*-src.tar.xz + cd upx-*-src + make build/debug CC="clang" CXX="clang++" + make build/release CC="clang" CXX="clang++" + make -C build/debug test + make -C build/release test + make -C build/release install DESTDIR="$PWD/Install" + N=$(echo "upx-test-minimal-chimeralinux-clang-${{ matrix.container }}" | sed 's/[^0-9a-zA-Z_.-]/-/g') + echo "artifact_name=$N" >> $GITHUB_ENV + - name: ${{ format('Upload artifact {0}', env.artifact_name) }} + if: false # missing nodejs on host + uses: actions/upload-artifact@v4 + with: + name: ${{ env.artifact_name }} + path: 'upx*/build/*/upx' + + job-chimeralinux-clang-static: # uses cmake + make + if: true + strategy: { matrix: { container: ['chimeralinux/chimera:latest'] } } + name: ${{ format('clang {0}', matrix.container) }} + runs-on: ubuntu-latest + container: ${{ matrix.container }} + steps: + - name: ${{ format('Build clang {0}', matrix.container) }} + run: | + apk update && apk upgrade && apk add clang cmake curl gmake gtar + for p in make tar; do ln -s -v ../../bin/g$p /usr/local/bin/$p; done + # install -static packages + apk add libcxx-devel-static musl-devel-static + curl -OL https://github.com/upx/upx/releases/download/v4.2.1/upx-4.2.1-src.tar.xz + tar -xoaf upx-*-src.tar.xz + cd upx-*-src + make build/debug CC="clang -static" CXX="clang++ -static" + make build/release CC="clang -static" CXX="clang++ -static" + make -C build/debug test + make -C build/release test + make -C build/release install DESTDIR="$PWD/Install" + N=$(echo "upx-test-minimal-chimeralinux-clang-static-${{ matrix.container }}" | sed 's/[^0-9a-zA-Z_.-]/-/g') + echo "artifact_name=$N" >> $GITHUB_ENV + - name: ${{ format('Upload artifact {0}', env.artifact_name) }} + if: false # missing nodejs on host + uses: actions/upload-artifact@v4 + with: + name: ${{ env.artifact_name }} + path: 'upx*/build/*/upx' diff --git a/.github/workflows/weekly-ci-bs-by-hand.yml b/.github/workflows/weekly-ci-bs-by-hand.yml index a72a0252..88c31767 100644 --- a/.github/workflows/weekly-ci-bs-by-hand.yml +++ b/.github/workflows/weekly-ci-bs-by-hand.yml @@ -13,7 +13,7 @@ env: VERBOSE: 1 jobs: - job-by-hand-alpine-linux-gcc: # uses a POSIX-compliant shell + job-by-hand-alpinelinux-gcc: # uses a POSIX-compliant shell # ...and also uses a subdirectory "upx with space" in order to detect possible quoting issues # ...and also uses ccache as we are running the same build-script again and again if: github.repository_owner == 'upx'