Skip to content

Fix download/decompress functions in 49_helper.arixv.ipynb to prope… #34

Fix download/decompress functions in 49_helper.arixv.ipynb to prope…

Fix download/decompress functions in 49_helper.arixv.ipynb to prope… #34

Workflow file for this run

name: Build GUI
on:
push:
branches: [ "build"]
# paths: ['.github/workflows/**', 'build_gui.yaml']
pull_request:
branches: [ "build"]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, macos-latest, ubuntu-latest]
# os: [windows-latest]
python-version: ['3.10']
steps:
- name: Windows-specific step for enabling long paths
if: runner.os == 'Windows'
run: |
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" `
-Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force
# Windows-specific commands here
- name: Configure Git for long paths
if: runner.os == 'Windows'
run: git config --global core.longpaths true
- uses: fastai/workflows/nbdev-ci@master
with:
version: '3.10'
skip_test: 'true'
# The following installation is for some packages needed by PyQt6
- name: Install system dependencies
uses: ConorMacBride/install-package@v1
with:
apt: libgl1 libglx-mesa0 libegl1 libxkbcommon-x11-0 libdbus-1-3 # For Ubuntu
brew: qt # Example for macOS, replace with actual dependencies if needed
choco: vcredist140 # Example for Windows, replace with actual dependencies if needed
- name: test
if: runner.os == 'Linux'
run: |
ls
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pyinstaller
- name: Copy __init__.py to root as trouver_gui.py (Windows)
if: runner.os == 'Windows'
run: |
powershell -Command "Copy-Item '.\trouver\app\__init__.py' '.\trouver_gui.py'"
- name: Copy __init__.py to root as trouver_gui.py (Linux/Mac)
if: runner.os != 'Windows'
run: |
cp ./trouver/app/__init__.py ./trouver_gui.py
- name: Replace relative imports in trouver_gui.py (Windows)
if: runner.os == 'Windows'
run: |
powershell -Command "(Get-Content .\trouver_gui.py) -replace '^from \.\.', 'from trouver.' | Set-Content .\trouver_gui.py"
- name: Replace relative imports in trouver_gui.py (Linux)
if: runner.os == 'Linux'
run: |
sed -i 's/^from \.\./from trouver./' trouver_gui.py # Works on Linux
- name: Replace relative imports in trouver_gui.py (macOS)
if: runner.os == 'macOS'
run: |
sed -i '' 's/^from \.\./from trouver./' trouver_gui.py # Works on macOS
- name: Build with PyInstaller
run: pyinstaller --onefile trouver_gui.py
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: trouver-${{ matrix.os }}
path: dist/trouver*