separate/organized workflows; fix lints.
authorShane Jaroch <chown_tee@proton.me>
Sat, 17 Jan 2026 08:24:56 +0000 (03:24 -0500)
committerShane Jaroch <chown_tee@proton.me>
Sat, 17 Jan 2026 08:24:56 +0000 (03:24 -0500)
.github/workflows/compatibility.yaml
.github/workflows/install.yml [copied from .github/workflows/lint.yaml with 77% similarity]
.github/workflows/lint.yaml
.github/workflows/termux-android.yml [deleted file]
install.sh
tests/installer-test-logic.sh

index f0fc56e91cc8e7d07af10be9a33e3c1573da6b6e..c9ea0e9b543bac0c16ecbd03308f0221eb67e295 100644 (file)
@@ -1,20 +1,21 @@
-name: Compatibility
+---
+name: compat
 
 on:
-  push:
   pull_request:
   schedule:
     - cron: "0 0 * * 0" # Weekly on Sundays
 
 jobs:
-  # Test across different Ubuntu versions to verify git compatibility
   git-versions:
     name: Git Compatibility (${{ matrix.os }})
     runs-on: ${{ matrix.os }}
+
     strategy:
       fail-fast: false
       matrix:
         os: [ubuntu-20.04, ubuntu-22.04, ubuntu-latest]
+
     steps:
       - uses: actions/checkout@v4
       - name: Install dependencies
@@ -24,10 +25,10 @@ jobs:
       - name: Run Tests
         run: make test
 
-  # Verify generated shell completions are actually valid syntax in their respective shells
   shell-syntax:
     name: Shell Completion Syntax
     runs-on: ubuntu-latest
+
     steps:
       - uses: actions/checkout@v4
       - name: Install Shells
similarity index 77%
copy from .github/workflows/lint.yaml
copy to .github/workflows/install.yml
index 162f64efc5b1394c60793f9addfce08ba82b289c..2672054384a42afe1ee6ef8743cbb1c17a716f1e 100644 (file)
@@ -1,7 +1,7 @@
 ---
-name: lint
+name: install
 
-"on":
+on:
   push:
   workflow_dispatch:
     inputs:
@@ -89,29 +89,26 @@ jobs:
       - name: Verify [make check/install]
         run: make check/install
 
-  # Lint job
-  lint:
+  # Handles Termux (Android shell)
+  termux-android:
     runs-on: ubuntu-latest
+
     steps:
       - uses: actions/checkout@v4
 
-      - name: Install ShellCheck
-        run: sudo apt-get update && sudo apt-get install -y shellcheck
-
-      - name: Lint [make lint]
-        run: make lint
-
-      - name: Check Formatting [make format]
-        # Requires shfmt and black.
-        # Assuming environment has them or we install them.
-        # ubuntu-latest has python3, we need shfmt.
-        run: |
-          sudo snap install shfmt
-          pip3 install black
-          make format
-          git diff --exit-code
+      - name: Fix permissions for Docker
+        run: chmod -R u+rwX,go+rX .
 
-      - name: Check Generation [make generate]
+      - name: Run tests in Termux
         run: |
-          make generate
-          git diff --exit-code
+          docker run --rm \
+            -v "$PWD":/app \
+            -w /app \
+            termux/termux-docker:latest \
+            /system/bin/sh -c "export PATH=/data/data/com.termux/files/usr/bin:\$PATH; \
+            apt-get update && \
+            apt-get install -y git make bash python man && \
+            pip install docutils && \
+            make install && \
+            make check/install && \
+            git-remote-gcrypt --version"
index 162f64efc5b1394c60793f9addfce08ba82b289c..a3473957ef3ea8202811af0bc034dca516509eb4 100644 (file)
@@ -13,83 +13,7 @@ name: lint
   schedule:
     - cron: "0 0 * * 0" # Sunday at 12 AM
 
-permissions:
-  contents: read
-
 jobs:
