mirror of
https://github.com/PR0M3TH3AN/VoxVera.git
synced 2026-10-27 09:40:40 +00:00
- Improved Tor handling in ci/test-e2e.sh to coexist with system Tor. - Increased OnionShare URL detection timeout to 120s with better logging. - Added 5-attempt retry logic for Tor reachability verification. - Added timeout-minutes to all CI/CD workflows to prevent hangs. - Standardized installation and path handling in E2E script.
127 lines
3.9 KiB
YAML
127 lines
3.9 KiB
YAML
name: Build Standalone Binaries
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
name: Build for ${{ matrix.os }}
|
|
runs-on: ${{ matrix.os }}
|
|
timeout-minutes: 60
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
include:
|
|
- os: ubuntu-latest
|
|
artifact_name: voxvera-linux
|
|
- os: windows-latest
|
|
artifact_name: voxvera-windows.exe
|
|
- os: macos-latest
|
|
artifact_name: voxvera-macos
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.12'
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
pip install -r requirements.txt
|
|
pip install pyinstaller
|
|
|
|
- name: Download Tor Binaries
|
|
shell: bash
|
|
run: |
|
|
chmod +x scripts/download_tor.sh
|
|
./scripts/download_tor.sh
|
|
|
|
- name: Build with PyInstaller
|
|
shell: bash
|
|
run: |
|
|
if [ "$RUNNER_OS" == "Windows" ]; then SEP=";"; else SEP=":"; fi
|
|
pyinstaller --onefile \
|
|
--add-data "voxvera/locales${SEP}voxvera/locales" \
|
|
--add-data "voxvera/src${SEP}voxvera/src" \
|
|
--add-data "voxvera/templates${SEP}voxvera/templates" \
|
|
--add-data "voxvera/resources${SEP}voxvera/resources" \
|
|
--add-data "requirements.txt${SEP}." \
|
|
--name "${{ matrix.artifact_name }}" \
|
|
voxvera/cli.py
|
|
|
|
- name: Build .deb (Linux)
|
|
if: matrix.os == 'ubuntu-latest'
|
|
run: |
|
|
mkdir -p voxvera/resources/bin
|
|
cp dist/${{ matrix.artifact_name }} voxvera/resources/bin/voxvera-linux-x86_64
|
|
chmod +x packaging/build_deb.sh
|
|
./packaging/build_deb.sh dist/${{ matrix.artifact_name }}
|
|
|
|
- name: Build AppImage (Linux)
|
|
if: matrix.os == 'ubuntu-latest'
|
|
run: |
|
|
mkdir -p voxvera/resources/bin
|
|
cp dist/${{ matrix.artifact_name }} voxvera/resources/bin/voxvera-linux-x86_64
|
|
chmod +x packaging/build_appimage.sh
|
|
./packaging/build_appimage.sh dist/${{ matrix.artifact_name }}
|
|
|
|
- name: Build Flatpak (Linux)
|
|
if: matrix.os == 'ubuntu-latest'
|
|
run: |
|
|
mkdir -p voxvera/resources/bin
|
|
cp dist/${{ matrix.artifact_name }} voxvera/resources/bin/voxvera-linux-x86_64
|
|
sudo apt-get update
|
|
sudo apt-get install -y flatpak flatpak-builder
|
|
chmod +x packaging/build_flatpak.sh
|
|
./packaging/build_flatpak.sh dist/${{ matrix.artifact_name }} || echo "Flatpak build failed"
|
|
|
|
- name: Build .dmg (macOS)
|
|
if: matrix.os == 'macos-latest'
|
|
run: |
|
|
mkdir -p voxvera/resources/bin
|
|
cp dist/${{ matrix.artifact_name }} voxvera/resources/bin/voxvera-macos-x86_64
|
|
chmod +x packaging/build_dmg.sh
|
|
./packaging/build_dmg.sh dist/${{ matrix.artifact_name }}
|
|
|
|
- name: Upload artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: binaries-${{ matrix.os }}
|
|
path: |
|
|
dist/${{ matrix.artifact_name }}
|
|
voxvera/resources/bin/*.deb
|
|
voxvera/resources/bin/*.dmg
|
|
voxvera/resources/bin/*.AppImage
|
|
voxvera/resources/bin/*.flatpak
|
|
|
|
publish:
|
|
name: Create GitHub Release
|
|
needs: build
|
|
runs-on: ubuntu-latest
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- name: Download all artifacts
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
path: artifacts
|
|
pattern: binaries-*
|
|
merge-multiple: true
|
|
|
|
- name: Release
|
|
uses: softprops/action-gh-release@v2
|
|
with:
|
|
files: |
|
|
artifacts/**/*
|
|
fail_on_unmatched_files: false
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|