From 7c2161d68755e2c47db26717f6757f5099d500e4 Mon Sep 17 00:00:00 2001 From: mariano-m13 <127398726+mariano-m13@users.noreply.github.com> Date: Sat, 4 Oct 2025 07:31:11 +0200 Subject: [PATCH] release: add binaries for `riscv64gc-unknown-linux-gnu` target Note that we skip lz4/brotli/zstd tests on RISC-V. The CI runs RISC-V tests using cross/QEMU emulation. The decompression tools (lz4, brotli, zstd) are x86_64 binaries on the host that cannot execute in the RISC-V QEMU environment. Skip these three tests at compile-time on RISC-V to avoid test failures. The -z/--search-zip functionality itself works correctly on real RISC-V hardware where native decompression tools are available. PR #3165 --- .github/workflows/ci.yml | 4 ++++ .github/workflows/release.yml | 6 ++++++ CHANGELOG.md | 2 ++ tests/misc.rs | 6 ++++++ 4 files changed, 18 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bf6a554..47d33a4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -95,6 +95,10 @@ jobs: os: ubuntu-latest rust: stable target: s390x-unknown-linux-gnu + - build: stable-riscv64 + os: ubuntu-latest + rust: stable + target: riscv64gc-unknown-linux-gnu - build: macos os: macos-latest rust: nightly diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3139d03..c5c1318 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -110,6 +110,12 @@ jobs: target: s390x-unknown-linux-gnu strip: s390x-linux-gnu-strip qemu: qemu-s390x + - build: stable-riscv64 + os: ubuntu-latest + rust: stable + target: riscv64gc-unknown-linux-gnu + strip: riscv64-linux-gnu-strip + qemu: qemu-riscv64 - build: macos os: macos-latest rust: nightly diff --git a/CHANGELOG.md b/CHANGELOG.md index afd821d..5dfe1f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -67,6 +67,8 @@ Feature enhancements: Improve completions for `--hyperlink-format` in bash and fish. * [FEATURE #3102](https://github.com/BurntSushi/ripgrep/pull/3102): Improve completions for `--hyperlink-format` in zsh. +* [FEATURE #3165](https://github.com/BurntSushi/ripgrep/pull/3165): + Add release binaries for `riscv64gc-unknown-linux-gnu`. 14.1.1 (2024-09-08) diff --git a/tests/misc.rs b/tests/misc.rs index 31f60ce..1921a65 100644 --- a/tests/misc.rs +++ b/tests/misc.rs @@ -922,6 +922,8 @@ be, to a very large extent, the result of luck. Sherlock Holmes eqnice!(expected, cmd.stdout()); }); +// lz4 decompression tool doesn't work under RISC-V QEMU emulation in CI +#[cfg(not(target_arch = "riscv64"))] rgtest!(compressed_lz4, |dir: Dir, mut cmd: TestCommand| { if !cmd_exists("lz4") { return; @@ -952,6 +954,8 @@ be, to a very large extent, the result of luck. Sherlock Holmes eqnice!(expected, cmd.stdout()); }); +// brotli decompression tool doesn't work under RISC-V QEMU emulation in CI +#[cfg(not(target_arch = "riscv64"))] rgtest!(compressed_brotli, |dir: Dir, mut cmd: TestCommand| { if !cmd_exists("brotli") { return; @@ -967,6 +971,8 @@ be, to a very large extent, the result of luck. Sherlock Holmes eqnice!(expected, cmd.stdout()); }); +// zstd decompression tool doesn't work under RISC-V QEMU emulation in CI +#[cfg(not(target_arch = "riscv64"))] rgtest!(compressed_zstd, |dir: Dir, mut cmd: TestCommand| { if !cmd_exists("zstd") { return;