Skip to content

Add riscv64 to release binaries #14668

@gounthar

Description

@gounthar

Following up on #12348 (closed 2024). There's been more demand since then, and I found a way to bring the extended build time down to about 2 minutes on riscv64.

The key issue with extended Hugo on riscv64 is that compiling vendored libsass takes many hours. But golibsass already has a dev build tag that links against the system libsass library instead. With -tags extended,dev and apt install libsass-dev, the extended build drops from ~14 hours to ~2 minutes on native riscv64 hardware.

Build evidence:

For hugoreleaser.yaml, the regular build just needs goarch: riscv64 added under container1/unix/regular. The extended build would need either:

  1. Cross-compilation with riscv64-linux-gnu-gcc (like arm64 uses aarch64-linux-gnu-gcc)
  2. Native build on a riscv64 runner with system libsass (-tags extended,dev)

Native riscv64 GitHub Actions runners are available through the RISE Project (https://riseproject.dev/), free for open source. To enable: install https://github.com/apps/rise-risc-v-runners on this repository.

I can put together a PR if this approach works for you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions