Skip to content

Commit 0989484

Browse files
committed
v2.2.0 / v2.0.20
adding -static-pie
1 parent 06b2458 commit 0989484

File tree

13 files changed

+2213
-1245
lines changed

13 files changed

+2213
-1245
lines changed
Lines changed: 65 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# @credits https://github.com/c0re100/qBittorrent-Enhanced-Edition
21
name: ci - alpine build
32

43
on:
@@ -24,31 +23,37 @@ on:
2423
description: "script name"
2524
required: true
2625
type: string
26+
2727
jobs:
28-
build-alpine:
29-
runs-on: ubuntu-24.04-arm
28+
build:
29+
runs-on: ${{ matrix.runs_on }}
3030
strategy:
3131
fail-fast: false
3232
matrix:
33+
runs_on: ["ubuntu-24.04-arm"]
3334
os_id: [alpine]
3435
os_version_id: [edge]
3536
qbt_cross_name: ["armhf", "armv7", "aarch64", "riscv64", "x86_64", "x86"]
3637
qbt_libtorrent_version: ["1.2", "2.0"]
37-
qbt_build_tool: ["", "qmake"]
38+
qbt_build_tool: [""]
39+
qbt_qt_version: ["6"]
3840
include:
39-
- qbt_build_tool: "qmake"
40-
qbt_qt_version_name: "qt5-"
41-
qbt_qt_version: "5"
4241
- qbt_build_tool: ""
4342
qbt_qt_version_name: ""
44-
qbt_qt_version: "6"
4543

4644
name: "${{ matrix.qbt_cross_name }}-${{ matrix.qbt_qt_version_name }}libtorrent-v${{ matrix.qbt_libtorrent_version }}"
4745

4846
env:
4947
qbt_build_dir: "qbt-build"
50-
script_name: ${{ inputs.script_name }}
5148
container_name: "multiarch"
49+
script_name: ${{ inputs.script_name }}
50+
set_skip_icu: ${{ inputs.icu }}
51+
set_workflow_files: ${{ inputs.workflow-files }}
52+
set_build_debug: ${{ inputs.debug }}
53+
set_qbt_mcm_url: "" # default is userdocs/qbt-musl-cross-make
54+
set_qbt_with_qemu: "" # default is yes
55+
set_qbt_host_deps: "" # default is no
56+
set_qbt_host_deps_repo: "" # default is userdocs/qbt-host-deps
5257

5358
steps:
5459
- name: Checkout ${{ inputs.distinct_id }}
@@ -57,151 +62,115 @@ jobs:
5762
persist-credentials: false
5863

