Radish alpha
r
rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5
Radicle web interface
Radicle
Git
httpd: Release 0.19.1
Open did:key:z6MkkfM3...sVz5 opened 10 months ago

httpd: update cargo-zigbuild version to 0.20 httpd: Dockerfile uses Rust version from rust-toolchain

Instead of hardcoding the version of the Rust alpine file, introduce an ARG in the Dockerfile. In build/build, we determine the version by inspecting rust-toolchain.toml, and pass this value in. This ensures that the binaries are built using the same toolchain that we develop with.

Co-authored-by: Fintan Halpenny fintan.halpenny@gmail.com

check check-visual check-unit-test check-http-client-unit-test check-radicle-httpd check-e2e check-build check-http

👉 Preview 👉 Workflow runs 👉 Branch on GitHub

6 files changed +12 -7 ccb5e49e f5422232
modified radicle-httpd/Cargo.lock
@@ -1708,7 +1708,7 @@ dependencies = [

[[package]]
name = "radicle-httpd"
-
version = "0.19.0"
+
version = "0.19.1"
dependencies = [
 "anyhow",
 "axum",
modified radicle-httpd/Cargo.toml
@@ -3,7 +3,7 @@ name = "radicle-httpd"
description = "Radicle HTTP daemon"
homepage = "https://radicle.xyz"
license = "MIT OR Apache-2.0"
-
version = "0.19.0"
+
version = "0.19.1"
authors = ["cloudhead <cloudhead@radicle.xyz>", "sebastinez <me@sebastinez.dev>"]
edition = "2021"
default-run = "radicle-httpd"
modified radicle-httpd/build/Dockerfile
@@ -1,5 +1,7 @@
# Builds release binaries for Radicle.
-
FROM rust:1.83.0-alpine3.21 as builder
+
ARG RUST_VERSION="1.87"
+
ARG ALPINE_VERSION="3.20"
+
FROM rust:${RUST_VERSION}-alpine${ALPINE_VERSION} as builder
LABEL maintainer="Radicle Team <team@radicle.xyz>"
WORKDIR /src
COPY . .
@@ -28,7 +30,7 @@ RUN rustup target add \
# Install dependencies for cross-compiling to macOS.
# We use Zig as the linker to perform the compilation from a Linux host.
# Compilation is done via `cargo-zigbuild` which is a wrapper around `zig`.
-
RUN cargo install cargo-zigbuild@0.19.3 --locked
+
RUN cargo install cargo-zigbuild@0.20.0 --locked


# Parts of the macOS SDK are required to build Radicle, we make these available
@@ -43,7 +45,7 @@ RUN cargo zigbuild --locked --release \
    --target=aarch64-apple-darwin \
    --target=aarch64-unknown-linux-musl \
    --target=x86_64-unknown-linux-musl \
-
    -p radicle-httpd 
+
    -p radicle-httpd

# Now copy the files to a new image without all the intermediary artifacts to
# save some space.
modified radicle-httpd/build/build
@@ -34,6 +34,7 @@ main() {
  keypath="$(rad path)/keys/radicle.pub"
  version="$(build/version)"
  image=radicle-build-$version
+
  rust_version="$(cat ./rust-toolchain)"

  if [ ! -f "$keypath" ]; then
    echo "fatal: no key found at $keypath" >&2
@@ -51,6 +52,7 @@ main() {
  case "$OS" in
  Darwin)
    podman build \
+
      --build-arg "RUST_VERSION=$rust_version" \
      --build-arg SOURCE_DATE_EPOCH \
      --build-arg TZ \
      --build-arg LC_ALL \
@@ -63,6 +65,7 @@ main() {
    ;;
  *)
    podman --cgroup-manager=cgroupfs build \
+
      --build-arg "RUST_VERSION=$rust_version" \
      --build-arg SOURCE_DATE_EPOCH \
      --build-arg TZ \
      --build-arg LC_ALL \
modified tests/support/heartwood-release
@@ -1 +1 @@
-
1.2.0
+
1.2.0

\ No newline at end of file
modified tests/support/radicle-httpd-release
@@ -1 +1 @@
-
0.19.0
+
0.19.1

\ No newline at end of file