Initial commit: docker compose config
Release Docker multi arch / docker (push) Has been cancelled
Test Install Script / Test Script Syntax (push) Has been cancelled
Test Install Script / Test on almalinux-10 (default) (push) Has been cancelled
Test Install Script / Test on almalinux-10 (root) (push) Has been cancelled
Test Install Script / Test on almalinux-8 (default) (push) Has been cancelled
Test Install Script / Test on almalinux-8 (root) (push) Has been cancelled
Test Install Script / Test on almalinux-9 (default) (push) Has been cancelled
Test Install Script / Test on almalinux-9 (root) (push) Has been cancelled
Test Install Script / Test on amazonlinux-2 (default) (push) Has been cancelled
Test Install Script / Test on amazonlinux-2 (root) (push) Has been cancelled
Test Install Script / Test on debian-11 (default) (push) Has been cancelled
Test Install Script / Test on debian-11 (root) (push) Has been cancelled
Test Install Script / Test on debian-12 (default) (push) Has been cancelled
Test Install Script / Test on debian-12 (root) (push) Has been cancelled
Test Install Script / Test on debian-13 (default) (push) Has been cancelled
Test Install Script / Test on debian-13 (root) (push) Has been cancelled
Test Install Script / Test on fedora-latest (default) (push) Has been cancelled
Test Install Script / Test on fedora-latest (root) (push) Has been cancelled
Test Install Script / Test on rocky-10 (default) (push) Has been cancelled
Test Install Script / Test on rocky-10 (root) (push) Has been cancelled
Test Install Script / Test on rocky-8 (default) (push) Has been cancelled
Test Install Script / Test on rocky-8 (root) (push) Has been cancelled
Test Install Script / Test on rocky-9 (default) (push) Has been cancelled
Test Install Script / Test on rocky-9 (root) (push) Has been cancelled
Test Install Script / Test on ubuntu-22.04 (default) (push) Has been cancelled
Test Install Script / Test on ubuntu-22.04 (root) (push) Has been cancelled
Test Install Script / Test on ubuntu-24.04 (default) (push) Has been cancelled
Test Install Script / Test on ubuntu-24.04 (root) (push) Has been cancelled

