Skip to content

Commit 49466a3

Browse files
authored
CI: Default build artifact for riscv64+musl on CICD.yml (#10029)
Co-authored by: [email protected]; Signed-off-by: ffgan <[email protected]>
1 parent b852b1b commit 49466a3

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

.cargo/config.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
linker = "x86_64-unknown-redox-gcc"
77
[target.aarch64-unknown-linux-gnu]
88
linker = "aarch64-linux-gnu-gcc"
9+
[target.riscv64gc-unknown-linux-musl]
10+
rustflags = ["-C", "target-feature=+crt-static"]
911

1012
[env]
1113
# See feat_external_libstdbuf in src/uu/stdbuf/Cargo.toml

.github/workflows/CICD.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ jobs:
309309
./target/release-fast/true
310310
# Check that the progs have prefix
311311
test -f /tmp/usr/local/bin/uu-tty
312-
test -f /tmp/usr/local/libexec/uu-coreutils/libstdbuf.*
312+
test -f /tmp/usr/local/libexec/uu-coreutils/libstdbuf.*
313313
# Check that the manpage is not present
314314
! test -f /tmp/usr/local/share/man/man1/uu-whoami.1
315315
# Check that the completion is not present
@@ -576,6 +576,7 @@ jobs:
576576
- { os: ubuntu-latest , target: arm-unknown-linux-gnueabihf , features: feat_os_unix_gnueabihf , use-cross: use-cross , skip-tests: true }
577577
- { os: ubuntu-24.04-arm , target: aarch64-unknown-linux-gnu , features: feat_os_unix_gnueabihf }
578578
- { os: ubuntu-latest , target: aarch64-unknown-linux-musl , features: feat_os_unix_musl , use-cross: use-cross , skip-tests: true }
579+
- { os: ubuntu-latest , target: riscv64gc-unknown-linux-musl , features: feat_os_unix_musl , use-cross: use-cross , skip-tests: true }
579580
# - { os: ubuntu-latest , target: x86_64-unknown-linux-gnu , features: feat_selinux , use-cross: use-cross }
580581
- { os: ubuntu-latest , target: i686-unknown-linux-gnu , features: "feat_os_unix,test_risky_names", use-cross: use-cross }
581582
- { os: ubuntu-latest , target: i686-unknown-linux-musl , features: feat_os_unix_musl , use-cross: use-cross }
@@ -636,6 +637,7 @@ jobs:
636637
unset TARGET_ARCH
637638
case '${{ matrix.job.target }}' in
638639
aarch64-*) TARGET_ARCH=arm64 ;;
640+
riscv64gc-*) TARGET_ARCH=riscv64 ;;
639641
arm-*-*hf) TARGET_ARCH=armhf ;;
640642
i686-*) TARGET_ARCH=i686 ;;
641643
x86_64-*) TARGET_ARCH=x86_64 ;;
@@ -700,6 +702,7 @@ jobs:
700702
STRIP="strip"
701703
case ${{ matrix.job.target }} in
702704
aarch64-*-linux-*) STRIP="aarch64-linux-gnu-strip" ;;
705+
riscv64gc-*-linux-*) STRIP="riscv64-linux-gnu-strip" ;;
703706
arm-*-linux-gnueabihf) STRIP="arm-linux-gnueabihf-strip" ;;
704707
*-pc-windows-msvc) STRIP="" ;;
705708
esac;
@@ -726,6 +729,10 @@ jobs:
726729
sudo apt-get -y update
727730
sudo apt-get -y install gcc-aarch64-linux-gnu
728731
;;
732+
riscv64gc-unknown-linux-*)
733+
sudo apt-get -y update
734+
sudo apt-get -y install gcc-riscv64-linux-gnu
735+
;;
729736
*-redox*)
730737
sudo apt-get -y update
731738
sudo apt-get -y install fuse3 libfuse-dev

Cross.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,6 @@ pre-build = [
55
]
66
[build.env]
77
passthrough = ["CI", "RUST_BACKTRACE", "CARGO_TERM_COLOR"]
8+
9+
[target.riscv64gc-unknown-linux-musl]
10+
image = "ghcr.io/cross-rs/riscv64gc-unknown-linux-musl:main"

0 commit comments

Comments
 (0)