Skip to content

test new build form factor #27

test new build form factor

test new build form factor #27

Workflow file for this run

name: Build AudioTTo Multi-Platform
on:
push:
branches: [ "main", "master" ]
workflow_dispatch:
jobs:
build:
name: Build on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
artifact_name: AudioTTo_Linux
- os: macos-latest
artifact_name: AudioTTo_MacOS
- os: windows-latest
artifact_name: AudioTTo_Windows
steps:
- name: Checkout Code
uses: actions/checkout@v4
# ---------- LINUX DEPENDENCIES (GTK + WEBKIT) ----------
- name: Install Linux System Dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y \
libgtk-3-dev \
libwebkit2gtk-4.1-dev \
libgirepository1.0-dev \
libcairo2-dev \
pkg-config \
python3-gi \
python3-gi-cairo \
gir1.2-gtk-3.0 \
gir1.2-webkit2-4.1
# ---------- PYTHON ----------
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'pip'
- name: Install Python Dependencies
shell: bash
run: |
python -m pip install --upgrade pip
pip install pyinstaller
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Create bin directory
run: mkdir -p bin
# ---------- FFMPEG LINUX ----------
- name: Download FFmpeg (Linux)
if: runner.os == 'Linux'
run: |
wget https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz
tar -xf ffmpeg-release-amd64-static.tar.xz
mv ffmpeg-*-amd64-static/ffmpeg bin/
mv ffmpeg-*-amd64-static/ffprobe bin/
chmod +x bin/ffmpeg bin/ffprobe
# ---------- FFMPEG MACOS ----------
- name: Download FFmpeg (macOS)
if: runner.os == 'macOS'
run: |
curl -L -o ffmpeg.zip https://evermeet.cx/pub/ffmpeg/ffmpeg-7.1.zip
curl -L -o ffprobe.zip https://evermeet.cx/pub/ffprobe/ffprobe-7.1.zip
unzip -o ffmpeg.zip
unzip -o ffprobe.zip
mv ffmpeg bin/
mv ffprobe bin/
chmod +x bin/ffmpeg bin/ffprobe
ls -l bin/
# ---------- FFMPEG WINDOWS (ROBUST FIX) ----------
- name: Download FFmpeg (Windows)
if: runner.os == 'Windows'
shell: powershell
run: |
Invoke-WebRequest `
-Uri "https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-essentials.zip" `
-OutFile "ffmpeg.zip"
Expand-Archive -Path "ffmpeg.zip" -DestinationPath "ffmpeg"
$ffmpegExe = Get-ChildItem -Recurse -Filter ffmpeg.exe | Select-Object -First 1
$ffprobeExe = Get-ChildItem -Recurse -Filter ffprobe.exe | Select-Object -First 1
if (-not $ffmpegExe -or -not $ffprobeExe) {
Write-Error "FFmpeg binaries not found"
exit 1
}
Move-Item $ffmpegExe.FullName bin\ffmpeg.exe
Move-Item $ffprobeExe.FullName bin\ffprobe.exe
Get-ChildItem bin
# ---------- BUILD ----------
- name: Build with PyInstaller
run: pyinstaller build.spec
# ---------- UPLOAD ----------
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact_name }}
path: dist/AudioTTo