Skip to content

[fix] replace correct cmd line option for IDC level #239

[fix] replace correct cmd line option for IDC level

[fix] replace correct cmd line option for IDC level #239

Workflow file for this run

name: Build executables
on:
push:
branches: [ master, build ]
pull_request:
branches: [ master, develop ]
jobs:
build-nix:
strategy:
matrix:
os: [ ubuntu-20.04, ubuntu-22.04, macos-12, macos-14 ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Gather build version (*nix)
run: |
mkdir dist
echo "::set-env name=VERSION::$(python scripts/get_version.py)"
echo "::set-env name=ARCH::$(python scripts/get_arch.py)"
echo Building branch ${{ env.GITHUB_REF }} - version ${{ env.VERSION }} - on ${{ env.ARCH }}
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
- name: Install PySide6 apt Requirements
run: |
sudo apt update
sudo apt install libopengl0 freeglut3 freeglut3-dev libxcb-icccm4 libxkbcommon-x11-0 libxcb-xkb1 libxcb-render-util0 libxcb-randr0 libxcb-keysyms1 libxcb-image0 libxcb-shape0-dev libxcb-cursor-dev -y
if: ${{ startsWith(matrix.os, 'ubuntu') }}
- name: Install Python Dependencies
run: |
python -m pip install --upgrade pip setuptools --ignore-installed
pip install .
pip install .[develop]
- name: Grab iso-639 lists
run: |
cp $(python -c "import iso639; print(iso639.mapping.TABLE_PATH)") iso-639-3.tab
cp $(python -c "import iso639; print(iso639.mapping.MAPPING_PATH)") iso-639-3.json
- name: Build single executable
run: pyinstaller FastFlix_Nix_OneFile.spec
- name: Copy license to dist
run: |
cp docs/build-licenses.txt dist/LICENSE
- name: Test executable
run: |
chmod +x dist/FastFlix
dist/FastFlix --version
dist/FastFlix --test
- name: Archive excutables
run: |
pushd dist
7z a -mm=Deflate -mfb=258 -mpass=15 FastFlix_${{ env.VERSION }}_${{ matrix.os }}_${{ env.ARCH }}.zip *
popd
- name: Build Mac App
if : ${{ startsWith(matrix.os, 'macos') }}
run: |
python scripts/build_mac_app.py ${{ matrix.os }}
pushd dist
7z a -mm=Deflate -mfb=258 -mpass=15 FastFlix_${{ env.VERSION }}_appbundle_${{ matrix.os }}_${{ env.ARCH }}.zip FastFlix.app
popd
- name: Upload executable artifacts
uses: actions/upload-artifact@v4
with:
name: FastFlix_${{ env.VERSION }}_OUTER_DO_NOT_UPLOAD_${{ matrix.os }}_${{ env.ARCH }}
path: dist/*.zip
build-windows-2022:
runs-on: windows-2022
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Gather build version
shell: powershell
run: |
mkdir dist
New-Item -Path Env: -Name VERSION -Value $(python.exe scripts\get_version.py)
New-Item -Path Env: -Name EXACT_VERSION -Value $(python.exe scripts\get_version.py exact)
New-Item -Path Env: -Name PRODUCT_VERSION -Value $(python.exe scripts\get_version.py nsis)
echo "Building branch $env:GITHUB_REF - version $env:VERSION"
echo "::set-env name=VERSION::$env:VERSION"
echo "::set-env name=EXACT_VERSION::$env:EXACT_VERSION"
echo "::set-env name=PRODUCT_VERSION::$env:PRODUCT_VERSION"
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
- name: Install Python Dependencies
run: |
python -m pip install --upgrade pip setuptools --ignore-installed
pip install .
pip install .[develop]
- name: Grab iso-639 lists
shell: powershell
run: |
copy $(python -c "import iso639; print(iso639.mapping.TABLE_PATH)") iso-639-3.tab
copy $(python -c "import iso639; print(iso639.mapping.MAPPING_PATH)") iso-639-3.json
- name: Build single executable
shell: cmd
run: pyinstaller FastFlix_Windows_OneFile.spec
- name: Build installer executable
shell: cmd
run: pyinstaller FastFlix_Windows_Installer.spec
- uses: skymatic/code-sign-action@v1
with:
certificate: '${{ secrets.CODE_CERT_B64 }}'
password: '${{ secrets.CODE_CERT_PASS }}'
certificatesha1: '${{ secrets.CODE_CERT_THUMB }}'
description: 'FastFlix'
timestampUrl: 'http://timestamp.sectigo.com'
folder: 'dist\FastFlix'
recursive: false
- name: Package installer
shell: cmd
run: |
makensis.exe /INPUTCHARSET UTF8 /DVERSION=${{ env.EXACT_VERSION }} /DPRODUCT_VERSION=${{ env.PRODUCT_VERSION }} FastFlix.nsi
move FastFlix_installer.exe dist\FastFlix_${{ env.VERSION }}_installer.exe
- uses: skymatic/code-sign-action@v1
with:
certificate: '${{ secrets.CODE_CERT_B64 }}'
password: '${{ secrets.CODE_CERT_PASS }}'
certificatesha1: '${{ secrets.CODE_CERT_THUMB }}'
description: 'FastFlix'
timestampUrl: 'http://timestamp.sectigo.com'
folder: 'dist'
recursive: false
- name: Test executable
run: |
dist\FastFlix.exe --version
dist\FastFlix.exe --test
- name: Package single executable
shell: cmd
run: |
move dist\*.exe .
move docs\build-licenses.txt LICENSE
- name: Upload standalone executable artifact
uses: actions/upload-artifact@v4
with:
name: FastFlix_${{ env.VERSION }}_win64
path: |
FastFlix.exe
LICENSE
- name: Upload installer artifact
uses: actions/upload-artifact@v4
with:
name: FastFlix_${{ env.VERSION }}_installer
path: FastFlix_${{ env.VERSION }}_installer.exe