Skip to content

Commit 0e7e8ce

Browse files
qurious-pixelTheAssassin
authored andcommitted
static build
1 parent 2544715 commit 0e7e8ce

File tree

3 files changed

+35
-9
lines changed

3 files changed

+35
-9
lines changed

.github/workflows/main.yml

+21-7
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,34 @@ jobs:
77
strategy:
88
matrix:
99
ARCH: [x86_64, i386, aarch64, armhf]
10+
USE_STATIC_RUNTIME: [""]
1011
UPDATE: ["1"]
12+
13+
include:
14+
# test build
15+
- ARCH: x86_64
16+
DOCKER_ARCH: amd64
17+
BUILD_TYPE: coverage
18+
19+
# experimental build
20+
- ARCH: x86_64
21+
BUILD_TYPE: appimage
22+
USE_STATIC_RUNTIME: -static
23+
1124
fail-fast: false
1225

13-
name: ${{ matrix.ARCH }}
26+
name: ${{ matrix.ARCH }}${{ matrix.USE_STATIC_RUNTIME }}
1427
runs-on: ubuntu-latest
1528

1629
env:
1730
ARCH: ${{ matrix.ARCH }}
1831
BUILD_TYPE: ${{ matrix.BUILD_TYPE }}
1932
DEBIAN_FRONTEND: interactive
33+
USE_STATIC_RUNTIME: ${{ matrix.USE_STATIC_RUNTIME }}
2034

2135
steps:
2236
# check out once git command is available
23-
- uses: actions/checkout@v3
37+
- uses: actions/checkout@v4
2438
with:
2539
submodules: recursive
2640

@@ -31,10 +45,10 @@ jobs:
3145
run: bash ci/build-in-docker.sh
3246

3347
- name: Archive artifacts
34-
uses: actions/upload-artifact@v3
48+
uses: actions/upload-artifact@v4
3549
with:
36-
name: AppImage ${{ matrix.ARCH }}
37-
path: linuxdeploy-plugin-qt-${{ matrix.ARCH }}.AppImage*
50+
name: AppImage ${{ matrix.ARCH }}${{ matrix.USE_STATIC_RUNTIME}}
51+
path: linuxdeploy-plugin-qt${{ matrix.USE_STATIC_RUNTIME}}-${{ matrix.ARCH }}.AppImage*
3852

3953
upload:
4054
name: Create release and upload artifacts
@@ -43,7 +57,7 @@ jobs:
4357
runs-on: ubuntu-20.04
4458
steps:
4559
- name: Download artifacts
46-
uses: actions/download-artifact@v2
60+
uses: actions/download-artifact@v4
4761
- name: Inspect directory after downloading artifacts
4862
run: ls -alFR
4963
- name: Create release and upload artifacts
@@ -52,4 +66,4 @@ jobs:
5266
run: |
5367
wget -q https://github.com/TheAssassin/pyuploadtool/releases/download/continuous/pyuploadtool-x86_64.AppImage
5468
chmod +x pyuploadtool-x86_64.AppImage
55-
./pyuploadtool-x86_64.AppImage **/linuxdeploy-plugin-qt*.AppImage*
69+
./pyuploadtool-x86_64.AppImage **/linuxdeploy*.AppImage*

ci/build-in-docker.sh

100644100755
+2-1
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ run_in_docker() {
107107
-i \
108108
--init \
109109
-e GITHUB_RUN_NUMBER \
110+
-e USE_STATIC_RUNTIME \
110111
-e ARCH \
111112
-e CI \
112113
--user "$uid" \
@@ -118,4 +119,4 @@ run_in_docker() {
118119
}
119120

120121
run_in_docker bash ci/build.sh
121-
run_in_docker bash ci/test.sh linuxdeploy-plugin-qt-"$ARCH".AppImage
122+
run_in_docker bash ci/test.sh linuxdeploy-plugin-qt"$USE_STATIC_RUNTIME"-"$ARCH".AppImage

ci/build.sh

+12-1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,17 @@ patchelf_path="$(which patchelf)"
4343
strip_path="$(which strip)"
4444

4545
export UPD_INFO="gh-releases-zsync|linuxdeploy|linuxdeploy-plugin-qt|continuous|linuxdeploy-plugin-qt-$ARCH.AppImage"
46+
export OUTPUT="linuxdeploy-plugin-qt-$ARCH.AppImage"
47+
48+
# special set of builds using a different experimental runtime, used for testing purposes
49+
if [[ "${USE_STATIC_RUNTIME:-}" != "" ]]; then
50+
custom_runtime_url="https://github.com/AppImage/type2-runtime/releases/download/continuous/runtime-$ARCH"
51+
wget "$custom_runtime_url"
52+
runtime_filename="$(echo "$custom_runtime_url" | rev | cut -d/ -f1 | rev)"
53+
LDAI_RUNTIME_FILE="$(readlink -f "$runtime_filename")"
54+
export LDAI_RUNTIME_FILE
55+
export OUTPUT="linuxdeploy-plugin-qt-static-$ARCH.AppImage"
56+
fi
4657

4758
wget "https://github.com/TheAssassin/linuxdeploy/releases/download/continuous/linuxdeploy-$ARCH.AppImage"
4859
# 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
5667
-e "$strip_path" \
5768
--output appimage
5869

59-
mv linuxdeploy-plugin-qt-"$ARCH".AppImage* "$OLD_CWD"/
70+
mv "$OUTPUT"* "$OLD_CWD"/

0 commit comments

Comments
 (0)