aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNikolay Govorov <me@govorov.online>2026-03-22 00:29:52 +0000
committerNikolay Govorov <me@govorov.online>2026-03-22 00:47:06 +0000
commit2421a7f4923039184461cf272a473413cf018419 (patch)
treea8d38c3389c363f84ed55f23da02b86119b2b91c
parent16670925ee33f08928dc19e9b143f221075194a6 (diff)
downloadtar
tar.gz
tar.bz2
tar.lz
tar.xz
tar.zst
zip
Eliminates unnecessary rebuilds on CI (codeberg)
Diffstat
-rw-r--r--.forgejo/workflows/build.yml17+14 −3
-rw-r--r--pkg/logo.svg2+1 −1
-rwxr-xr-xtests/smoke/run-local.sh10+4 −6
3 files changed, 19 insertions, 10 deletions
diff --git a/.forgejo/workflows/build.yml b/.forgejo/workflows/build.yml
index a9b3454..6bd6b89 100644
--- a/.forgejo/workflows/build.yml
+++ b/.forgejo/workflows/build.yml
@@ -30,8 +30,6 @@ jobs:
- name: Check formatting
run: cargo fmt --all --check
- - name: Run clippy
- run: cargo clippy --all-targets --all-features -- -D warnings
build:
name: Build (${{ matrix.arch }})
@@ -54,6 +52,7 @@ jobs:
passphrase: ${{ secrets.GPG_PASSPHRASE }}
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
+ - run: cargo clippy --all-targets --all-features --release -- -D warnings
- run: cargo build --release
- run: cargo test --all-features --release --locked
@@ -90,6 +89,11 @@ jobs:
name: packages-${{ matrix.arch }}
path: dist/*
+ - uses: https://code.forgejo.org/forgejo/upload-artifact@cb8afe72b42edc798abfb8fcb556cf660d894245 # v5
+ with:
+ name: binary-${{ matrix.arch }}
+ path: target/release/recluse
+
smoke:
name: Smoke tests
runs-on: [ubuntu-24.04, x86_64]
@@ -98,8 +102,15 @@ jobs:
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
+ - uses: https://code.forgejo.org/forgejo/download-artifact@1314311ddb542af343a82d478ac786ceada4143a # v5
+ with:
+ name: binary-amd64
+ path: target/release/
+
- name: Run smoke tests against local instance
- run: ./tests/smoke/run-local.sh
+ run: |
+ chmod +x target/release/recluse
+ ./tests/smoke/run-local.sh
publish:
name: Publish nightly build
diff --git a/pkg/logo.svg b/pkg/logo.svg
index 25cd3ec..4356e61 100644
--- a/pkg/logo.svg
+++ b/pkg/logo.svg
@@ -5,7 +5,7 @@ SPDX-License-Identifier: AGPL-3.0-or-later
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
-<svg viewBox="-150 -150 800 800" xmlns="http://www.w3.org/2000/svg" fill="rgb(247, 164, 29)">
+<svg viewBox="-150 -150 800 800" xmlns="http://www.w3.org/2000/svg" fill="#00afaf">
<rect x="0" y="100" width="100" height="100"></rect>
<rect x="0" y="200" width="100" height="100"></rect>
<rect x="0" y="300" width="100" height="100"></rect>
diff --git a/tests/smoke/run-local.sh b/tests/smoke/run-local.sh
index 32193dd..313890b 100755
--- a/tests/smoke/run-local.sh
+++ b/tests/smoke/run-local.sh
@@ -2,7 +2,8 @@
# SPDX-FileCopyrightText: 2026 Nikolay Govorov <me@govorov.online>
# SPDX-License-Identifier: AGPL-3.0-or-later
-# Builds recluse, starts it in a temporary directory, runs smoke tests, cleans up.
+# Starts recluse in a temporary directory, runs smoke tests, cleans up.
+# Expects a prebuilt binary at target/release/recluse (run `cargo build --release` first).
#
# Usage:
# ./tests/smoke/run-local.sh # default port 2025
@@ -10,6 +11,7 @@
set -euo pipefail
+BIN="target/release/recluse"
PORT="${RECLUSE_PORT:-2025}"
BASE_URL="http://127.0.0.1:${PORT}"
@@ -17,10 +19,6 @@ TMPDIR="$(mktemp -d)"
LOGFILE="$TMPDIR/recluse.log"
trap 'kill "$PID" 2>/dev/null; wait "$PID" 2>/dev/null; rm -rf "$TMPDIR"' EXIT
-# Build
-echo "Building recluse..."
-cargo build --release -p recluse
-
# Write minimal config
cat > "$TMPDIR/recluse.toml" <<EOF
appname = "smoke"
@@ -49,7 +47,7 @@ mkdir -p "$TMPDIR/state"
# Start recluse
echo "Starting recluse on ${BASE_URL}..."
echo "Server log: ${LOGFILE}"
-cargo run --release -p recluse -- --config="$TMPDIR/recluse.toml" >"$LOGFILE" 2>&1 &
+"$BIN" --config="$TMPDIR/recluse.toml" >"$LOGFILE" 2>&1 &
PID=$!
# Wait for index to load (log shows "index refreshed" for each backend)