feat: cross-compile to RISC-V (#16426)

Co-authored-by: Alexey Shekhirin <5773434+shekhirin@users.noreply.github.com>
This commit is contained in:
Leonardo Arias
2025-06-05 06:10:44 -06:00
committed by GitHub
parent 5e8bcdfe57
commit a69d30c679
2 changed files with 21 additions and 0 deletions

View File

@@ -63,24 +63,35 @@ jobs:
name: build release
runs-on: ${{ matrix.configs.os }}
needs: extract-version
continue-on-error: ${{ matrix.configs.allow_fail }}
strategy:
fail-fast: true
matrix:
configs:
- target: x86_64-unknown-linux-gnu
os: ubuntu-24.04
profile: maxperf
allow_fail: false
- target: aarch64-unknown-linux-gnu
os: ubuntu-24.04
profile: maxperf
allow_fail: false
- target: x86_64-apple-darwin
os: macos-13
profile: maxperf
allow_fail: false
- target: aarch64-apple-darwin
os: macos-14
profile: maxperf
allow_fail: false
- target: x86_64-pc-windows-gnu
os: ubuntu-24.04
profile: maxperf
allow_fail: false
- target: riscv64gc-unknown-linux-gnu
os: ubuntu-24.04
profile: maxperf
allow_fail: true
build:
- command: build
binary: reth

View File

@@ -24,5 +24,15 @@ pre-build = [
# Inspired by https://github.com/cross-rs/cross/blob/9e2298e17170655342d3248a9c8ac37ef92ba38f/docker/Dockerfile.x86_64-pc-windows-gnu#L51
dockerfile = "./Dockerfile.x86_64-pc-windows-gnu"
[target.riscv64gc-unknown-linux-gnu]
image = "ubuntu:24.04"
pre-build = [
"apt update",
"apt install --yes gcc gcc-riscv64-linux-gnu libclang-dev make",
]
env.passthrough = [
"CARGO_TARGET_RISCV64GC_UNKNOWN_LINUX_GNU_LINKER=riscv64-linux-gnu-gcc",
]
[build.env]
passthrough = ["JEMALLOC_SYS_WITH_LG_PAGE"]