This commit is contained in:
2026-05-30 12:07:11 +00:00
commit 616c6b1c62
381 changed files with 55145 additions and 0 deletions
+66
View File
@@ -0,0 +1,66 @@
name: Release Docker multi arch
on:
push:
branches:
- master
tags:
- "**"
concurrency:
group: docker-build-${{ github.ref }}
cancel-in-progress: false
jobs:
docker:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set lower case repository name
run: |
echo "REG_REPO=${REPO,,}" >>${GITHUB_ENV}
env:
REPO: "${{ github.repository }}"
- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/${{ env.REG_REPO }}
tags: |
type=raw,value=master,enable=${{ github.ref == format('refs/heads/{0}', 'master') }}
type=ref,event=tag
type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/') }}
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha,scope=${{ github.workflow }}
cache-to: type=gha,mode=max,scope=${{ github.workflow }}
+122
View File
@@ -0,0 +1,122 @@
name: Test Install Script
on:
push:
branches:
- master
paths:
- "installTorrServerLinux.sh"
- ".github/workflows/test-install-script.yml"
- ".github/scripts/test-install-script.sh"
pull_request:
branches:
- master
paths:
- "installTorrServerLinux.sh"
- ".github/workflows/test-install-script.yml"
- ".github/scripts/test-install-script.sh"
workflow_dispatch:
# OSes that require version 135 due to glibc < 2.32
# Version 136+ requires glibc >= 2.32
env:
GLIBC_LIMITED_OSES: "debian-11|almalinux-8|rocky-8|amazonlinux-2"
MAX_RETRIES: "3"
RETRY_DELAY: "60"
jobs:
test-script-syntax:
name: Test Script Syntax
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Test script syntax
run: |
chmod +x installTorrServerLinux.sh
bash -n installTorrServerLinux.sh
echo "✓ Script syntax is valid"
- name: Test help command
run: |
./installTorrServerLinux.sh --help > /dev/null
./installTorrServerLinux.sh help > /dev/null
echo "✓ Help command works"
test-install-script:
name: Test on ${{ matrix.os }} (${{ matrix.test-user }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os:
- ubuntu-22.04
- ubuntu-24.04
- debian-11
- debian-12
- debian-13
- fedora-latest
- almalinux-8
- almalinux-9
- almalinux-10
- rocky-8
- rocky-9
- rocky-10
- amazonlinux-2
test-user: [root, default]
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Get Docker image for OS
id: get-image
run: |
# Map OS to Docker image
case "${{ matrix.os }}" in
ubuntu-22.04) IMAGE="ubuntu:22.04" ;;
ubuntu-24.04) IMAGE="ubuntu:24.04" ;;
debian-11) IMAGE="debian:11" ;;
debian-12) IMAGE="debian:12" ;;
debian-13) IMAGE="debian:13" ;;
fedora-latest) IMAGE="fedora:latest" ;;
almalinux-8) IMAGE="almalinux:8" ;;
almalinux-9) IMAGE="almalinux:9" ;;
almalinux-10) IMAGE="almalinux:10" ;;
rocky-8) IMAGE="rockylinux/rockylinux:8" ;;
rocky-9) IMAGE="rockylinux/rockylinux:9" ;;
rocky-10) IMAGE="rockylinux/rockylinux:10" ;;
amazonlinux-2) IMAGE="amazonlinux:2" ;;
*)
echo "Warning: Unknown OS ${{ matrix.os }}, using ubuntu:22.04 as default"
IMAGE="ubuntu:22.04"
;;
esac
echo "image=$IMAGE" >> $GITHUB_OUTPUT
echo "Using Docker image: $IMAGE for OS: ${{ matrix.os }}"
- name: Run tests in container
run: |
docker run --rm \
-v "$PWD:/workspace" \
-w /workspace \
--privileged \
-e MATRIX_OS="${{ matrix.os }}" \
-e TEST_USER="${{ matrix.test-user }}" \
-e GLIBC_LIMITED_OSES="${{ env.GLIBC_LIMITED_OSES }}" \
-e MAX_RETRIES="${{ env.MAX_RETRIES }}" \
-e RETRY_DELAY="${{ env.RETRY_DELAY }}" \
"${{ steps.get-image.outputs.image }}" \
bash -c "
set -e
# Make test script executable
chmod +x .github/scripts/test-install-script.sh
# Run the test script
.github/scripts/test-install-script.sh
"
+121
View File
@@ -0,0 +1,121 @@
name: Build and Release
on:
push:
tags:
- '*'
jobs:
build:
runs-on: ubuntu-22.04
env:
NODE_OPTIONS: --openssl-legacy-provider
strategy:
matrix:
include:
- go_version: 'stable'
group: 'standard'
- go_version: '1.25'
group: 'android'
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go_version }}
cache: true
- name: Set version from tag
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- name: Install Swag
run: go install github.com/swaggo/swag/cmd/swag@latest
- name: Build Web and Docs
if: matrix.group == 'standard'
run: |
go run gen_web.go
cd server && ~/go/bin/swag init -g web/server.go
- name: Build Standard Platforms
if: matrix.group == 'standard'
run: |
LDFLAGS="-s -w -checklinkname=0 -X server/version.Version=${{ env.VERSION }}"
mkdir -p "${{ github.workspace }}/dist"
cd server
# Linux
GOOS=linux GOARCH=amd64 go build -ldflags="$LDFLAGS" -tags=nosqlite -trimpath -o "${{ github.workspace }}/dist/TorrServer-linux-amd64" ./cmd
GOOS=linux GOARCH=arm64 go build -ldflags="$LDFLAGS" -tags=nosqlite -trimpath -o "${{ github.workspace }}/dist/TorrServer-linux-arm64" ./cmd
GOOS=linux GOARCH=arm GOARM=7 go build -ldflags="$LDFLAGS" -tags=nosqlite -trimpath -o "${{ github.workspace }}/dist/TorrServer-linux-arm7" ./cmd
GOOS=linux GOARCH=arm GOARM=5 go build -ldflags="$LDFLAGS" -tags=nosqlite -trimpath -o "${{ github.workspace }}/dist/TorrServer-linux-arm5" ./cmd
GOOS=linux GOARCH=386 go build -ldflags="$LDFLAGS" -tags=nosqlite -trimpath -o "${{ github.workspace }}/dist/TorrServer-linux-386" ./cmd
# Windows
GOOS=windows GOARCH=amd64 go build -ldflags="$LDFLAGS" -tags=nosqlite -trimpath -o "${{ github.workspace }}/dist/TorrServer-windows-amd64.exe" ./cmd
GOOS=windows GOARCH=386 go build -ldflags="$LDFLAGS" -tags=nosqlite -trimpath -o "${{ github.workspace }}/dist/TorrServer-windows-386.exe" ./cmd
# Darwin
GOOS=darwin GOARCH=amd64 go build -ldflags="$LDFLAGS" -tags=nosqlite -trimpath -o "${{ github.workspace }}/dist/TorrServer-darwin-amd64" ./cmd
GOOS=darwin GOARCH=arm64 go build -ldflags="$LDFLAGS" -tags=nosqlite -trimpath -o "${{ github.workspace }}/dist/TorrServer-darwin-arm64" ./cmd
# FreeBSD
GOOS=freebsd GOARCH=amd64 go build -ldflags="$LDFLAGS" -tags=nosqlite -trimpath -o "${{ github.workspace }}/dist/TorrServer-freebsd-amd64" ./cmd
GOOS=freebsd GOARCH=arm GOARM=7 go build -ldflags="$LDFLAGS" -tags=nosqlite -trimpath -o "${{ github.workspace }}/dist/TorrServer-freebsd-arm7" ./cmd
# MIPS
GOOS=linux GOARCH=mips GOMIPS=softfloat go build -ldflags="$LDFLAGS" -tags=nosqlite -trimpath -o "${{ github.workspace }}/dist/TorrServer-linux-mips" ./cmd
GOOS=linux GOARCH=mipsle GOMIPS=softfloat go build -ldflags="$LDFLAGS" -tags=nosqlite -trimpath -o "${{ github.workspace }}/dist/TorrServer-linux-mipsle" ./cmd
GOOS=linux GOARCH=mips64 GOMIPS64=softfloat go build -ldflags="$LDFLAGS" -tags=nosqlite -trimpath -o "${{ github.workspace }}/dist/TorrServer-linux-mips64" ./cmd
GOOS=linux GOARCH=mips64le GOMIPS64=softfloat go build -ldflags="$LDFLAGS" -tags=nosqlite -trimpath -o "${{ github.workspace }}/dist/TorrServer-linux-mips64le" ./cmd
GOOS=linux GOARCH=riscv64 go build -ldflags="$LDFLAGS" -tags=nosqlite -trimpath -o "${{ github.workspace }}/dist/TorrServer-linux-riscv64" ./cmd
- name: Build Android (Go 1.25)
if: matrix.group == 'android'
run: |
go run gen_web.go
LDFLAGS="-s -w -checklinkname=0 -X server/version.Version=${{ env.VERSION }}"
mkdir -p "${{ github.workspace }}/dist"
export NDK_TOOLCHAIN="$ANDROID_NDK_LATEST_HOME/toolchains/llvm/prebuilt/linux-x86_64"
cd server
CC=$NDK_TOOLCHAIN/bin/armv7a-linux-androideabi21-clang CGO_ENABLED=1 GOOS=android GOARCH=arm GOARM=7 go build -ldflags="$LDFLAGS" -tags=nosqlite -trimpath -o "${{ github.workspace }}/dist/TorrServer-android-arm7" ./cmd
CC=$NDK_TOOLCHAIN/bin/aarch64-linux-android21-clang CGO_ENABLED=1 GOOS=android GOARCH=arm64 go build -ldflags="$LDFLAGS" -tags=nosqlite -trimpath -o "${{ github.workspace }}/dist/TorrServer-android-arm64" ./cmd
CC=$NDK_TOOLCHAIN/bin/i686-linux-android21-clang CGO_ENABLED=1 GOOS=android GOARCH=386 go build -ldflags="$LDFLAGS" -tags=nosqlite -trimpath -o "${{ github.workspace }}/dist/TorrServer-android-386" ./cmd
CC=$NDK_TOOLCHAIN/bin/x86_64-linux-android21-clang CGO_ENABLED=1 GOOS=android GOARCH=amd64 go build -ldflags="$LDFLAGS" -tags=nosqlite -trimpath -o "${{ github.workspace }}/dist/TorrServer-android-amd64" ./cmd
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: binaries-${{ matrix.group }}
path: ${{ github.workspace }}/dist/*
release:
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: ./all-dist
merge-multiple: true
- name: Debug - List files
run: |
echo "Listing files to be uploaded:"
ls -R ./all-dist
- name: Create Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: ./all-dist/*
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}