5964
- name: Host - Create Docker template env file ${{ inputs.distinct_id }}
60-
env:
61-
set_skip_icu: ${{ inputs.icu }}
62-
set_workflow_files: ${{ inputs.workflow-files }}
63-
set_build_debug: ${{ inputs.debug }}
6465
run: |
65-
printf '%s\n' "qbt_build_dir=${{ env.qbt_build_dir }}" > env.custom
66-
printf '%s\n' "qbt_libtorrent_version=${{ matrix.qbt_libtorrent_version }}" >> env.custom
67-
printf '%s\n' "qbt_qt_version=${{ matrix.qbt_qt_version }}" >> env.custom
68-
printf '%s\n' "qbt_build_tool=${{ matrix.qbt_build_tool }}" >> env.custom
69-
printf '%s\n' "qbt_cross_name=${{ matrix.qbt_cross_name }}" >> env.custom
70-
printf '%s\n' "qbt_patches_url=${{ github.repository }}" >> env.custom
66+
printf '%s\n' "qbt_revision_url=${{ github.repository }}" > env.custom
67+
printf '%s\n' "qbt_zlib_type=zlib" >> env.custom
7168
printf '%s\n' "qbt_skip_icu=${set_skip_icu}" >> env.custom
7269
printf '%s\n' "qbt_boost_tag=${{ matrix.qbt_boost_tag }}" >> env.custom
70+
printf '%s\n' "qbt_libtorrent_version=${{ matrix.qbt_libtorrent_version }}" >> env.custom
7371
printf '%s\n' "qbt_libtorrent_tag=${{ matrix.qbt_libtorrent_tag }}" >> env.custom
72+
printf '%s\n' "qbt_libtorrent_master_jamfile=" >> env.custom
73+
printf '%s\n' "qbt_qt_version=${{ matrix.qbt_qt_version }}" >> env.custom
7474
printf '%s\n' "qbt_qt_tag=${{ matrix.qbt_qt_tag }}" >> env.custom
7575
printf '%s\n' "qbt_qbittorrent_tag=${{ matrix.qbt_qbittorrent_tag }}" >> env.custom
76-
printf '%s\n' "qbt_libtorrent_master_jamfile=" >> env.custom
76+
printf '%s\n' "qbt_build_dir=${{ env.qbt_build_dir }}" >> env.custom
77+
printf '%s\n' "qbt_build_tool=${{ matrix.qbt_build_tool }}" >> env.custom
78+
printf '%s\n' "qbt_cross_name=${{ matrix.qbt_cross_name }}" >> env.custom
79+
printf '%s\n' "qbt_mcm_url=${set_qbt_mcm_url}" >> env.custom
80+
printf '%s\n' "qbt_patches_url=${{ github.repository }}" >> env.custom
7781
printf '%s\n' "qbt_workflow_files=${set_workflow_files}" >> env.custom
78-
printf '%s\n' "qbt_workflow_artifacts=" >> env.custom
7982
printf '%s\n' "qbt_cache_dir=" >> env.custom
8083
printf '%s\n' "qbt_optimise_strip=" >> env.custom
8184
printf '%s\n' "qbt_build_debug=${set_build_debug}" >> env.custom
82-
printf '%s\n' "qbt_revision_url=${{ github.repository }}" >> env.custom
8385
printf '%s\n' "qbt_standard=" >> env.custom
8486
printf '%s\n' "qbt_static_ish=" >> env.custom
87+
printf '%s\n' "qbt_optimise=${qbt_optimise}" >> env.custom
88+
printf '%s\n' "qbt_with_qemu=${set_qbt_with_qemu}" >> env.custom
89+
printf '%s\n' "qbt_host_deps=${set_qbt_host_deps}" >> env.custom
90+
printf '%s\n\n' "qbt_host_deps_repo=${set_qbt_host_deps_repo}" >> env.custom
8591
86-
# - name: Host - Github env to container ${{ inputs.distinct_id }}
87-
# run: env >> env.custom
88-
89-
- name: Host - check stuff ${{ inputs.distinct_id }}
90-
run: export $(cat env.custom) && bash ${script_name}
91-
92-
- name: Host - qBittorrent v5 transition ${{ inputs.distinct_id }}
92+
- name: Host - Debian based specific env ${{ inputs.distinct_id }}
93+
if : matrix.os_id != 'alpine'
9394
run: |
94-
if [[ -f "${qbt_build_dir}/release_info/disable-qt5" || -f "disable-qt5" ]]; then
95-
printf '%s\n' "disable_qt5=yes" >> $GITHUB_ENV
96-
printf '%s\n' "Found file: \`disable-qt5\` -> setting env: \`disable_qt5=yes\`" >> $GITHUB_STEP_SUMMARY
97-
fi
98-
99-
- name: Host - phased updates ${{ inputs.distinct_id }}
100-
if: env.disable_qt5 != 'yes'
101-
run: printf '%s\n' 'APT::Get::Always-Include-Phased-Updates "false";' | sudo tee /etc/apt/apt.conf.d/99-phased-updates
95+
printf '%s\n' "LANG=C.UTF-8" >> env.custom
96+
printf '%s\n' "LC_ALL=C.UTF-8" >> env.custom
97+
printf '%s\n\n' "DEBIAN_FRONTEND=noninteractive" >> env.custom
10298
103-
- name: Host - update ${{ inputs.distinct_id }}
104-
if: env.disable_qt5 != 'yes'
105-
run: sudo apt-get update
99+
- name: Host - Bootstrap qemu
100+
uses: userdocs/actions/qemu@main
106101

