Bump version to 0.5.0; add Linux riscv64 release build (#394)

- release.yml: new `linux-riscv64` job ported from GridCraft. Cross-compiles
  wordcraft and wordcraft-cli on ubuntu-24.04 with riscv64 libs from
  ports.ubuntu.com (riscv64 variants of the Linux job's -dev packages),
  packages a tar.gz, and smoke-tests the CLI under QEMU. The draft-release
  job needs it, so its tar.gz is uploaded and covered by SHA256SUMS.
- packaging/linux/package.sh: CROSS_ARCH/CROSS_TARGET/CROSS_COMPILE/EMULATOR
  support (as in GridCraft).
- README and docs/releasing.md list the riscv64 tarball.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Brandon ThomasandClaude Opus 5.5 authored and GitHub committed 2026-10-10 19:41:30 -04:00
1 parent 972df1e0c7
commit e4b7d155f1
6 files changed
+113 -28

No files matched your search

+73 -1
View File
@@ -323,6 +323,78 @@ jobs:
path: dist/release/*
if-no-files-found: error
linux-riscv64:
name: Linux riscv64
needs: version
# Cross-compiled on x86_64 (no hosted RISC-V runners) against the runner's own Ubuntu release
# from ports.ubuntu.com, so the binaries need that release's glibc (24.04: 2.39). 22.04's
# riscv64 ports lag its amd64 updates, which breaks the multiarch install. tar.gz only; the
# CLI is smoke-tested under QEMU. Ported from GridCraft's release.yml.
runs-on: ubuntu-24.04
# No `environment: release`: this job signs nothing, so it gets no release secrets.
env:
WORDCRAFT_VERSION: ${{ needs.version.outputs.version }}
WORDCRAFT_BUILD_DATE: ${{ needs.version.outputs.date }}
steps:
- uses: actions/checkout@v4
# Optional font input (docs: storytold/craft-fonts docs/integration.md); releases always embed it.
- name: Check out craft-fonts
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
with:
repository: storytold/craft-fonts
ref: 8dcdacd5153e64560d109541a47d806f26f048c0
path: craft-fonts
- uses: dtolnay/rust-toolchain@stable
with:
targets: riscv64gc-unknown-linux-gnu
- uses: Swatinem/rust-cache@v2
with:
key: release-linux-riscv64
- name: Apply version override
if: inputs.version != ''
run: cargo xtask version set "$WORDCRAFT_VERSION"
- name: Install cross-compilation dependencies
run: |
. /etc/os-release
sudo dpkg --add-architecture riscv64
# Pin the existing (archive.ubuntu.com) sources to amd64; riscv64 comes from ports.
if [ -f /etc/apt/sources.list.d/ubuntu.sources ]; then
sudo sed -i '/^Types: deb/a Architectures: amd64' /etc/apt/sources.list.d/ubuntu.sources
fi
if [ -f /etc/apt/sources.list ]; then
sudo sed -i 's/^deb /deb [arch=amd64] /g' /etc/apt/sources.list
sudo sed -i 's/^deb-src /deb-src [arch=amd64] /g' /etc/apt/sources.list
fi
for suite in "$VERSION_CODENAME" "$VERSION_CODENAME-updates" "$VERSION_CODENAME-security"; do
echo "deb [arch=riscv64] http://ports.ubuntu.com/ubuntu-ports $suite main universe restricted multiverse"
done | sudo tee /etc/apt/sources.list.d/riscv64.list
sudo apt-get update
# The Linux job's -dev packages, for riscv64.
sudo apt-get install -y --no-install-recommends \
gcc-riscv64-linux-gnu binutils-riscv64-linux-gnu libc6-dev-riscv64-cross libc6-dev:riscv64 qemu-user \
libxkbcommon-dev:riscv64 libwayland-dev:riscv64 libx11-dev:riscv64 libxrandr-dev:riscv64 \
libxi-dev:riscv64 libgl1-mesa-dev:riscv64 \
desktop-file-utils appstream
- name: Build and package (tar.gz)
env:
CRAFT_FONTS_DIR: ${{ github.workspace }}/craft-fonts
CRAFT_FONTS_REQUIRED: "1"
CARGO_TARGET_RISCV64GC_UNKNOWN_LINUX_GNU_LINKER: riscv64-linux-gnu-gcc
PKG_CONFIG_SYSROOT_DIR: /
PKG_CONFIG_PATH: /usr/lib/riscv64-linux-gnu/pkgconfig:/usr/share/pkgconfig
PKG_CONFIG_ALLOW_CROSS: "1"
CROSS_ARCH: riscv64
CROSS_TARGET: riscv64gc-unknown-linux-gnu
CROSS_COMPILE: riscv64-linux-gnu-
EMULATOR: qemu-riscv64
QEMU_LD_PREFIX: /usr/riscv64-linux-gnu
run: packaging/linux/package.sh --formats tar
- uses: actions/upload-artifact@v4
with:
name: release-linux-riscv64
path: dist/release/*.tar.gz
if-no-files-found: error
freebsd:
name: FreeBSD x86_64
needs: version
@@ -377,7 +449,7 @@ jobs:
release:
name: Draft GitHub Release
# Needs the signing jobs, which only run on `release`: a branch dry run never gets here.
needs: [version, macos, windows, linux, flatpak, freebsd, web]
needs: [version, macos, windows, linux, linux-riscv64, flatpak, freebsd, web]
runs-on: ubuntu-latest
environment: release
permissions:
Generated
+20 -20
View File
@@ -4998,7 +4998,7 @@ checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e"
[[package]]
name = "wordcraft"
version = "0.4.0"
version = "0.5.0"
dependencies = [
"arboard",
"eframe",
@@ -5019,7 +5019,7 @@ dependencies = [
[[package]]
name = "wordcraft-cli"
version = "0.4.0"
version = "0.5.0"
dependencies = [
"serde_json",
"wordcraft-doc",
@@ -5031,11 +5031,11 @@ dependencies = [
[[package]]
name = "wordcraft-control-key"
version = "0.4.0"
version = "0.5.0"
[[package]]
name = "wordcraft-doc"
version = "0.4.0"
version = "0.5.0"
dependencies = [
"proptest",
"serde",
@@ -5047,7 +5047,7 @@ dependencies = [
[[package]]
name = "wordcraft-docbin"
version = "0.4.0"
version = "0.5.0"
dependencies = [
"cfb",
"log",
@@ -5060,7 +5060,7 @@ dependencies = [
[[package]]
name = "wordcraft-docx"
version = "0.4.0"
version = "0.5.0"
dependencies = [
"aes",
"base64",
@@ -5082,7 +5082,7 @@ dependencies = [
[[package]]
name = "wordcraft-engine"
version = "0.4.0"
version = "0.5.0"
dependencies = [
"image",
"js-sys",
@@ -5108,7 +5108,7 @@ dependencies = [
[[package]]
name = "wordcraft-fonts"
version = "0.4.0"
version = "0.5.0"
dependencies = [
"harfrust 0.13.3",
"kurbo",
@@ -5119,7 +5119,7 @@ dependencies = [
[[package]]
name = "wordcraft-formats"
version = "0.4.0"
version = "0.5.0"
dependencies = [
"image",
"log",
@@ -5132,14 +5132,14 @@ dependencies = [
[[package]]
name = "wordcraft-geom"
version = "0.4.0"
version = "0.5.0"
dependencies = [
"serde",
]
[[package]]
name = "wordcraft-layout"
version = "0.4.0"
version = "0.5.0"
dependencies = [
"js-sys",
"log",
@@ -5156,7 +5156,7 @@ dependencies = [
[[package]]
name = "wordcraft-mcp"
version = "0.4.0"
version = "0.5.0"
dependencies = [
"log",
"serde_json",
@@ -5168,7 +5168,7 @@ dependencies = [
[[package]]
name = "wordcraft-metafile"
version = "0.4.0"
version = "0.5.0"
dependencies = [
"kurbo",
"thiserror 2.0.21",
@@ -5176,7 +5176,7 @@ dependencies = [
[[package]]
name = "wordcraft-pdf"
version = "0.4.0"
version = "0.5.0"
dependencies = [
"hayro-cmap",
"hayro-interpret",
@@ -5196,7 +5196,7 @@ dependencies = [
[[package]]
name = "wordcraft-proof"
version = "0.4.0"
version = "0.5.0"
dependencies = [
"log",
"miniz_oxide 0.8.9",
@@ -5205,7 +5205,7 @@ dependencies = [
[[package]]
name = "wordcraft-render"
version = "0.4.0"
version = "0.5.0"
dependencies = [
"image",
"log",
@@ -5219,7 +5219,7 @@ dependencies = [
[[package]]
name = "wordcraft-ui-egui"
version = "0.4.0"
version = "0.5.0"
dependencies = [
"egui",
"egui_kittest",
@@ -5241,7 +5241,7 @@ dependencies = [
[[package]]
name = "wordcraft-web"
version = "0.4.0"
version = "0.5.0"
dependencies = [
"eframe",
"egui",
@@ -5259,7 +5259,7 @@ dependencies = [
[[package]]
name = "wordcraft-zotero"
version = "0.4.0"
version = "0.5.0"
dependencies = [
"log",
"proptest",
@@ -5361,7 +5361,7 @@ checksum = "9440ea3e5aeabb0ac63af70daf835274065238cdd0cec83418f417eae38bacee"
[[package]]
name = "xtask"
version = "0.4.0"
version = "0.5.0"
dependencies = [
"serde_json",
]
+1 -1
View File
@@ -4,7 +4,7 @@ members = ["crates/*", "apps/*", "xtask"]
default-members = ["crates/*", "apps/wordcraft", "apps/wordcraft-cli", "xtask"]
[workspace.package]
version = "0.4.0"
version = "0.5.0"
edition = "2024"
license = "MIT OR Apache-2.0"
rust-version = "1.90"
+3
View File
@@ -257,6 +257,9 @@ instead, without setting anything. The log file records the choice (lines starti
| Fedora/RHEL/openSUSE | `wordcraft-<ver>-linux-x86_64.rpm` | `wordcraft-<ver>-linux-aarch64.rpm` | |
| Tarball | `wordcraft-<ver>-linux-x86_64.tar.gz` | `wordcraft-<ver>-linux-aarch64.tar.gz` | Unpack anywhere |
RISC-V (riscv64): `wordcraft-<ver>-linux-riscv64.tar.gz`, a tarball cross-compiled for glibc 2.39+
(Ubuntu 24.04, Debian 13 and newer).
### FreeBSD
| Build | File |
+2 -1
View File
@@ -13,6 +13,7 @@ this file has the WordCraft specifics.
| macOS | universal `WordCraft.app` in a `.dmg`, universal CLI zip | Developer ID + notarization (`APPLE_*` secrets) |
| Windows | x64, x86 and arm64 `.msi` + portable `.zip` | Azure Trusted Signing (`AZURE_*` secrets) |
| Linux | x86_64 and aarch64 `.AppImage` (+ `.zsync` for AppImageUpdate), `.flatpak` bundle, `.deb`, `.rpm`, `.tar.gz`; Flathub manifest | checksums |
| Linux riscv64 | `.tar.gz` (cross-compiled on `ubuntu-24.04`, glibc >= 2.39; CLI smoke-tested under QEMU) | checksums |
| FreeBSD | x86_64 `.tar.gz` | checksums |
| Web | `wordcraft-web-<version>.zip` (static site: `index.html`, wasm, glue) | none |
@@ -26,5 +27,5 @@ Local packaging: `packaging/macos/package.sh --arch universal`, `packaging/windo
`packaging/linux/package.sh` (then `packaging/linux/flatpak-bundle.sh` for the Flatpak), `packaging/web/package.sh`.
Dry run: `gh workflow run release.yml --ref <branch>` builds the unsigned jobs (version, Linux,
Flatpak, FreeBSD, web) on any branch; the signing jobs are refused there by the `release`
Linux riscv64, Flatpak, FreeBSD, web) on any branch; the signing jobs are refused there by the `release`
environment's branch rule, so no draft release is made.
+14 -5
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
# Build and package WordCraft for Linux (<arch> is x86_64 or aarch64):
# Build and package WordCraft for Linux (<arch> is x86_64 or aarch64, or riscv64 when cross-compiling):
#
# $DIST/wordcraft-<version>-linux-<arch>.AppImage any distro with glibc >= the build host's
# $DIST/wordcraft-<version>-linux-<arch>.AppImage.zsync delta updates (needs zsyncmake)
@@ -25,13 +25,14 @@ while [ $# -gt 0 ]; do
case "$1" in
--skip-build) SKIP_BUILD=1; shift ;;
--formats) FORMATS="$2"; shift 2 ;;
-h | --help) sed -n '2,15p' "$0"; exit 0 ;;
-h | --help) sed -n '2,17p' "$0"; exit 0 ;;
*) echo "unknown argument: $1" >&2; exit 2 ;;
esac
done
ARCH="$(uname -m)"
ARCH="${CROSS_ARCH:-$(uname -m)}"
case "$ARCH" in
riscv64) DEB_ARCH=riscv64 ;;
x86_64) DEB_ARCH=amd64 ;;
aarch64 | arm64) ARCH=aarch64; DEB_ARCH=arm64 ;;
*) echo "unsupported architecture $ARCH" >&2; exit 2 ;;
@@ -42,9 +43,13 @@ BASENAME="wordcraft-$VERSION-linux-$ARCH"
echo "==> WordCraft $VERSION for Linux $ARCH ($FORMATS)"
if [ "$SKIP_BUILD" = 0 ]; then
if [ -n "${CROSS_TARGET:-}" ]; then
(cd "$ROOT" && cargo build --release --locked -p wordcraft -p wordcraft-cli --target "$CROSS_TARGET")
else
(cd "$ROOT" && cargo build --release --locked -p wordcraft -p wordcraft-cli)
fi
BIN="$CARGO_TARGET_DIR/release"
fi
BIN="$CARGO_TARGET_DIR/${CROSS_TARGET:+$CROSS_TARGET/}release"
WORK="$CARGO_TARGET_DIR/linux-package"
STAGE="$WORK/root"
rm -rf "$WORK"
@@ -52,7 +57,7 @@ rm -rf "$WORK"
# ---- stage an FHS tree (shared by every format) -------------------------------------------------
install -Dm755 "$BIN/wordcraft" "$STAGE/usr/bin/wordcraft"
install -Dm755 "$BIN/wordcraft-cli" "$STAGE/usr/bin/wordcraft-cli"
strip "$STAGE/usr/bin/wordcraft" "$STAGE/usr/bin/wordcraft-cli" 2>/dev/null || true
"${CROSS_COMPILE:-}strip" "$STAGE/usr/bin/wordcraft" "$STAGE/usr/bin/wordcraft-cli" 2>/dev/null || true
install -Dm644 "$HERE/$APP_ID.desktop" "$STAGE/usr/share/applications/$APP_ID.desktop"
install -Dm644 "$HERE/$APP_ID.mime.xml" "$STAGE/usr/share/mime/packages/$APP_ID.xml"
mkdir -p "$STAGE/usr/share/metainfo"
@@ -135,6 +140,10 @@ if has appimage; then
fi
fi
if [ -z "${CROSS_TARGET:-}" ]; then
"$STAGE/usr/bin/wordcraft-cli" --version
elif [ -n "${EMULATOR:-}" ]; then
"$EMULATOR" "$STAGE/usr/bin/wordcraft-cli" --version
fi
echo "==> done"
ls -lh "$DIST"