Files
simplex-chat/scripts/ci/desktop-linux/build-backend.sh
T
spacedandy-agents-simplex dfa87309bb ci: give the desktop test directory full-bleed letter avatars, and resolve a test SimpleX name on a local SMP server
The avatars are a two-shade gradient with a large white letter, noisy enough to stay near the size the apps make. backend.sh starts an SMP server built from the pinned simplexmq with its [NAMES] resolver on a local registry, and ci_contact claims seeded.testing for its address there; the entries' descriptions now read "CI seeded ..." so the name is also a directory search.
2026-10-15 15:31:22 +00:00

45 lines
1.4 KiB
Bash
Executable File

#!/bin/bash
# Builds the CLI, the directory service and the SMP server that the app job runs as its test backend.
# Usage: scripts/ci/desktop-linux/build-backend.sh <output .tar.gz>
# They need the server-capable configuration (no client_library), as build.yml's Linux job builds the CLI.
# The SMP server, which resolves the test's SimpleX names, comes from a clone of the simplexmq commit that
# cabal.project pins: cabal builds only the libraries of a source-repository-package.
set -euo pipefail
mkdir -p "$(dirname "$1")"
out="$(cd "$(dirname "$1")" && pwd)/$(basename "$1")"
ghc --version
cabal --version
du -sh ~/.cabal/store dist-newstyle 2> /dev/null || true
cat > cabal.project.local << EOF
ignore-project: False
jobs: \$ncpus
package direct-sqlcipher
flags: +openssl
EOF
cabal build exe:simplex-chat exe:simplex-directory-service
simplexmq_tag=$(sed -n '/simplex-chat\/simplexmq.git/{n;s/^ *tag: *//p}' cabal.project)
smq=$(mktemp -d)
git -C "$smq" init -q
git -C "$smq" fetch -q --depth 1 https://github.com/simplex-chat/simplexmq.git "$simplexmq_tag"
git -C "$smq" checkout -q FETCH_HEAD
cp cabal.project.local "$smq"
(cd "$smq" && cabal build exe:smp-server)
pkg=$(mktemp -d)
for exe in simplex-chat simplex-directory-service; do
cp "$(cabal list-bin "exe:$exe")" "$pkg"
done
cp "$(cd "$smq" && cabal list-bin exe:smp-server)" "$pkg"
ldd "$pkg"/*
tar -C "$pkg" -czf "$out" .
ls -la "$out"