107-
# - name: Host - upgrade ${{ inputs.distinct_id }}
108-
# run: sudo apt-get -y upgrade
109-
110-
- name: Host - set up qemu-user-static binfmt-support ${{ inputs.distinct_id }}
111-
if: env.disable_qt5 != 'yes'
112-
run: sudo apt install libpipeline1 qemu-user-static binfmt-support
113-
114-
- name: Host - Create docker ${{ env.multiarch }} container ${{ inputs.distinct_id }}
115-
if: env.disable_qt5 != 'yes'
116-
run: |
117-
# We create an Alpine edge container for cross-compilation with a user named gh which has same id as runner 1001 and provide sudo access
118-
# This way we can run commands as a non-root user, avoiding permission issues on host runner. Switching between user and root as needed.
119-
docker run --name ${container_name} -it -d --env-file env.custom -w /home/gh -v ${{ github.workspace }}:/home/gh ${{ matrix.os_id }}:${{ matrix.os_version_id }}
120-
# Create the user gh with the id 1001:1001 which is the same as the runner user id and group id.
121-
docker exec ${container_name} sh -c 'adduser -h /home/gh -Ds /bin/bash -u 1001 gh && apk add sudo'
122-
# Allow the user gh to run sudo without password prompt: docker exec -u gh:gh ${container_name} sudo ls
123-
docker exec ${container_name} sh -c 'printf "%s" "gh ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/gh'
102+
- uses: userdocs/actions/qbt_docker@main
103+
with:
104+
# if the env.custom file exists, it will be used to pass environment
105+
distinct_id: ${{ inputs.distinct_id }}
106+
use_host_env: "false"
107+
container_name: ${{ env.container_name }}
108+
os_id: ${{ matrix.os_id }}
109+
os_version_id: ${{ matrix.os_version_id }}
110+
custom_docker_commands: ""
111+
additional_alpine_apps: "bash curl git"
112+
additional_debian_apps: "bash curl git"
124113