-  # Handles Ubuntu and macOS
-  install-unix:
-    runs-on: ${{ matrix.os }}
-
-    env:
-      GCRYPT_DEBUG: ${{ inputs.debug && '1' || '' }}
-
-    strategy:
-      fail-fast: false
-      matrix:
-        os: [ubuntu-latest, macos-latest]
-
-    steps:
-      - uses: actions/checkout@v4
-
-      - name: Dependencies (Linux)
-        if: runner.os == 'Linux'
-        run: sudo apt-get update && sudo apt-get install -y git python3-docutils
-
-      - name: Dependencies (macOS)
-        if: runner.os == 'macOS'
-        run: brew install coreutils python3 git docutils
-
-      - name: Help [make]
-        run: make
-
-      - name: Test Installer
-        run: bash ./tests/installer-test-logic.sh
-
-      - name: Install [make install]
-        run: sudo make install
-
-      - name: Verify [make check/install]
-        run: make check/install
-
-  # Handles RedHat (UBI Container)
-  install-rh:
-    runs-on: ubuntu-latest
-
-    env:
-      GCRYPT_DEBUG: ${{ inputs.debug && '1' || '' }}
-
-    container:
-      image: registry.access.redhat.com/ubi9/ubi:latest
-
-    steps:
-      - uses: actions/checkout@v4
-
-      # dnf is slow in containers. We cache the dnf cache directory.
-      - name: Cache DNF
-        uses: actions/cache@v4
-        with:
-          path: /var/cache/dnf
-          key: ${{ runner.os }}-ubi9-dnf-v1
-          restore-keys: |
-            ${{ runner.os }}-ubi9-dnf-
-
-      - name: Dependencies [redhat]
-        run: dnf install -y git python3-docutils make man-db
-
-      - name: Help [make]
-        run: make
-
-      - name: Test Installer
-        run: bash ./tests/installer-test-logic.sh
-
-      - name: Install [make install]
-        run: make install # container runs as sudo
-
-      - name: Verify [make check/install]
-        run: make check/install
-
-  # Lint job
   lint:
     runs-on: ubuntu-latest
     steps:
diff --git a/.github/workflows/termux-android.yml b/.github/workflows/termux-android.yml
deleted file mode 100644 (file)
index 465f904..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
----
-name: Termux
-
-"on":
-  push:
-  schedule:
-    - cron: "0 0 * * 0" # Sunday at 12 AM
-
-jobs:
-  test:
-    runs-on: ubuntu-latest
-
-    steps:
-      - uses: actions/checkout@v4
-
-      - name: Fix permissions for Docker
-        run: chmod -R u+rwX,go+rX .
-
-      - name: Run tests in Termux
-        run: |
-          docker run --rm \
-            -v "$PWD":/app \
-            -w /app \
-            termux/termux-docker:latest \
-            /system/bin/sh -c "export PATH=/data/data/com.termux/files/usr/bin:\$PATH; \
-            apt-get update && \
-            apt-get install -y git make bash python man && \
-            pip install docutils && \
-            make install && \
-            make check/install && \
-            git-remote-gcrypt --version"
index db7d3639cbc28e6b4054dfc61d63c0e6978516be..6599d4121890a33c3538a0c7fe6fb6d53175833b 100755 (executable)
@@ -3,7 +3,7 @@ set -e
 
 # Auto-detect Termux: if /usr/local doesn't exist but $PREFIX does (Android/Termux)
 if [ -z "${prefix:-}" ]; then
-       if [ -d /usr/local ]; then
+       if [ -d "${_USR_LOCAL:-/usr/local}" ]; then
                prefix=/usr/local
        elif [ -n "${PREFIX:-}" ] && [ -d "$PREFIX" ]; then
                # Termux sets $PREFIX to /data/data/com.termux/files/usr
index 9bb21b061591c9936115f1abf6dfec2cf5debf6f..73b6673dc98b59d6c2026c4ac590f69b3614cb8f 100755 (executable)
@@ -214,16 +214,9 @@ mkdir -p "$TERMUX_PREFIX/share/man/man1"
 unset prefix
 unset DESTDIR
 
-# Mock /usr/local as nonexistent by using a wrapper that interprets [ -d /usr/local ]
-# Since we can't truly hide /usr/local, we modify the installer call to point elsewhere
-# We copy the installer (breaking symlink) and patch it to check a nonexistent path instead of /usr/local
-
-rm -f "$INSTALLER"
-sed 's|/usr/local|/non/existent/path|g' "$REPO_ROOT/install.sh" >"$INSTALLER"
-chmod +x "$INSTALLER"
-
 # Run with PREFIX set but explicit prefix unset
-if PREFIX="$TERMUX_PREFIX" bash "$INSTALLER" >.install_log 2>&1; then
+# Mock /usr/local via _USR_LOCAL override
+if _USR_LOCAL="/non/existent/path" PREFIX="$TERMUX_PREFIX" bash "$INSTALLER" >.install_log 2>&1; then
        if [ -f "$TERMUX_PREFIX/bin/git-remote-gcrypt" ]; then
                printf "  ✓ %s\n" "Termux PREFIX auto-detection works"
        else