Skip to content

Add QtInstaller folders #9

Add QtInstaller folders

Add QtInstaller folders #9

name: Build installer
on:
workflow_dispatch:
push:
branches:
- 'master'
- 'Create_installer'
jobs:
build_pyinstaller:
runs-on: ${{ matrix.os }}
strategy:
# Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable.
fail-fast: false
# Build on the following 4 configurations:
# 1. <Windows, Release, 2022 MSVC compiler toolchain>
# 2. <Ubuntu latest, i.e. version 22.04, Release, GCC 11 compiler toolchain>
# 3. <MacOS 12 with x86-64 arch, Release, Clang 14 compiler toolchain>
# 4. <MacOS 14 with arm64 arch, Release, Clang 15 compiler toolchain
# To add more build types (Release, Debug, RelWithDebInfo, etc.) customize the list.
matrix:
os: [windows-2022, ubuntu-22.04, macos-14, macos-15-intel]
steps:
- name: Checkout EasyImaginApp
uses: actions/checkout@v5
with:
path: imaging-app
- name: Checkout EasyApp
uses: actions/checkout@v5
with:
repository: EasyScience/EasyApp
ref: 'Fix_wrong_application_types'
path: EasyApp
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Install uv
run: |
python -m pip install --upgrade pip
pip install uv
- name: Install dependencies
shell: bash
run: uv pip install -r imaging-app/pyproject.toml --extra ci --system
- name: Install needed libraries (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install libxkbcommon-x11-dev libpulse0 libxcb-cursor0 libxcb-icccm4 libxcb-keysyms1 libxcb-shape0
- name: Downgrade pyinstaller (MacOS)
if: runner.os == 'macOS'
run: uv pip install 'pyinstaller<6.0' --system
- name: Build with pyinstaller
working-directory: imaging-app
shell: bash
run: |
pyinstaller EasyImagingApp/main.py --onedir --windowed --name EasyImaging --icon EasyImagingApp/Gui/Resources/Logos/App.ico \
--clean --noconfirm \
--add-data=EasyImagingApp:. --collect-all PySide6 --collect-all scitiff --collect-all easyscience --collect-all EasyApp
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
path: imaging-app/dist/EasyImaging
name: EasyImaging-${{ matrix.os }}
# - name: Create installers
# working-directory: imagingsuite/QtInstaller
# shell: bash
# run: |
# if [ "${RUNNER_OS}" == "Windows" ]; then
# ${QTPATH}/../../Tools/QtInstallerFramework/4.8/bin/binarycreator.exe -c config/config.xml -p packages ${{runner.os}}-${{runner.arch}}_EasyImaging_Installer.exe
# else
# ${QTPATH}/../../Tools/QtInstallerFramework/4.8/bin/binarycreator -c config/config.xml -p packages ${{runner.os}}-${{runner.arch}}_EasyImaging_Installer
# fi