125114
- name: Host - patches ${{ inputs.distinct_id }}
126-
if: env.disable_qt5 != 'yes'
127115
run: mkdir -p ${qbt_build_dir}/patches && cp -r patches/* ${qbt_build_dir}/patches/
128116

129-
- name: Docker - apk update ${{ inputs.distinct_id }}
130-
if: env.disable_qt5 != 'yes'
131-
run: docker exec ${container_name} apk update
132-
133-
- name: Docker - apk install bash ${{ inputs.distinct_id }}
134-
if: env.disable_qt5 != 'yes'
135-
run: docker exec ${container_name} apk add bash
136-
137-
- name: Docker - Bootstrap test tools ${{ inputs.distinct_id }}
138-
if: env.disable_qt5 != 'yes'
139-
run: docker exec ${container_name} bash ${script_name} update install_test
140-
141-
- name: Docker - Bootstrap core deps ${{ inputs.distinct_id }}
142-
if: env.disable_qt5 != 'yes'
143-
run: docker exec ${container_name} bash ${script_name} install_core
117+
- name: Docker - bootstrap_deps ${{ inputs.distinct_id }}
118+
if: inputs.script_name == 'qbt-nox-static.bash'
119+
run: docker exec ${container_name} bash ${script_name} bootstrap_deps
144120

145121
- name: Docker - Bootstrap build ${{ inputs.distinct_id }}
146-
if: env.disable_qt5 != 'yes'
147122
run: docker exec -u gh:gh ${container_name} bash ${script_name} -bs-a
148123

149-
- name: Docker - zlib-ng ${{ inputs.distinct_id }}
150-
if: env.disable_qt5 != 'yes'
124+
- name: Docker - glibc ${{ inputs.distinct_id }}
125+
if : matrix.os_id != 'alpine'
126+
run: docker exec -u gh:gh ${container_name} bash ${script_name} glibc
127+
128+
- name: Docker - zlib ${{ inputs.distinct_id }}
151129
run: docker exec -u gh:gh ${container_name} bash ${script_name} zlib
152130

153131
- name: Docker - iconv ${{ inputs.distinct_id }}
154-
if: env.disable_qt5 != 'yes'
132+
if: matrix.qbt_libtorrent_version == '1.2'
155133
run: docker exec -u gh:gh ${container_name} bash ${script_name} iconv
156134

157135
- name: Docker - icu ${{ inputs.distinct_id }}
158-
if: env.disable_qt5 != 'yes'
136+
if: env.set_skip_icu == 'no'
159137
run: docker exec -u gh:gh ${container_name} bash ${script_name} icu
160138

161139
- name: Docker - openssl ${{ inputs.distinct_id }}
162-
if: env.disable_qt5 != 'yes'
163140
run: docker exec -u gh:gh ${container_name} bash ${script_name} openssl
164141

165142
- name: Docker - boost ${{ inputs.distinct_id }}
166-
if: env.disable_qt5 != 'yes'
167143
run: docker exec -u gh:gh ${container_name} bash ${script_name} boost
168144

169145
- name: Docker - libtorrent ${{ inputs.distinct_id }}
170-
if: env.disable_qt5 != 'yes'
171146
run: docker exec -u gh:gh ${container_name} bash ${script_name} libtorrent
172147

173148
- name: Docker - double_conversion ${{ inputs.distinct_id }}
174-
if: matrix.qbt_build_tool == '' && env.disable_qt5 != 'yes'
149+
if: matrix.qbt_build_tool == ''
175150
run: docker exec -u gh:gh ${container_name} bash ${script_name} double_conversion
176151

177152
- name: Docker - qtbase ${{ inputs.distinct_id }}
178-
if: env.disable_qt5 != 'yes'
179153
run: docker exec -u gh:gh ${container_name} bash ${script_name} qtbase
180154

181155
- name: Docker - qttools ${{ inputs.distinct_id }}
182-
if: env.disable_qt5 != 'yes'
183156
run: docker exec -u gh:gh ${container_name} bash ${script_name} qttools
184157

185158
- name: Docker - qbittorrent ${{ inputs.distinct_id }}
186-
if: env.disable_qt5 != 'yes'
187159
run: docker exec -u gh:gh ${container_name} bash ${script_name} qbittorrent
188160

189161
- name: Docker - Set release asset name ${{ inputs.distinct_id }}
190-
if: env.disable_qt5 != 'yes'
191162
run: docker exec -u gh:gh -w /home/gh/${{ env.qbt_build_dir }}/completed ${container_name} mv -f qbittorrent-nox ${{ matrix.qbt_cross_name }}-${{ matrix.qbt_qt_version_name }}qbittorrent-nox
192163

193164
- name: Generate artifact attestation ${{ inputs.distinct_id }}
194-
if: env.disable_qt5 != 'yes'
195165
uses: actions/attest-build-provenance@v2
196166
with:
197167
subject-path: "${{ env.qbt_build_dir }}/completed/${{ matrix.qbt_cross_name }}-${{ matrix.qbt_qt_version_name }}qbittorrent-nox"
198168

199169
- name: Docker - Release Info ${{ inputs.distinct_id }}
200-
if: env.disable_qt5 != 'yes'
201170
run: docker exec -u gh:gh -w /home/gh/${{ env.qbt_build_dir }}/release_info ${container_name} bash -c 'mv *.md *.json '/home/gh/${{ env.qbt_build_dir }}/completed''
202171

203172
- name: Host - Upload libtorrent-v${{ matrix.qbt_libtorrent_version }}-qbittorrent-nox and release info artifact ${{ inputs.distinct_id }}
204-
if: success() && env.disable_qt5 != 'yes'
173+
if: success()
205174
uses: actions/upload-artifact@v4
206175
with:
207176
name: libtorrent-v${{ matrix.qbt_libtorrent_version }}-${{ matrix.qbt_cross_name }}-${{ matrix.qbt_qt_version_name }}qbittorrent-nox
@@ -210,15 +179,15 @@ jobs:
210179
!${{ env.qbt_build_dir }}/completed/*.png
211180
212181
- name: Host - Upload cmake graphs artifact ${{ inputs.distinct_id }}
213-
if: success() && matrix.qbt_build_tool == '' && env.disable_qt5 != 'yes'
182+
if: success() && matrix.qbt_build_tool == ''
214183
uses: actions/upload-artifact@v4
215184
with:
216185
name: "${{ matrix.qbt_cross_name }}-libtorrent-v${{ matrix.qbt_libtorrent_version }}-graphs"
217186
path: "${{ env.qbt_build_dir }}/completed/*.png"
218187

219-
- name: Host - Upload logs on error
220-
if: failure() && env.disable_qt5 != 'yes'
221-
uses: actions/upload-artifact@v4
222-
with:
223-
name: "${{ matrix.qbt_cross_name }}-libtorrent-v${{ matrix.qbt_libtorrent_version }}-logs"
224-
path: "${{ env.qbt_build_dir }}/logs/*"
188+
# - name: Host - Upload build dir on error or cancel
189+
# if: ( cancelled() || failure() )
190+
# uses: actions/upload-artifact@v4
191+
# with:
192+
# name: "${{ matrix.qbt_cross_name }}-libtorrent-v${{ matrix.qbt_libtorrent_version }}-logs"
193+
# path: "${{ env.qbt_build_dir }}"

0 commit comments

Comments
 (0)