diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1bba99e..eac8bd4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -7,20 +7,34 @@ jobs: strategy: matrix: ARCH: [x86_64, i386, aarch64, armhf] + USE_STATIC_RUNTIME: [""] UPDATE: ["1"] + + include: + # test build + - ARCH: x86_64 + DOCKER_ARCH: amd64 + BUILD_TYPE: coverage + + # experimental build + - ARCH: x86_64 + BUILD_TYPE: appimage + USE_STATIC_RUNTIME: -static + fail-fast: false - name: ${{ matrix.ARCH }} + name: ${{ matrix.ARCH }}${{ matrix.USE_STATIC_RUNTIME }} runs-on: ubuntu-latest env: ARCH: ${{ matrix.ARCH }} BUILD_TYPE: ${{ matrix.BUILD_TYPE }} DEBIAN_FRONTEND: interactive + USE_STATIC_RUNTIME: ${{ matrix.USE_STATIC_RUNTIME }} steps: # check out once git command is available - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: recursive @@ -31,10 +45,10 @@ jobs: run: bash ci/build-in-docker.sh - name: Archive artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: AppImage ${{ matrix.ARCH }} - path: linuxdeploy-plugin-qt-${{ matrix.ARCH }}.AppImage* + name: AppImage ${{ matrix.ARCH }}${{ matrix.USE_STATIC_RUNTIME}} + path: linuxdeploy-plugin-qt${{ matrix.USE_STATIC_RUNTIME}}-${{ matrix.ARCH }}.AppImage* upload: name: Create release and upload artifacts @@ -43,7 +57,7 @@ jobs: runs-on: ubuntu-20.04 steps: - name: Download artifacts - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v4 - name: Inspect directory after downloading artifacts run: ls -alFR - name: Create release and upload artifacts @@ -52,4 +66,4 @@ jobs: run: | wget -q https://github.com/TheAssassin/pyuploadtool/releases/download/continuous/pyuploadtool-x86_64.AppImage chmod +x pyuploadtool-x86_64.AppImage - ./pyuploadtool-x86_64.AppImage **/linuxdeploy-plugin-qt*.AppImage* + ./pyuploadtool-x86_64.AppImage **/linuxdeploy*.AppImage* diff --git a/ci/build-in-docker.sh b/ci/build-in-docker.sh old mode 100644 new mode 100755 index a7f7d9f..3024c5f --- a/ci/build-in-docker.sh +++ b/ci/build-in-docker.sh @@ -107,6 +107,7 @@ run_in_docker() { -i \ --init \ -e GITHUB_RUN_NUMBER \ + -e USE_STATIC_RUNTIME \ -e ARCH \ -e CI \ --user "$uid" \ @@ -118,4 +119,4 @@ run_in_docker() { } run_in_docker bash ci/build.sh -run_in_docker bash ci/test.sh linuxdeploy-plugin-qt-"$ARCH".AppImage +run_in_docker bash ci/test.sh linuxdeploy-plugin-qt"$USE_STATIC_RUNTIME"-"$ARCH".AppImage diff --git a/ci/build.sh b/ci/build.sh index c29edf8..103d555 100755 --- a/ci/build.sh +++ b/ci/build.sh @@ -43,6 +43,17 @@ patchelf_path="$(which patchelf)" strip_path="$(which strip)" export UPD_INFO="gh-releases-zsync|linuxdeploy|linuxdeploy-plugin-qt|continuous|linuxdeploy-plugin-qt-$ARCH.AppImage" +export OUTPUT="linuxdeploy-plugin-qt-$ARCH.AppImage" + +# special set of builds using a different experimental runtime, used for testing purposes +if [[ "${USE_STATIC_RUNTIME:-}" != "" ]]; then + custom_runtime_url="https://github.com/AppImage/type2-runtime/releases/download/continuous/runtime-$ARCH" + wget "$custom_runtime_url" + runtime_filename="$(echo "$custom_runtime_url" | rev | cut -d/ -f1 | rev)" + LDAI_RUNTIME_FILE="$(readlink -f "$runtime_filename")" + export LDAI_RUNTIME_FILE + export OUTPUT="linuxdeploy-plugin-qt-static-$ARCH.AppImage" +fi wget "https://github.com/TheAssassin/linuxdeploy/releases/download/continuous/linuxdeploy-$ARCH.AppImage" # qemu is not happy about the AppImage type 2 magic bytes, so we need to "fix" that @@ -56,4 +67,4 @@ chmod +x linuxdeploy*.AppImage -e "$strip_path" \ --output appimage -mv linuxdeploy-plugin-qt-"$ARCH".AppImage* "$OLD_CWD"/ +mv "$OUTPUT"* "$OLD_CWD"/