From 3565a9e0af424dc24eacd360b871d441cd7905ea Mon Sep 17 00:00:00 2001 From: messense Date: Tue, 20 Sep 2022 12:25:09 +0800 Subject: [PATCH 01/11] Update GCC to 11.2.0, align musl version with Rust --- Dockerfile | 7 ++----- build-std.sh | 4 ++-- config.mak | 9 +++++++-- config.mak.32 | 2 +- 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index e6dcd99..ce70655 100644 --- a/Dockerfile +++ b/Dockerfile @@ -36,14 +36,11 @@ RUN update-ca-certificates ARG TARGET=x86_64-unknown-linux-musl ENV RUST_MUSL_CROSS_TARGET=$TARGET -ARG RUST_MUSL_MAKE_VER=0.9.9 ARG RUST_MUSL_MAKE_CONFIG=config.mak COPY $RUST_MUSL_MAKE_CONFIG /tmp/config.mak -RUN cd /tmp && curl -Lsq -o musl-cross-make.zip https://github.com/richfelker/musl-cross-make/archive/v$RUST_MUSL_MAKE_VER.zip && \ - unzip -q musl-cross-make.zip && \ - rm musl-cross-make.zip && \ - mv musl-cross-make-$RUST_MUSL_MAKE_VER musl-cross-make && \ +RUN cd /tmp && \ + git clone --depth 1 https://github.com/richfelker/musl-cross-make.git && \ cp /tmp/config.mak /tmp/musl-cross-make/config.mak && \ cd /tmp/musl-cross-make && \ export TARGET=$TARGET && \ diff --git a/build-std.sh b/build-std.sh index 72251ec..b53815c 100755 --- a/build-std.sh +++ b/build-std.sh @@ -16,11 +16,11 @@ then cd custom-std cp /tmp/Xargo.toml . rustc -Z unstable-options --print target-spec-json --target "$TARGET" | tee "$TARGET.json" - RUSTFLAGS="-L/usr/local/musl/$TARGET/lib -L/usr/local/musl/lib/gcc/$TARGET/9.2.0/" xargo build --target "$TARGET" + RUSTFLAGS="-L/usr/local/musl/$TARGET/lib -L/usr/local/musl/lib/gcc/$TARGET/11.2.0/" xargo build --target "$TARGET" cp -r "/root/.xargo/lib/rustlib/$TARGET" "/root/.rustup/toolchains/$TOOLCHAIN-$HOST/lib/rustlib/" mkdir "/root/.rustup/toolchains/$TOOLCHAIN-$HOST/lib/rustlib/$TARGET/lib/self-contained" cp /usr/local/musl/"$TARGET"/lib/*.o "/root/.rustup/toolchains/$TOOLCHAIN-$HOST/lib/rustlib/$TARGET/lib/self-contained/" - cp /usr/local/musl/lib/gcc/"$TARGET"/9.2.0/c*.o "/root/.rustup/toolchains/$TOOLCHAIN-$HOST/lib/rustlib/$TARGET/lib/self-contained/" + cp /usr/local/musl/lib/gcc/"$TARGET"/11.2.0/c*.o "/root/.rustup/toolchains/$TOOLCHAIN-$HOST/lib/rustlib/$TARGET/lib/self-contained/" cd .. rm -rf /root/.xargo /root/.cargo/registry /root/.cargo/git custom-std diff --git a/config.mak b/config.mak index 2c8356a..cde1957 100644 --- a/config.mak +++ b/config.mak @@ -16,8 +16,13 @@ OUTPUT = /usr/local/musl # headers, which are not needed unless compiling programs that use them. # BINUTILS_VER = -# GCC_VER = -# MUSL_VER = +GCC_VER = 11.2.0 + +# https://github.com/rust-embedded/cross/issues/478 +# https://github.com/rust-lang/libc/issues/1848 + +MUSL_VER = 1.1.24 + # GMP_VER = # MPC_VER = # MPFR_VER = diff --git a/config.mak.32 b/config.mak.32 index eaa2e32..cde1957 100644 --- a/config.mak.32 +++ b/config.mak.32 @@ -16,7 +16,7 @@ OUTPUT = /usr/local/musl # headers, which are not needed unless compiling programs that use them. # BINUTILS_VER = -# GCC_VER = +GCC_VER = 11.2.0 # https://github.com/rust-embedded/cross/issues/478 # https://github.com/rust-lang/libc/issues/1848 From e57aa6581b6e3913bddc870c4ecca3fb360e566e Mon Sep 17 00:00:00 2001 From: messense Date: Tue, 20 Sep 2022 13:08:39 +0800 Subject: [PATCH 02/11] Use file context for docker-build-push action --- .github/workflows/Build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml index 9baf1ed..fa783f4 100644 --- a/.github/workflows/Build.yml +++ b/.github/workflows/Build.yml @@ -230,6 +230,7 @@ jobs: TOOLCHAIN=${{ github.event.inputs.toolchain || matrix.env.TOOLCHAIN }} tags: ghcr.io/${{ github.repository_owner }}/rust-musl-cross:${{ matrix.env.IMAGE_TAG }}-${{ matrix.os.arch }} no-cache: ${{ github.event.inputs.no_cache == 'yes' }} + context: . load: true cache-from: type=gha cache-to: type=gha,mode=max From c3625dc46cda4cac6acd1ae5db281cb65e799667 Mon Sep 17 00:00:00 2001 From: messense Date: Tue, 20 Sep 2022 13:32:20 +0800 Subject: [PATCH 03/11] Add `CI-no-fail-fast` label support --- .github/workflows/Build.yml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml index fa783f4..3592e87 100644 --- a/.github/workflows/Build.yml +++ b/.github/workflows/Build.yml @@ -28,6 +28,7 @@ jobs: arch: ${{ steps.generate-matrix.outputs.arch }} target: ${{ steps.generate-matrix.outputs.target }} run-build: ${{ steps.generate-matrix.outputs.run-build }} + fail-fast: ${{ steps.generate-matrix.outputs.fail-fast }} steps: - uses: actions/setup-node@v2 with: @@ -107,6 +108,20 @@ jobs: core.setOutput('target', JSON.stringify(targetMatrix)) core.setOutput('run-build', 'false') } + + const matches = commitMessage.match(/(Try|Merge) #([0-9]+):/) + if (matches) { + const prNumber = matches[2] + const { data: { labels: labels } } = await github.rest.pulls.get({ + owner: context.repo.owner, + repo: context.repo.repo, + pull_number: prNumber + }) + const labelNames = labels.map(label => label.name) + if (labelNames.includes('CI-no-fail-fast')) { + core.setOutput('fail-fast', 'false') + } + } } else { core.setOutput('arch', JSON.stringify(archMatrix)) core.setOutput('target', JSON.stringify(targetMatrix)) @@ -116,7 +131,8 @@ jobs: run: | echo '${{ toJson(steps.generate-matrix.outputs.arch) }}' echo '${{ toJson(steps.generate-matrix.outputs.target) }}' - echo Run build: ${{ steps.generate-matrix.outputs.run-build || 'true' }} + echo run build: ${{ steps.generate-matrix.outputs.run-build || 'true' }} + echo fail fast: ${{ steps.generate-matrix.outputs.fail-fast || 'true' }} env: COMMIT_MESSAGE: > ${{ @@ -198,6 +214,7 @@ jobs: if: ${{ needs.setup.outputs.run-build != 'false' }} needs: setup strategy: + fail-fast: ${{ needs.setup.outputs.fail-fast != 'false' }} matrix: os: ${{ fromJson(needs.setup.outputs.arch) }} env: ${{ fromJson(needs.setup.outputs.target) }} From e736202e6cab130af5bfa4634079d62482eb8e10 Mon Sep 17 00:00:00 2001 From: messense Date: Tue, 20 Sep 2022 14:51:34 +0800 Subject: [PATCH 04/11] Use GCC 9.2.0 for aarch64 musl target --- .github/workflows/Build.yml | 2 +- config.mak.aarch64 | 63 +++++++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 config.mak.aarch64 diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml index 3592e87..f9b75bf 100644 --- a/.github/workflows/Build.yml +++ b/.github/workflows/Build.yml @@ -149,7 +149,7 @@ jobs: TARGET_MATRIX: | - IMAGE_TAG: aarch64-musl TARGET: aarch64-unknown-linux-musl - RUST_MUSL_MAKE_CONFIG: config.mak + RUST_MUSL_MAKE_CONFIG: config.mak.aarch64 TOOLCHAIN: stable - IMAGE_TAG: arm-musleabi TARGET: arm-unknown-linux-musleabi diff --git a/config.mak.aarch64 b/config.mak.aarch64 new file mode 100644 index 0000000..9d7ee03 --- /dev/null +++ b/config.mak.aarch64 @@ -0,0 +1,63 @@ +# By default, cross compilers are installed to ./output under the top-level +# musl-cross-make directory and can later be moved wherever you want them. +# To install directly to a specific location, set it here. Multiple targets +# can safely be installed in the same location. Some examples: + +OUTPUT = /usr/local/musl + +# By default, latest supported release versions of musl and the toolchain +# components are used. You can override those here, but the version selected +# must be supported (under hashes/ and patches/) to work. For musl, you +# can use "git-refname" (e.g. git-master) instead of a release. Setting a +# blank version for gmp, mpc, mpfr and isl will suppress download and +# in-tree build of these libraries and instead depend on pre-installed +# libraries when available (isl is optional and not set by default). +# Setting a blank version for linux will suppress installation of kernel +# headers, which are not needed unless compiling programs that use them. + +# BINUTILS_VER = + +# undefined reference to `getauxval' on GCC 11.2.0 +# https://github.com/messense/rust-musl-cross/pull/67#issuecomment-1251905512 +GCC_VER = 9.2.0 + +# https://github.com/rust-embedded/cross/issues/478 +# https://github.com/rust-lang/libc/issues/1848 + +MUSL_VER = 1.1.24 + +# GMP_VER = +# MPC_VER = +# MPFR_VER = +# ISL_VER = +# LINUX_VER = + +# By default source archives are downloaded with wget. curl is also an option. + +# DL_CMD = wget -c -O +DL_CMD = curl -C - -L -o + +# Something like the following can be used to produce a static-linked +# toolchain that's deployable to any system with matching arch, using +# an existing musl-targeted cross compiler. This only # works if the +# system you build on can natively (or via binfmt_misc and # qemu) run +# binaries produced by the existing toolchain (in this example, i486). + +# COMMON_CONFIG += CC="i486-linux-musl-gcc -static --static" CXX="i486-linux-musl-g++ -static --static" + +# Recommended options for smaller build for deploying binaries: + +COMMON_CONFIG += CFLAGS="-g0 -Os" CXXFLAGS="-g0 -Os" LDFLAGS="-s" + +# Recommended options for faster/simpler build: + +COMMON_CONFIG += --disable-nls +GCC_CONFIG += --enable-languages=c,c++ +GCC_CONFIG += --disable-libquadmath --disable-decimal-float +GCC_CONFIG += --disable-multilib + +# You can keep the local build path out of your toolchain binaries and +# target libraries with the following, but then gdb needs to be told +# where to look for source files. + +COMMON_CONFIG += --with-debug-prefix-map=$(CURDIR)= From 150b0b225dc4437e509f7ccb63e848e8df6538d5 Mon Sep 17 00:00:00 2001 From: messense Date: Tue, 20 Sep 2022 15:05:27 +0800 Subject: [PATCH 05/11] Use `docker/login-action@v2` --- .github/workflows/Build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml index f9b75bf..765e8fa 100644 --- a/.github/workflows/Build.yml +++ b/.github/workflows/Build.yml @@ -227,7 +227,7 @@ jobs: uses: docker/setup-buildx-action@v1 - name: Login to DockerHub if: ${{ github.repository_owner == 'messense' }} - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_TOKEN }} From d05bd65b41ff0431b77b9ece294f37aed66d116a Mon Sep 17 00:00:00 2001 From: messense Date: Tue, 20 Sep 2022 15:56:17 +0800 Subject: [PATCH 06/11] -Wno-format-diag -Wno-format-security --- config.mak | 2 +- config.mak.32 | 2 +- config.mak.aarch64 | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config.mak b/config.mak index cde1957..c8c9f3e 100644 --- a/config.mak +++ b/config.mak @@ -44,7 +44,7 @@ DL_CMD = curl -C - -L -o # Recommended options for smaller build for deploying binaries: -COMMON_CONFIG += CFLAGS="-g0 -Os" CXXFLAGS="-g0 -Os" LDFLAGS="-s" +COMMON_CONFIG += CFLAGS="-g0 -Os -Wno-format-diag -Wno-format-security" CXXFLAGS="-g0 -Os -Wno-format-diag -Wno-format-security" LDFLAGS="-s" # Recommended options for faster/simpler build: diff --git a/config.mak.32 b/config.mak.32 index cde1957..c8c9f3e 100644 --- a/config.mak.32 +++ b/config.mak.32 @@ -44,7 +44,7 @@ DL_CMD = curl -C - -L -o # Recommended options for smaller build for deploying binaries: -COMMON_CONFIG += CFLAGS="-g0 -Os" CXXFLAGS="-g0 -Os" LDFLAGS="-s" +COMMON_CONFIG += CFLAGS="-g0 -Os -Wno-format-diag -Wno-format-security" CXXFLAGS="-g0 -Os -Wno-format-diag -Wno-format-security" LDFLAGS="-s" # Recommended options for faster/simpler build: diff --git a/config.mak.aarch64 b/config.mak.aarch64 index 9d7ee03..421e246 100644 --- a/config.mak.aarch64 +++ b/config.mak.aarch64 @@ -47,7 +47,7 @@ DL_CMD = curl -C - -L -o # Recommended options for smaller build for deploying binaries: -COMMON_CONFIG += CFLAGS="-g0 -Os" CXXFLAGS="-g0 -Os" LDFLAGS="-s" +COMMON_CONFIG += CFLAGS="-g0 -Os -Wno-format-diag -Wno-format-security" CXXFLAGS="-g0 -Os -Wno-format-diag -Wno-format-security" LDFLAGS="-s" # Recommended options for faster/simpler build: From 1dcb4e3f56d8817ed024afe81abb2931c4b4c719 Mon Sep 17 00:00:00 2001 From: messense Date: Tue, 20 Sep 2022 21:12:49 +0800 Subject: [PATCH 07/11] Add variant to docker manifest --- .github/workflows/Build.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml index 765e8fa..57405de 100644 --- a/.github/workflows/Build.yml +++ b/.github/workflows/Build.yml @@ -287,7 +287,8 @@ jobs: if docker manifest inspect ghcr.io/${{ github.repository_owner }}/rust-musl-cross:$IMAGE_TAG-armv7 > /dev/null; then echo " - image: ghcr.io/${{ github.repository_owner }}/rust-musl-cross:$IMAGE_TAG-armv7 platform: - architecture: arm/v7 + architecture: arm + variant: v7 os: linux" >> ghcr-manifest.yaml fi @@ -327,7 +328,8 @@ jobs: skopeo copy docker://ghcr.io/${{ github.repository_owner }}/rust-musl-cross:$IMAGE_TAG-armv7 docker://${{ github.repository_owner }}/rust-musl-cross:$IMAGE_TAG-armv7 echo " - image: ${{ github.repository_owner }}/rust-musl-cross:$IMAGE_TAG-armv7 platform: - architecture: arm/v7 + architecture: arm + variant: v7 os: linux" >> dockerhub-manifest.yaml fi From 67d7cb13c8fe971787fe216e742477ac4b2a8381 Mon Sep 17 00:00:00 2001 From: messense Date: Tue, 20 Sep 2022 22:28:21 +0800 Subject: [PATCH 08/11] Remove `config.mk.32` and disable all GCC warnings --- .github/workflows/Build.yml | 22 +++++++------- config.mak | 2 +- config.mak.32 | 60 ------------------------------------- config.mak.aarch64 | 2 +- 4 files changed, 13 insertions(+), 73 deletions(-) delete mode 100644 config.mak.32 diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml index 57405de..879ccb6 100644 --- a/.github/workflows/Build.yml +++ b/.github/workflows/Build.yml @@ -153,47 +153,47 @@ jobs: TOOLCHAIN: stable - IMAGE_TAG: arm-musleabi TARGET: arm-unknown-linux-musleabi - RUST_MUSL_MAKE_CONFIG: config.mak.32 + RUST_MUSL_MAKE_CONFIG: config.mak TOOLCHAIN: stable - IMAGE_TAG: arm-musleabihf TARGET: arm-unknown-linux-musleabihf - RUST_MUSL_MAKE_CONFIG: config.mak.32 + RUST_MUSL_MAKE_CONFIG: config.mak TOOLCHAIN: stable - IMAGE_TAG: armv5te-musleabi TARGET: armv5te-unknown-linux-musleabi - RUST_MUSL_MAKE_CONFIG: config.mak.32 + RUST_MUSL_MAKE_CONFIG: config.mak TOOLCHAIN: stable - IMAGE_TAG: armv7-musleabi TARGET: armv7-unknown-linux-musleabi - RUST_MUSL_MAKE_CONFIG: config.mak.32 + RUST_MUSL_MAKE_CONFIG: config.mak TOOLCHAIN: stable - IMAGE_TAG: armv7-musleabihf TARGET: armv7-unknown-linux-musleabihf - RUST_MUSL_MAKE_CONFIG: config.mak.32 + RUST_MUSL_MAKE_CONFIG: config.mak TOOLCHAIN: stable - IMAGE_TAG: i586-musl TARGET: i586-unknown-linux-musl - RUST_MUSL_MAKE_CONFIG: config.mak.32 + RUST_MUSL_MAKE_CONFIG: config.mak TOOLCHAIN: stable - IMAGE_TAG: i686-musl TARGET: i686-unknown-linux-musl - RUST_MUSL_MAKE_CONFIG: config.mak.32 + RUST_MUSL_MAKE_CONFIG: config.mak TOOLCHAIN: stable - IMAGE_TAG: mips-musl TARGET: mips-unknown-linux-musl - RUST_MUSL_MAKE_CONFIG: config.mak.32 + RUST_MUSL_MAKE_CONFIG: config.mak TOOLCHAIN: stable - IMAGE_TAG: mips64-muslabi64 TARGET: mips64-unknown-linux-muslabi64 - RUST_MUSL_MAKE_CONFIG: config.mak.32 + RUST_MUSL_MAKE_CONFIG: config.mak TOOLCHAIN: stable - IMAGE_TAG: mips64el-muslabi64 TARGET: mips64el-unknown-linux-muslabi64 - RUST_MUSL_MAKE_CONFIG: config.mak.32 + RUST_MUSL_MAKE_CONFIG: config.mak TOOLCHAIN: stable - IMAGE_TAG: mipsel-musl TARGET: mipsel-unknown-linux-musl - RUST_MUSL_MAKE_CONFIG: config.mak.32 + RUST_MUSL_MAKE_CONFIG: config.mak TOOLCHAIN: stable - IMAGE_TAG: powerpc64le-musl TARGET: powerpc64le-unknown-linux-musl diff --git a/config.mak b/config.mak index c8c9f3e..afcc21f 100644 --- a/config.mak +++ b/config.mak @@ -44,7 +44,7 @@ DL_CMD = curl -C - -L -o # Recommended options for smaller build for deploying binaries: -COMMON_CONFIG += CFLAGS="-g0 -Os -Wno-format-diag -Wno-format-security" CXXFLAGS="-g0 -Os -Wno-format-diag -Wno-format-security" LDFLAGS="-s" +COMMON_CONFIG += CFLAGS="-g0 -Os -w" CXXFLAGS="-g0 -Os -w" LDFLAGS="-s" # Recommended options for faster/simpler build: diff --git a/config.mak.32 b/config.mak.32 deleted file mode 100644 index c8c9f3e..0000000 --- a/config.mak.32 +++ /dev/null @@ -1,60 +0,0 @@ -# By default, cross compilers are installed to ./output under the top-level -# musl-cross-make directory and can later be moved wherever you want them. -# To install directly to a specific location, set it here. Multiple targets -# can safely be installed in the same location. Some examples: - -OUTPUT = /usr/local/musl - -# By default, latest supported release versions of musl and the toolchain -# components are used. You can override those here, but the version selected -# must be supported (under hashes/ and patches/) to work. For musl, you -# can use "git-refname" (e.g. git-master) instead of a release. Setting a -# blank version for gmp, mpc, mpfr and isl will suppress download and -# in-tree build of these libraries and instead depend on pre-installed -# libraries when available (isl is optional and not set by default). -# Setting a blank version for linux will suppress installation of kernel -# headers, which are not needed unless compiling programs that use them. - -# BINUTILS_VER = -GCC_VER = 11.2.0 - -# https://github.com/rust-embedded/cross/issues/478 -# https://github.com/rust-lang/libc/issues/1848 - -MUSL_VER = 1.1.24 - -# GMP_VER = -# MPC_VER = -# MPFR_VER = -# ISL_VER = -# LINUX_VER = - -# By default source archives are downloaded with wget. curl is also an option. - -# DL_CMD = wget -c -O -DL_CMD = curl -C - -L -o - -# Something like the following can be used to produce a static-linked -# toolchain that's deployable to any system with matching arch, using -# an existing musl-targeted cross compiler. This only # works if the -# system you build on can natively (or via binfmt_misc and # qemu) run -# binaries produced by the existing toolchain (in this example, i486). - -# COMMON_CONFIG += CC="i486-linux-musl-gcc -static --static" CXX="i486-linux-musl-g++ -static --static" - -# Recommended options for smaller build for deploying binaries: - -COMMON_CONFIG += CFLAGS="-g0 -Os -Wno-format-diag -Wno-format-security" CXXFLAGS="-g0 -Os -Wno-format-diag -Wno-format-security" LDFLAGS="-s" - -# Recommended options for faster/simpler build: - -COMMON_CONFIG += --disable-nls -GCC_CONFIG += --enable-languages=c,c++ -GCC_CONFIG += --disable-libquadmath --disable-decimal-float -GCC_CONFIG += --disable-multilib - -# You can keep the local build path out of your toolchain binaries and -# target libraries with the following, but then gdb needs to be told -# where to look for source files. - -COMMON_CONFIG += --with-debug-prefix-map=$(CURDIR)= diff --git a/config.mak.aarch64 b/config.mak.aarch64 index 421e246..92f27d5 100644 --- a/config.mak.aarch64 +++ b/config.mak.aarch64 @@ -47,7 +47,7 @@ DL_CMD = curl -C - -L -o # Recommended options for smaller build for deploying binaries: -COMMON_CONFIG += CFLAGS="-g0 -Os -Wno-format-diag -Wno-format-security" CXXFLAGS="-g0 -Os -Wno-format-diag -Wno-format-security" LDFLAGS="-s" +COMMON_CONFIG += CFLAGS="-g0 -Os -w" CXXFLAGS="-g0 -Os -w" LDFLAGS="-s" # Recommended options for faster/simpler build: From 96a39d21f93ce2a38177cbcdea6259666d6c7ff2 Mon Sep 17 00:00:00 2001 From: messense Date: Wed, 21 Sep 2022 13:50:13 +0800 Subject: [PATCH 09/11] docker: switch to registry cache --- .github/workflows/Build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml index 879ccb6..8e62ea3 100644 --- a/.github/workflows/Build.yml +++ b/.github/workflows/Build.yml @@ -249,8 +249,8 @@ jobs: no-cache: ${{ github.event.inputs.no_cache == 'yes' }} context: . load: true - cache-from: type=gha - cache-to: type=gha,mode=max + cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/rust-musl-cross:buildcache-${{ matrix.env.IMAGE_TAG }}-${{ matrix.os.arch }} + cache-to: type=registry,ref=ghcr.io/${{ github.repository_owner }}/rust-musl-cross:buildcache-${{ matrix.env.IMAGE_TAG }}-${{ matrix.os.arch }},mode=max - name: Test Docker cargo build if: ${{ matrix.os.arch == 'amd64' && !startsWith(matrix.env.TARGET, 'armv5te') && !startsWith(matrix.env.TARGET, 's390x') }} run: | From 846fc3d656607c2d6f81e29b29f55b47ea3d2573 Mon Sep 17 00:00:00 2001 From: messense Date: Thu, 22 Sep 2022 09:25:53 +0800 Subject: [PATCH 10/11] CARGO_NET_GIT_FETCH_WITH_CLI=true --- build-std.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build-std.sh b/build-std.sh index b53815c..93c1d3c 100755 --- a/build-std.sh +++ b/build-std.sh @@ -2,6 +2,8 @@ set -e if [[ "$TARGET" = "powerpc64le-unknown-linux-musl" || "$TARGET" = "s390x-unknown-linux-musl" ]] then + export CARGO_NET_GIT_FETCH_WITH_CLI=true + HOST=$(rustc -Vv | grep 'host:' | awk '{print $2}') # patch unwind for s390x if [[ "$TARGET" = "s390x-unknown-linux-musl" ]] From f85c30e5a25f02d6d13d86c32b0b038d96e922e9 Mon Sep 17 00:00:00 2001 From: messense Date: Thu, 22 Sep 2022 15:33:14 +0800 Subject: [PATCH 11/11] export CARGO_UNSTABLE_SPARSE_REGISTRY=true --- build-std.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/build-std.sh b/build-std.sh index 93c1d3c..d06a07d 100755 --- a/build-std.sh +++ b/build-std.sh @@ -3,6 +3,7 @@ set -e if [[ "$TARGET" = "powerpc64le-unknown-linux-musl" || "$TARGET" = "s390x-unknown-linux-musl" ]] then export CARGO_NET_GIT_FETCH_WITH_CLI=true + export CARGO_UNSTABLE_SPARSE_REGISTRY=true HOST=$(rustc -Vv | grep 'host:' | awk '{print $2}') # patch unwind for s390x