Bring back FreeBSD build, remove 0-value caching during builds

This commit is contained in:
Zef Hemel
2026-07-30 10:11:32 +02:00
parent a745775ae6
commit da37389651
4 changed files with 15 additions and 47 deletions
+7 -41
View File
@@ -5,11 +5,6 @@ on:
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
# sccache caches compiled objects across Cargo.lock changes (rust-cache alone
# invalidates fully on dep changes). Valuable here: each job compiles several
# release targets.
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: sccache
jobs:
build-linux:
@@ -34,24 +29,10 @@ jobs:
- uses: Swatinem/rust-cache@v2
with:
key: linux-cross
- name: Setup sccache
uses: mozilla-actions/sccache-action@v0.0.10
# GHA Cache occasionally returns Azure edge errors; if the sccache daemon
# can't reach the backend it refuses to start, failing every rustc call.
# Probe once and disable for this job on outage — a slow build beats a
# failed release.
- name: Probe sccache backend, disable on outage
shell: bash
run: |
if sccache --start-server; then
echo "sccache backend reachable"
else
echo "::warning::sccache backend unreachable — disabling for this job"
echo "RUSTC_WRAPPER=" >> "$GITHUB_ENV"
echo "SCCACHE_GHA_ENABLED=false" >> "$GITHUB_ENV"
fi
# GHA scopes cache *writes* to the creating ref, so entries written by
# a tag run are never readable again — they only evict main's under the
# 10 GB repo cap. Tag runs still restore from the default branch.
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: Install cross-toolchains
run: |
@@ -69,10 +50,7 @@ jobs:
- name: Build linux/windows binaries (compile once → raw + zips)
run: make build-linux-ci
- name: Build FreeBSD sb CLI
# FreeBSD cross is fiddly (clang + sysroot): this step fetches a FreeBSD
# base sysroot and cross-builds the `sb` CLI against it. It's a
# first-class build like the others — a failure here fails the job.
- name: Build FreeBSD server + sb CLI
run: |
sudo mkdir -p /opt/freebsd-sysroot
VER=$(curl -fsSL https://download.freebsd.org/releases/amd64/ \
@@ -80,6 +58,7 @@ jobs:
echo "Latest FreeBSD release: $VER"
curl -fsSL "https://download.freebsd.org/releases/amd64/$VER/base.txz" \
| sudo tar -xJf - -C /opt/freebsd-sysroot ./lib ./usr/lib ./usr/include
make build-server-releases-freebsd
make build-cli-releases-freebsd
- name: Upload release zips (linux/windows/freebsd)
@@ -121,20 +100,7 @@ jobs:
- uses: Swatinem/rust-cache@v2
with:
key: macos
- name: Setup sccache
uses: mozilla-actions/sccache-action@v0.0.10
- name: Probe sccache backend, disable on outage
shell: bash
run: |
if sccache --start-server; then
echo "sccache backend reachable"
else
echo "::warning::sccache backend unreachable — disabling for this job"
echo "RUSTC_WRAPPER=" >> "$GITHUB_ENV"
echo "SCCACHE_GHA_ENABLED=false" >> "$GITHUB_ENV"
fi
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: Install npm dependencies
run: npm ci
+2 -4
View File
@@ -120,6 +120,7 @@ jobs:
- uses: Swatinem/rust-cache@v2
with:
key: e2e-debug
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: Install dependencies
run: npm ci
@@ -164,6 +165,7 @@ jobs:
- uses: Swatinem/rust-cache@v2
with:
key: e2e-release
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: Install dependencies
run: npm ci
@@ -345,8 +347,6 @@ jobs:
provenance: false
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: "Runtime API: Extract metadata"
id: rc_meta
@@ -372,8 +372,6 @@ jobs:
BASE_IMAGE=ghcr.io/${{ env.NAMESPACE_GITHUB }}/${{ env.IMAGE_NAME }}:${{ steps.meta.outputs.version }}
tags: ${{ steps.rc_meta.outputs.tags }}
labels: ${{ steps.rc_meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
docker-website:
needs: [config, docker]
+5 -1
View File
@@ -1,4 +1,4 @@
.PHONY: build build-e2e build-for-docker build-linux-ci docker build-server-releases build-server-releases-macos build-cli-releases-rust build-cli-releases-freebsd build-cli-releases-rust-macos clean check fmt test test-e2e test-e2e-release bench generate website install uninstall bundle build-rs build-rs-cli run-rs
.PHONY: build build-e2e build-for-docker build-linux-ci docker build-server-releases build-server-releases-macos build-server-releases-freebsd build-cli-releases-rust build-cli-releases-freebsd build-cli-releases-rust-macos clean check fmt test test-e2e test-e2e-release bench generate website install uninstall bundle build-rs build-rs-cli run-rs
build:
npm run build
@@ -86,6 +86,10 @@ build-server-releases-macos:
cargo build --release -p silverbullet --target x86_64-apple-darwin
cp target/x86_64-apple-darwin/release/silverbullet silverbullet && zip silverbullet-server-darwin-x86_64.zip silverbullet && rm silverbullet
build-server-releases-freebsd:
cargo build --release -p silverbullet --target x86_64-unknown-freebsd
cp target/x86_64-unknown-freebsd/release/silverbullet silverbullet && zip silverbullet-server-freebsd-x86_64.zip silverbullet && rm silverbullet
# --- Rust standalone server binary (bin/silverbullet) -----------------------
build-rs:
npm run build
+1 -1
View File
@@ -3,7 +3,7 @@ An attempt at documenting the changes/new features introduced in each release.
## Edge
Whenever a commit is pushed to the `main` branch, within ~5 minutes, it will be released as a docker image with the `:v2` tag, and a binary in the [edge release](https://github.com/silverbulletmd/silverbullet/releases/tag/edge). If you want to live on the bleeding edge of SilverBullet goodness (or regression) this is where to do it.
* Nothing new since 2.10 yet...
* Fix: the FreeBSD **server** binary is being built and released again
## 2.10.0
* [[Space Manager]]: multi-space hosting with multiple accounts is here. A fresh install pointed at an empty folder opens a browser-based first-run **setup wizard** that creates an admin account and your first space, then serves it in place with no restart. One server can host any number of [[Space|spaces]], each bound to a URL prefix or hostname.