@@ -22,34 +22,24 @@ jobs:
2222 - uses : dtolnay/rust-toolchain@stable
2323 with :
2424 targets : aarch64-apple-darwin
25- - name : Build wheels - x86_64
26- uses : PyO3/maturin-action@v1
27- with :
28- target : x86_64-apple-darwin
29- args : --release --out dist --strip
30- sccache : ' true'
31- - name : Install built wheel - x86_64
32- run : |
33- pip install aliyundrive-webdav --no-index --find-links dist --force-reinstall
34- aliyundrive-webdav --help
3525 - name : Build wheels - universal2
3626 uses : PyO3/maturin-action@v1
3727 with :
3828 target : universal2-apple-darwin
3929 args : --release --out dist --strip
4030 sccache : ' true'
41- - name : Install built wheel - universal2
31+ - name : Install built wheel
4232 run : |
4333 pip install aliyundrive-webdav --no-index --find-links dist --force-reinstall
4434 aliyundrive-webdav --help
4535 - name : Upload wheels
46- uses : actions/upload-artifact@v3
36+ uses : actions/upload-artifact@v4
4737 with :
48- name : wheels
38+ name : macos- wheels
4939 path : dist
5040 if-no-files-found : error
5141 - name : Upload binary artifacts
52- uses : actions/upload-artifact@v3
42+ uses : actions/upload-artifact@v4
5343 with :
5444 name : apple-darwin-bin
5545 path : target/release/aliyundrive-webdav
@@ -99,27 +89,27 @@ jobs:
9989 uses : PyO3/maturin-action@v1
10090 with :
10191 target : ${{ matrix.platform.target }}
102- args : --release --out dist --strip
92+ args : --release --out dist-${{ matrix.platform.arch }} --strip
10393 - name : Build wheels
10494 if : matrix.platform.arch == 'arm64'
10595 uses : PyO3/maturin-action@v1
10696 with :
10797 target : ${{ matrix.platform.target }}
108- args : --release --out dist --strip --no-default-features --features atomic64,native-tls
98+ args : --release --out dist-${{ matrix.platform.arch }} --strip --no-default-features --features atomic64,native-tls
10999 sccache : ' true'
110100 - name : Install built wheel
111101 if : matrix.platform.arch != 'arm64'
112102 run : |
113- pip install aliyundrive-webdav --no-index --find-links dist --force-reinstall
103+ pip install aliyundrive-webdav --no-index --find-links dist-${{ matrix.platform.arch }} --force-reinstall
114104 aliyundrive-webdav --help
115105 - name : Upload wheels
116- uses : actions/upload-artifact@v3
106+ uses : actions/upload-artifact@v4
117107 with :
118- name : wheels
119- path : dist
108+ name : windows-${{ matrix.platform.arch }}- wheels
109+ path : dist-${{ matrix.platform.arch }}
120110 if-no-files-found : error
121111 - name : Upload binary artifacts
122- uses : actions/upload-artifact@v3
112+ uses : actions/upload-artifact@v4
123113 with :
124114 name : windows-${{ matrix.platform.arch }}-bin
125115 path : target/${{ matrix.platform.target }}/release/aliyundrive-webdav.exe
@@ -204,9 +194,9 @@ jobs:
204194 run : cargo generate-rpm --target=${{ matrix.platform.target }} --payload-compress none
205195 - name : Upload wheels
206196 if : matrix.platform.wheel
207- uses : actions/upload-artifact@v3
197+ uses : actions/upload-artifact@v4
208198 with :
209- name : wheels
199+ name : linux-${{ matrix.platform.target }}- wheels
210200 path : dist
211201 if-no-files-found : error
212202 - name : Install upx
@@ -223,21 +213,21 @@ jobs:
223213 - name : Upx compress binary
224214 run : upx target/${{ matrix.platform.target }}/release/aliyundrive-webdav
225215 - name : Upload binary artifacts
226- uses : actions/upload-artifact@v3
216+ uses : actions/upload-artifact@v4
227217 with :
228218 name : ${{ matrix.platform.target }}-bin
229219 path : target/${{ matrix.platform.target }}/release/aliyundrive-webdav
230220 if-no-files-found : error
231221 - name : Upload deb artifacts
232222 if : matrix.platform.deb
233- uses : actions/upload-artifact@v3
223+ uses : actions/upload-artifact@v4
234224 with :
235225 name : ${{ matrix.platform.target }}-deb
236226 path : target/${{ matrix.platform.target }}/debian/aliyundrive-webdav_*.deb
237227 if-no-files-found : error
238228 - name : Upload RPM artifacts
239229 if : matrix.platform.deb
240- uses : actions/upload-artifact@v3
230+ uses : actions/upload-artifact@v4
241231 with :
242232 name : ${{ matrix.platform.target }}-rpm
243233 path : target/${{ matrix.platform.target }}/generate-rpm/aliyundrive-webdav*.rpm
@@ -277,10 +267,13 @@ jobs:
277267 platform :
278268 - target : " armv5te-unknown-linux-musleabi"
279269 cargo_extra_args : --no-default-features --features rustls-tls
270+ rustflags : -C target-feature=+crt-static -C link-arg=-s -C lto=no -C link-arg=-lgcc
280271 - target : " mips-unknown-linux-musl"
281272 cargo_extra_args : --no-default-features --features native-tls-vendored
273+ rustflags : -C target-feature=+crt-static -C link-arg=-s -C lto=no
282274 - target : " mipsel-unknown-linux-musl"
283275 cargo_extra_args : --no-default-features --features native-tls-vendored
276+ rustflags : -C target-feature=+crt-static -C link-arg=-s -C lto=no
284277 container :
285278 image : docker://ghcr.io/rust-cross/rust-musl-cross:${{ matrix.platform.target }}
286279 steps :
@@ -291,7 +284,8 @@ jobs:
291284 key : ${{ matrix.platform.target }}
292285 - name : Build
293286 env :
294- RUSTFLAGS : -C target-feature=+crt-static -C link-arg=-s
287+ RUSTFLAGS : ${{ matrix.platform.rustflags }}
288+ CARGO_PROFILE_RELEASE_LTO : " off"
295289 run : |
296290 cargo build --release --target ${{ matrix.platform.target }} ${{ matrix.platform.cargo_extra_args }}
297291 - name : Upx compress binary
@@ -300,7 +294,7 @@ jobs:
300294 version : v3.95 # v3.96 breaks mipsel, https://github.com/upx/upx/issues/504
301295 files : target/${{ matrix.platform.target }}/release/aliyundrive-webdav
302296 - name : Upload binary artifacts
303- uses : actions/upload-artifact@v3
297+ uses : actions/upload-artifact@v4
304298 with :
305299 name : ${{ matrix.platform.target }}-bin
306300 path : target/${{ matrix.platform.target }}/release/aliyundrive-webdav
@@ -327,7 +321,7 @@ jobs:
327321
328322 openwrt :
329323 name : OpenWrt Package - ${{ matrix.target.arch }}
330- runs-on : ubuntu-20 .04
324+ runs-on : ubuntu-22 .04
331325 needs : [ linux, linux-others ]
332326 environment : OpenWrt
333327 strategy :
@@ -355,7 +349,7 @@ jobs:
355349 - arch : " mipsel_24kc"
356350 sdk : " https://downloads.openwrt.org/releases/22.03.2/targets/ramips/mt7621/openwrt-sdk-22.03.2-ramips-mt7621_gcc-11.2.0_musl.Linux-x86_64.tar.xz"
357351 - arch : " mips_24kc"
358- sdk : " https://archive .openwrt.org/releases/19.07.7 /targets/ar71xx/nand /openwrt-sdk-19.07.7-ar71xx-nand_gcc-7.5 .0_musl.Linux-x86_64.tar.xz"
352+ sdk : " https://downloads .openwrt.org/releases/22.03.2 /targets/ath79/generic /openwrt-sdk-22.03.2-ath79-generic_gcc-11.2 .0_musl.Linux-x86_64.tar.xz"
359353 steps :
360354 - uses : actions/checkout@v3
361355 - name : Install build requirements
@@ -382,26 +376,28 @@ jobs:
382376 ' >> openwrt-sdk/.config
383377 cd openwrt-sdk
384378 cat feeds.conf.default >> feeds.conf
379+ sed -i 's|git.openwrt.org/project/luci.git|github.com/openwrt/luci.git|' feeds.conf
380+ sed -i 's|git.openwrt.org/feed/|github.com/openwrt/|' feeds.conf
385381 cat feeds.conf
386382
387- ./scripts/feeds update -a > /dev/null
388- make defconfig
383+ for i in 1 2 3; do ./scripts/feeds update -a && break || sleep 5; done
384+ make defconfig FORCE=1
389385
390386 ./scripts/feeds install -d y -f -a
391- make package/aliyundrive-webdav/compile V=s
392- make package/luci-app-aliyundrive-webdav/compile V=s
387+ make package/aliyundrive-webdav/compile V=s FORCE=1
388+ make package/luci-app-aliyundrive-webdav/compile V=s FORCE=1
393389 tree bin/packages/
394390 - name : Archive package
395- uses : actions/upload-artifact@v3
391+ uses : actions/upload-artifact@v4
396392 with :
397393 name : aliyundrive-webdav-openwrt-${{ matrix.target.arch }}
398394 path : openwrt-sdk/bin/packages/*/aliyundrive/aliyundrive-webdav*.ipk
399395 if-no-files-found : error
400396 - name : Archive luci packages
401- uses : actions/upload-artifact@v3
397+ uses : actions/upload-artifact@v4
402398 if : ${{ matrix.target.arch == 'aarch64_generic' }}
403399 with :
404- name : aliyundrive-webdav-openwrt-${{ matrix.target.arch }}
400+ name : aliyundrive-webdav-openwrt-${{ matrix.target.arch }}-luci
405401 path : openwrt-sdk/bin/packages/*/aliyundrive/luci-*.ipk
406402 if-no-files-found : error
407403 - name : Upload package to GitHub Release
@@ -423,7 +419,7 @@ jobs:
423419
424420 openwrt-gl-inet :
425421 name : OpenWrt Package - ${{ matrix.target.arch }}
426- runs-on : ubuntu-latest
422+ runs-on : ubuntu-22.04
427423 needs : [ linux, linux-others ]
428424 environment : OpenWrt
429425 strategy :
@@ -459,16 +455,18 @@ jobs:
459455 CONFIG_PACKAGE_luci-app-aliyundrive-webdav=y
460456 ' >> .config
461457 cp feeds.conf.default feeds.conf
458+ sed -i 's|git.openwrt.org/project/luci.git|github.com/openwrt/luci.git|' feeds.conf
459+ sed -i 's|git.openwrt.org/feed/|github.com/openwrt/|' feeds.conf
462460 cat feeds.conf
463461
464- ./scripts/feeds update -a > /dev/null
465- make defconfig
462+ for i in 1 2 3; do ./scripts/feeds update -a && break || sleep 5; done
463+ make defconfig FORCE=1
466464
467465 ./scripts/feeds install -d y -f -a
468- make package/aliyundrive-webdav/compile V=s
466+ make package/aliyundrive-webdav/compile V=s FORCE=1
469467 tree bin/packages/
470468 - name : Archive package
471- uses : actions/upload-artifact@v3
469+ uses : actions/upload-artifact@v4
472470 with :
473471 name : aliyundrive-webdav-openwrt-${{ matrix.target.arch }}
474472 path : openwrt-sdk/${{ matrix.target.path }}/bin/packages/*/base/aliyundrive-webdav*.ipk
@@ -489,31 +487,31 @@ jobs:
489487 environment : Docker Hub
490488 steps :
491489 - uses : actions/checkout@v3
492- - uses : actions/download-artifact@v3
490+ - uses : actions/download-artifact@v4
493491 with :
494492 name : x86_64-unknown-linux-musl-bin
495493 - run : |
496494 chmod a+x aliyundrive-webdav
497495 mv aliyundrive-webdav aliyundrive-webdav-amd64
498- - uses : actions/download-artifact@v3
496+ - uses : actions/download-artifact@v4
499497 with :
500498 name : i686-unknown-linux-musl-bin
501499 - run : |
502500 chmod a+x aliyundrive-webdav
503501 mv aliyundrive-webdav aliyundrive-webdav-386
504- - uses : actions/download-artifact@v3
502+ - uses : actions/download-artifact@v4
505503 with :
506504 name : aarch64-unknown-linux-musl-bin
507505 - run : |
508506 chmod a+x aliyundrive-webdav
509507 mv aliyundrive-webdav aliyundrive-webdav-arm64
510- - uses : actions/download-artifact@v3
508+ - uses : actions/download-artifact@v4
511509 with :
512510 name : armv7-unknown-linux-musleabihf-bin
513511 - run : |
514512 chmod a+x aliyundrive-webdav
515513 mv aliyundrive-webdav aliyundrive-webdav-armv7
516- - uses : actions/download-artifact@v3
514+ - uses : actions/download-artifact@v4
517515 with :
518516 name : arm-unknown-linux-musleabihf-bin
519517 - run : |
@@ -574,11 +572,28 @@ jobs:
574572 name : PyPI
575573 url : https://pypi.org/project/aliyundrive-webdav/
576574 if : " startsWith(github.ref, 'refs/tags/')"
577- needs : [ linux, macos ]
575+ needs : [ linux, macos, windows ]
578576 steps :
579- - uses : actions/download-artifact@v3
577+ - uses : actions/download-artifact@v4
578+ with :
579+ name : macos-wheels
580+ - uses : actions/download-artifact@v4
581+ with :
582+ name : linux-wheels
583+ continue-on-error : true
584+ - uses : actions/download-artifact@v4
585+ with :
586+ pattern : linux-*-wheels
587+ merge-multiple : true
588+ - uses : actions/download-artifact@v4
589+ with :
590+ name : windows-x64-wheels
591+ - uses : actions/download-artifact@v4
592+ with :
593+ name : windows-x86-wheels
594+ - uses : actions/download-artifact@v4
580595 with :
581- name : wheels
596+ name : windows-arm64- wheels
582597 - uses : actions/setup-python@v4
583598 with :
584599 python-version : 3.9
0 commit comments