]> tinc-vpn.org Git - tinc/commitdiff
Use muon packaged by distributions
authorGuus Sliepen <guus@tinc-vpn.org>
Sat, 4 Apr 2026 15:35:43 +0000 (17:35 +0200)
committerGuus Sliepen <guus@tinc-vpn.org>
Sat, 4 Apr 2026 15:35:43 +0000 (17:35 +0200)
Alpine and Debian have muon packages nowadays. Use an Alpine image in the
CI pipeline for testing muon.

.ci/deps.sh
.ci/muon/run.sh
.github/workflows/test.yml

index debb3d449bc48f7bdda18c09d0f6ffad24385f40..e57231a7f59f86af97e72c31cd3db004e915011f 100755 (executable)
@@ -9,7 +9,8 @@ deps_linux_alpine() {
 
   apk add \
     git pkgconf gcc linux-headers shadow sudo libgcrypt-dev gzip \
-    openssl-dev zlib-dev lzo-dev ncurses-dev readline-dev musl-dev lz4-dev vde2-dev cmocka-dev
+    openssl-dev zlib-dev lzo-dev ncurses-dev readline-dev musl-dev lz4-dev vde2-dev cmocka-dev \
+    "$@"
 
   if [ -z "$SKIP_MESON" ]; then
     apk add meson
index 1fcaa69435bf89312b7b432624c4e80b953820e7..c2a742131847e61c303bf3c0924ac34cd7aa6a6d 100755 (executable)
@@ -5,54 +5,19 @@
 #   samurai (a C reimplementation of the ninja build tool),
 # and then use both to build tinc.
 
-set -euo pipefail
-
-git_samurai=https://github.com/michaelforney/samurai
-git_muon=https://git.sr.ht/~lattis/muon
-prefix=/opt/tinc_muon
-
-header() {
-  echo >&2 '################################################################################'
-  echo >&2 "# $*"
-  echo >&2 '################################################################################'
-}
-
-header 'Try to make sure Python is missing'
-python --version && exit 1
-python3 --version && exit 1
-
-header 'Fetch and build samurai'
-
-git clone --depth=1 $git_samurai ~/samurai
-pushd ~/samurai
-make -j"$(nproc)"
-make install
-popd
-
-header 'Fetch and build muon'
-
-git clone --depth=1 $git_muon ~/muon
-pushd ~/muon
-./bootstrap.sh build
-./build/muon-bootstrap setup build
-./build/muon-bootstrap -C build samu
-./build/muon -C build install
-popd
-
-header 'Setup build directory'
-muon setup -D prefix=$prefix -D systemd=disabled build_muon
-samu -C build_muon
-
-header 'Install tinc'
-muon -C build_muon install
-
-header 'Run smoke tests'
-$prefix/sbin/tinc --version
-$prefix/sbin/tincd --version
-$prefix/sbin/tinc -c /tmp/muon_node <<EOF
-init muon
-set DeviceType dummy
-set Address localhost
-set Port 0
-start
-EOF
+set -eux
+
+dir="${1:-build_muon}"
+shift
+
+if muon version >/dev/null; then
+  MUON=muon
+elif muon-meson version >/dev/null; then
+  MUON=muon-meson
+else
+  echo 'Muon not found' >&2
+  exit 1
+fi
+
+$MUON setup "$dir"
+$MUON -C "$dir" test basic.py
index f3fb2ee2e871168eb91e0af1b78269cf3d5628d7..57edefa0ac82af6072d3730b0d19963fffc5dcc5 100644 (file)
@@ -61,7 +61,7 @@ jobs:
     runs-on: ubuntu-24.04
     timeout-minutes: 20
     container:
-      image: debian:stable-slim
+      image: alpine:latest
       env:
         CI: 1
 
@@ -70,7 +70,7 @@ jobs:
         uses: actions/checkout@v6
 
       - name: Install dependencies
-        run: SKIP_MESON=1 .ci/deps.sh libpkgconf-dev
+        run: SKIP_MESON=1 .ci/deps.sh muon
 
       - name: Compatibility with muon
         run: .ci/muon/run.sh