Fintan Halpenny
6f25d73d3d
build: remove quotes from rust-version
...
The script would include the quotes and so running `build/build` would
result in:
$ build/build
Running build..
✓ Radicle key already in ssh-agent
Building Radicle 1.2.0..
Creating archive of repository at e9cf91… in build/heartwood-e9cf91….tar.gz..
Building image (radicle-build-1.2.0)..
[1/2] STEP 1/17: FROM rust:"1.85"-alpine3.20 AS builder
Error: creating build container: parsing reference "rust:\"1.85\"-alpine3.20": invalid reference format
Co-authored-by: Lorenz Leutgeb <lorenz.leutgeb@radicle.xyz>
2025-06-02 12:28:08 +02:00
Fintan Halpenny
ae1165fa58
build: do not assume `rad` remote
...
Do not assume the `rad` remote being present, in case other use other naming
remote schemes. Instead, build the remote using the `rad .` and `rad self --nid`
commands.
2025-05-30 12:27:21 +02:00
Fintan Halpenny
edcfcae78c
build: fix ssh symlinking
...
The symlinking process of `build/upload` was not working, due to the command
consuming stdin, and ignoring the subsequent targets platforms. Use `-n` to
prevent this, allowing every target binary to be uploaded correctly.
The output is also improved for better feedback during the upload process.
2025-05-30 12:27:13 +02:00
Fintan Halpenny
40e9b7ba3a
build: update cargo-zigbuild version to 0.20
2025-05-30 11:17:39 +02:00
Fintan Halpenny
7dcfe45781
build: Dockerfile uses Rust version from `rust-toolchain.toml`
...
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.
2025-05-30 11:17:39 +02:00
Lorenz Leutgeb
cbca3af260
chore: shellcheck fixes
2025-04-22 15:43:02 +02:00
Lorenz Leutgeb
77386b0fce
build: Upload Git archive of heartwood
2025-04-22 11:46:01 +02:00
Yorgos Saslis
ffc86f8a96
build: ensure zigbuild install doesn't break reproducible build
...
In trying to rebuild the radicle 1.1.0 version now (2025-02-26), some months after 1.1.0 has been released, I see in my pipelines that the `cargo install cargo-zigbuild@0.19.3` instruction is now failing.
This is because `home@0.5.11` has been released and this *patch* version bump requires a newer version of rust (1.81) (0.5.9 was ok with 1.80). See https://github.com/rust-lang/cargo/issues/14944 for more details.
Adding `--locked` here prevents this issue from happening in the future.
Importantly: newer versions of other crates being picked up by cargo here means the build isn't bit-for-bit reproducible.
The error itself is:
```
[1/2] STEP 14/17: RUN curl -sSf -o zig.tar.xz https://ziglang.org/download/0.12.0/zig-linux-x86_64-0.12.0.tar.xz && curl -sSf -o zig.tar.xz.minisig https://ziglang.org/download/0.12.0/zig-linux-x86_64-0.12.0.tar.xz.minisig && minisign -Vm zig.tar.xz -P RWSGOq2NVecA2UPNdBUZykf1CCb147pkmdtYxgb3Ti+JO/wCYvhbAb/U && xz -d -c zig.tar.xz | tar -x && mv zig-linux-x86_64-0.12.0/zig /usr/bin/zig && mv zig-linux-x86_64-0.12.0/lib /usr/lib/zig && cargo install cargo-zigbuild@0.18.3
Signature and comment signature verified
Trusted comment: timestamp:1713604063 file:zig-linux-x86_64-0.12.0.tar.xz hashed
Updating crates.io index
Downloading crates ...
Downloaded cargo-zigbuild v0.18.3
Installing cargo-zigbuild v0.18.3
Updating crates.io index
Locking 83 packages to latest compatible versions
Adding cargo-platform v0.1.9 (latest: v0.2.0)
Adding cargo-zigbuild v0.18.3 (latest: v0.19.8)
Adding cargo_metadata v0.18.1 (latest: v0.19.1)
Adding dirs v5.0.1 (latest: v6.0.0)
Adding dirs-sys v0.4.1 (latest: v0.5.0)
Adding fs-err v2.11.0 (latest: v3.1.0)
Adding getrandom v0.2.15 (latest: v0.3.1)
Adding linux-raw-sys v0.4.15 (latest: v0.9.0)
Adding redox_users v0.4.6 (latest: v0.5.0)
Adding target-lexicon v0.12.16 (latest: v0.13.2)
Adding thiserror v1.0.69 (latest: v2.0.11)
Adding thiserror-impl v1.0.69 (latest: v2.0.11)
Adding wasi v0.11.0+wasi-snapshot-preview1 (latest: v0.14.1+wasi-0.2.3)
Adding which v6.0.3 (latest: v7.0.2)
Adding windows-sys v0.48.0 (latest: v0.59.0)
Adding windows-targets v0.48.5 (latest: v0.53.0)
Adding windows-targets v0.52.6 (latest: v0.53.0)
Adding windows_aarch64_gnullvm v0.48.5 (latest: v0.53.0)
Adding windows_aarch64_gnullvm v0.52.6 (latest: v0.53.0)
Adding windows_aarch64_msvc v0.48.5 (latest: v0.53.0)
Adding windows_aarch64_msvc v0.52.6 (latest: v0.53.0)
Adding windows_i686_gnu v0.48.5 (latest: v0.53.0)
Adding windows_i686_gnu v0.52.6 (latest: v0.53.0)
Adding windows_i686_gnullvm v0.52.6 (latest: v0.53.0)
Adding windows_i686_msvc v0.48.5 (latest: v0.53.0)
Adding windows_i686_msvc v0.52.6 (latest: v0.53.0)
Adding windows_x86_64_gnu v0.48.5 (latest: v0.53.0)
Adding windows_x86_64_gnu v0.52.6 (latest: v0.53.0)
Adding windows_x86_64_gnullvm v0.48.5 (latest: v0.53.0)
Adding windows_x86_64_gnullvm v0.52.6 (latest: v0.53.0)
Adding windows_x86_64_msvc v0.48.5 (latest: v0.53.0)
Adding windows_x86_64_msvc v0.52.6 (latest: v0.53.0)
Adding winsafe v0.0.19 (latest: v0.0.22)
Downloading crates ...
Downloaded anstyle v1.0.10
Downloaded anstyle-query v1.1.2
Downloaded cargo-platform v0.1.9
Downloaded bitflags v2.8.0
Downloaded cargo_metadata v0.18.1
Downloaded is_terminal_polyfill v1.70.1
Downloaded option-ext v0.2.0
Downloaded scroll_derive v0.12.0
Downloaded strsim v0.11.1
Downloaded autocfg v1.4.0
Downloaded anstream v0.6.18
Downloaded camino v1.1.9
Downloaded dirs-sys v0.4.1
Downloaded heck v0.5.0
Downloaded itoa v1.0.14
Downloaded home v0.5.11
Downloaded thiserror-impl v1.0.69
Downloaded which v6.0.3
Downloaded utf8parse v0.2.2
Downloaded either v1.14.0
Downloaded colorchoice v1.0.3
Downloaded clap_lex v0.7.4
Downloaded errno v0.3.10
Downloaded dirs v5.0.1
Downloaded fs-err v2.11.0
Downloaded shlex v1.3.0
Downloaded rustc_version v0.4.1
Downloaded path-slash v0.2.1
Downloaded thiserror v1.0.69
Downloaded terminal_size v0.4.1
Downloaded anstyle-parse v0.2.6
Downloaded clap_derive v4.5.28
Downloaded target-lexicon v0.12.16
Downloaded fat-macho v0.4.9
Downloaded semver v1.0.25
Downloaded scroll v0.12.0
Downloaded log v0.4.26
Downloaded proc-macro2 v1.0.93
Downloaded quote v1.0.38
Downloaded anyhow v1.0.96
Downloaded clap v4.5.31
Downloaded ryu v1.0.19
Downloaded serde_derive v1.0.218
Downloaded unicode-ident v1.0.17
Downloaded serde v1.0.218
Downloaded memchr v2.7.4
Downloaded serde_json v1.0.139
Downloaded clap_builder v4.5.31
Downloaded goblin v0.9.3
Downloaded syn v2.0.98
Downloaded rustix v0.38.44
Downloaded libc v0.2.170
Downloaded plain v0.2.3
Downloaded cargo-options v0.7.5
Downloaded linux-raw-sys v0.4.15
error: failed to compile `cargo-zigbuild v0.18.3`, intermediate artifacts can be found at `/tmp/cargo-installZ4q2vb`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
Caused by:
rustc 1.80.1 is not supported by the following package:
home@0.5.11 requires rustc 1.81
Try re-running `cargo install` with `--locked`
Error: building at STEP "RUN curl -sSf -o zig.tar.xz https://ziglang.org/download/0.12.0/zig-linux-x86_64-0.12.0.tar.xz && curl -sSf -o zig.tar.xz.minisig https://ziglang.org/download/0.12.0/zig-linux-x86_64-0.12.0.tar.xz.minisig && minisign -Vm zig.tar.xz -P RWSGOq2NVecA2UPNdBUZykf1CCb147pkmdtYxgb3Ti+JO/wCYvhbAb/U && xz -d -c zig.tar.xz | tar -x && mv zig-linux-x86_64-0.12.0/zig /usr/bin/zig && mv zig-linux-x86_64-0.12.0/lib /usr/lib/zig && cargo install cargo-zigbuild@0.18.3": while running runtime: exit status 101
```
Signed-off-by: Yorgos Saslis <yorgos.work@proton.me>
2025-02-26 09:32:00 +02:00
Yorgos Saslis
87cb7bf52d
build: Update zig installation method
...
This simplifies the Dockerfile a little , as the zig package (0.12.0) is available on alpine 3.20
https://repology.org/project/zig/versions
parent image is also updated to current rust-toolchain
Signed-off-by: Yorgos Saslis <yorgos.work@proton.me>
2024-12-16 11:09:19 +01:00
cloudhead
87f6956e49
build: Fixes to release script
2024-12-16 11:08:27 +01:00
cloudhead
6dcfbfcdee
build: Separate release from upload
2024-11-01 12:28:39 +01:00
cloudhead
589c375624
build: Update env vars for build process
...
Use the standard `SOURCE_DATE_EPOCH` instead of `GIT_COMMIT_TIME`.
Set `GIT_HEAD` properly.
2024-06-20 10:47:50 +02:00
Yorgos Saslis
6966c97194
build: Switch to build args in Dockerfile
...
`--env` is a podman-specific feature. While it is clear that podman is a
requirement here, switching these to build arguments better expresses
intent.
These values are meant to be configurable at build time, which is
exactly what build arguments are for, while environment variables are
meant to persist in the image built.
Signed-off-by: Yorgos Saslis <yorgos.work@proton.me>
2024-06-12 15:35:42 +02:00
cloudhead
a6e33ec19a
build: Remove `rad-web` from Dockerfile
2024-06-06 15:28:16 +02:00
cloudhead
a4989b7ce7
Remove `radicle-httpd` crate
...
The HTTP daemon is moved to the `radicle-explorer` repository. Hence,
all traces of it are removed from this repository.
2024-06-06 11:14:00 +02:00
cloudhead
6dd29d4b50
build: Move `ulimit` flag to correct location
2024-05-15 14:47:57 +02:00
cloudhead
b195a3eb35
build: Set ulimit on container
...
This was necessary on some machines.
2024-05-15 12:24:44 +02:00
cloudhead
227e13d5b1
build: Push tags as part of upload
2024-05-02 21:37:15 +02:00
cloudhead
1708ddf777
build: Small changes to build script
2024-05-01 16:09:23 +02:00
cloudhead
780f0eff37
build: Don't set 'latest' link for dev builds
2024-04-30 22:02:32 +02:00
cloudhead
faafd21a91
build: Use zig for linux builds
...
There was an issue with the build that is resolved when using zig.
aarch64 binaries had a bug in libgit2 involving file access.
2024-04-30 21:54:48 +02:00
cloudhead
a9e3a53d2b
build: Don't add trailing slash
2024-04-29 13:17:15 +02:00
cloudhead
97b1a5de53
build: Move/rename build steps
2024-04-29 11:14:09 +02:00
cloudhead
5f1657484f
build: Add "upload" build step
2024-04-29 10:47:03 +02:00
cloudhead
cd2884a609
build: Adjust folder structure
...
This allows for simply extracting into $PATH.
2024-04-25 17:15:58 +02:00
cloudhead
9fe5a8922f
build: Update to zig 0.12.0, add `rad-web`
2024-04-23 10:59:33 +02:00
cloudhead
95b5191533
Reproducible cross-compiled builds
...
Implement a new build pipeline using `podman` and `zig` that is
reproducible and can be run entirely on linux.
We also simplify the versioning system, defaulting to the output of `git
describe` when there are no exact tag matches.
2024-04-20 11:11:00 +02:00