From f5bc5dd72080ff9f0aadc5de373fd4c5e0113da9 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 4 Mar 2026 02:34:41 +0000 Subject: [PATCH 1/2] Initial plan From 65c40b623cf38df1bcb3b8f867453e54ddf6e2c7 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 4 Mar 2026 02:36:55 +0000 Subject: [PATCH 2/2] Add RISC-V 64 CI workflow with cargo run targeting riscv64gc via QEMU Co-authored-by: gpBlockchain <32102187+gpBlockchain@users.noreply.github.com> --- .github/workflows/riscv64.yml | 48 +++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/riscv64.yml diff --git a/.github/workflows/riscv64.yml b/.github/workflows/riscv64.yml new file mode 100644 index 0000000..bed522b --- /dev/null +++ b/.github/workflows/riscv64.yml @@ -0,0 +1,48 @@ +name: RISC-V 64 Test + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +env: + CARGO_TERM_COLOR: always + +jobs: + qemu-riscv64: + runs-on: ubuntu-24.04 + permissions: + contents: read + steps: + - uses: actions/checkout@v3 + + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: 1.92.0 + override: true + + - name: Cache Rust dependencies + uses: actions/cache@v3 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target + key: ${{ runner.os }}-riscv64-cargo-${{ hashFiles('**/Cargo.lock') }} + + - name: Setup RISC-V environment + run: | + sudo apt-get update -y + sudo apt install -y gcc-riscv64-linux-gnu \ + qemu-user-static + rustup target add riscv64gc-unknown-linux-gnu + + - name: Run + run: | + export CARGO_TARGET_RISCV64GC_UNKNOWN_LINUX_GNU_LINKER=riscv64-linux-gnu-gcc + export CARGO_TARGET_RISCV64GC_UNKNOWN_LINUX_GNU_RUSTFLAGS="-C link-args=-L -C link-args=/usr/lib/gcc-cross/riscv64-linux-gnu/13" + export CARGO_TARGET_RISCV64GC_UNKNOWN_LINUX_GNU_RUNNER="setarch linux64 --addr-no-randomize qemu-riscv64-static -L /usr/riscv64-linux-gnu" + cargo run --release --target riscv64gc-unknown-linux-gnu