@@ -32,13 +32,11 @@ jobs:
3232 matrix :
3333 os_id : [alpine]
3434 os_version_id : [edge]
35- qbt_cross_name : ["armhf", "armv7", "aarch64", "riscv64", "x86_64", "x86"]
35+ qbt_cross_name :
36+ ["armhf", "armv7", "aarch64", "riscv64", "x86_64", "x86"]
3637 qbt_libtorrent_version : ["1.2", "2.0"]
37- qbt_build_tool : ["", "qmake" ]
38+ qbt_build_tool : [""]
3839 include :
39- - qbt_build_tool : " qmake"
40- qbt_qt_version_name : " qt5-"
41- qbt_qt_version : " 5"
4240 - qbt_build_tool : " "
4341 qbt_qt_version_name : " "
4442 qbt_qt_version : " 6"
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,31 +62,32 @@ 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
8692 # - name: Host - Github env to container ${{ inputs.distinct_id }}
8793 # run: env >> env.custom
@@ -97,22 +103,18 @@ jobs:
97103 fi
98104
99105 - name : Host - phased updates ${{ inputs.distinct_id }}
100- if : env.disable_qt5 != 'yes'
101106 run : printf '%s\n' 'APT::Get::Always-Include-Phased-Updates "false";' | sudo tee /etc/apt/apt.conf.d/99-phased-updates
102107
103108 - name : Host - update ${{ inputs.distinct_id }}
104- if : env.disable_qt5 != 'yes'
105109 run : sudo apt-get update
106110
107111 # - name: Host - upgrade ${{ inputs.distinct_id }}
108112 # run: sudo apt-get -y upgrade
109113
110114 - 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
115+ run : sudo apt install qemu-user-static binfmt-support
113116
114117 - name : Host - Create docker ${{ env.multiarch }} container ${{ inputs.distinct_id }}
115- if : env.disable_qt5 != 'yes'
116118 run : |
117119 # 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
118120 # This way we can run commands as a non-root user, avoiding permission issues on host runner. Switching between user and root as needed.
@@ -123,85 +125,66 @@ jobs:
123125 docker exec ${container_name} sh -c 'printf "%s" "gh ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/gh'
124126
125127 - name : Host - patches ${{ inputs.distinct_id }}
126- if : env.disable_qt5 != 'yes'
127128 run : mkdir -p ${qbt_build_dir}/patches && cp -r patches/* ${qbt_build_dir}/patches/
128129
129130 - name : Docker - apk update ${{ inputs.distinct_id }}
130- if : env.disable_qt5 != 'yes'
131131 run : docker exec ${container_name} apk update
132132
133133 - name : Docker - apk install bash ${{ inputs.distinct_id }}
134- if : env.disable_qt5 != 'yes'
135134 run : docker exec ${container_name} apk add bash
136135
137136 - 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
137+ run : docker exec ${container_name} bash ${script_name} bootstrap_deps
144138
145139 - name : Docker - Bootstrap build ${{ inputs.distinct_id }}
146- if : env.disable_qt5 != 'yes'
147140 run : docker exec -u gh:gh ${container_name} bash ${script_name} -bs-a
148141
149142 - name : Docker - zlib-ng ${{ inputs.distinct_id }}
150- if : env.disable_qt5 != 'yes'
151143 run : docker exec -u gh:gh ${container_name} bash ${script_name} zlib
152144
153145 - name : Docker - iconv ${{ inputs.distinct_id }}
154- if : env.disable_qt5 != 'yes '
146+ if : matrix.qbt_libtorrent_version == '1.2 '
155147 run : docker exec -u gh:gh ${container_name} bash ${script_name} iconv
156148
157149 - name : Docker - icu ${{ inputs.distinct_id }}
158- if : env.disable_qt5 != 'yes '
150+ if : env.set_skip_icu == 'no '
159151 run : docker exec -u gh:gh ${container_name} bash ${script_name} icu
160152
161153 - name : Docker - openssl ${{ inputs.distinct_id }}
162- if : env.disable_qt5 != 'yes'
163154 run : docker exec -u gh:gh ${container_name} bash ${script_name} openssl
164155
165156 - name : Docker - boost ${{ inputs.distinct_id }}
166- if : env.disable_qt5 != 'yes'
167157 run : docker exec -u gh:gh ${container_name} bash ${script_name} boost
168158
169159 - name : Docker - libtorrent ${{ inputs.distinct_id }}
170- if : env.disable_qt5 != 'yes'
171160 run : docker exec -u gh:gh ${container_name} bash ${script_name} libtorrent
172161
173162 - name : Docker - double_conversion ${{ inputs.distinct_id }}
174- if : matrix.qbt_build_tool == '' && env.disable_qt5 != 'yes'
163+ if : matrix.qbt_build_tool == ''
175164 run : docker exec -u gh:gh ${container_name} bash ${script_name} double_conversion
176165
177166 - name : Docker - qtbase ${{ inputs.distinct_id }}
178- if : env.disable_qt5 != 'yes'
179167 run : docker exec -u gh:gh ${container_name} bash ${script_name} qtbase
180168
181169 - name : Docker - qttools ${{ inputs.distinct_id }}
182- if : env.disable_qt5 != 'yes'
183170 run : docker exec -u gh:gh ${container_name} bash ${script_name} qttools
184171
185172 - name : Docker - qbittorrent ${{ inputs.distinct_id }}
186- if : env.disable_qt5 != 'yes'
187173 run : docker exec -u gh:gh ${container_name} bash ${script_name} qbittorrent
188174
189175 - name : Docker - Set release asset name ${{ inputs.distinct_id }}
190- if : env.disable_qt5 != 'yes'
191176 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
192177
193178 - name : Generate artifact attestation ${{ inputs.distinct_id }}
194- if : env.disable_qt5 != 'yes'
195179 uses : actions/attest-build-provenance@v2
196180 with :
197181 subject-path : " ${{ env.qbt_build_dir }}/completed/${{ matrix.qbt_cross_name }}-${{ matrix.qbt_qt_version_name }}qbittorrent-nox"
198182
199183 - name : Docker - Release Info ${{ inputs.distinct_id }}
200- if : env.disable_qt5 != 'yes'
201184 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''
202185
203186 - 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'
187+ if : success()
205188 uses : actions/upload-artifact@v4
206189 with :
207190 name : libtorrent-v${{ matrix.qbt_libtorrent_version }}-${{ matrix.qbt_cross_name }}-${{ matrix.qbt_qt_version_name }}qbittorrent-nox
@@ -210,15 +193,15 @@ jobs:
210193 !${{ env.qbt_build_dir }}/completed/*.png
211194
212195 - name : Host - Upload cmake graphs artifact ${{ inputs.distinct_id }}
213- if : success() && matrix.qbt_build_tool == '' && env.disable_qt5 != 'yes'
196+ if : success() && matrix.qbt_build_tool == ''
214197 uses : actions/upload-artifact@v4
215198 with :
216199 name : " ${{ matrix.qbt_cross_name }}-libtorrent-v${{ matrix.qbt_libtorrent_version }}-graphs"
217200 path : " ${{ env.qbt_build_dir }}/completed/*.png"
218201
219- - name : Host - Upload logs on error
220- if : failure() && env.disable_qt5 != 'yes'
202+ - name : Host - Upload build dir on error or cancel
203+ if : ( cancelled() || failure() )
221204 uses : actions/upload-artifact@v4
222205 with :
223206 name : " ${{ matrix.qbt_cross_name }}-libtorrent-v${{ matrix.qbt_libtorrent_version }}-logs"
224- path : " ${{ env.qbt_build_dir }}/logs/* "
207+ path : " ${{ env.qbt_build_dir }}"
0 commit comments