Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
129 changes: 129 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
name: Build XAInyPredictor

on:
push:
workflow_dispatch:

env:
APP_NAME: XAInyPredictor
APP_VERSION: 1.0.0-beta.1

jobs:
build:
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Python
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Dependencias sistema Linux
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y libgl1

- name: Instalar dependencias Python
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python -m pip install -e .
python -m pip install pyinstaller

# =========================
# Windows
# =========================

- name: Build Windows app folder
if: runner.os == 'Windows'
run: |
pyinstaller --onedir --noconsole `
--name "${{ env.APP_NAME }}" `
--icon "installer/windows/assets/XAInyPredictor.ico" `
--paths src `
--collect-all shiny `
--add-data "src/XAInyPredictor/data;XAInyPredictor/data" `
--add-data "src/XAInyPredictor/shinyapp/www;XAInyPredictor/shinyapp/www" `
"src/XAInyPredictor/app.py"

- name: Install Inno Setup
if: runner.os == 'Windows'
run: |
choco install innosetup --yes --no-progress

- name: Build Windows installer
if: runner.os == 'Windows'
run: |
& "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" "installer\windows\XAInyPredictor.iss"

- name: Upload Windows installer
if: runner.os == 'Windows'
uses: actions/upload-artifact@v4
with:
name: XAInyPredictor-Windows-Installer
path: dist-installer/*.exe

# =========================
# Linux
# =========================

- name: Build Linux app folder
if: runner.os == 'Linux'
run: |
pyinstaller --onedir \
--name "${APP_NAME}" \
--paths src \
--collect-all shiny \
--add-data "src/XAInyPredictor/data:XAInyPredictor/data" \
--add-data "src/XAInyPredictor/shinyapp/www:XAInyPredictor/shinyapp/www" \
"src/XAInyPredictor/app.py"

- name: Package Linux
if: runner.os == 'Linux'
run: |
cd dist
tar -czf "${APP_NAME}-${APP_VERSION}-Linux-x86_64.tar.gz" "${APP_NAME}"

- name: Upload Linux package
if: runner.os == 'Linux'
uses: actions/upload-artifact@v4
with:
name: XAInyPredictor-Linux-x86_64
path: dist/XAInyPredictor-*-Linux-x86_64.tar.gz

# =========================
# macOS
# =========================

- name: Build macOS app
if: runner.os == 'macOS'
run: |
pyinstaller --onedir --windowed \
--name "${APP_NAME}" \
--paths src \
--collect-all shiny \
--add-data "src/XAInyPredictor/data:XAInyPredictor/data" \
--add-data "src/XAInyPredictor/shinyapp/www:XAInyPredictor/shinyapp/www" \
"src/XAInyPredictor/app.py"

- name: Package macOS app
if: runner.os == 'macOS'
run: |
cd dist
ditto -c -k --keepParent "${APP_NAME}.app" "${APP_NAME}-${APP_VERSION}-macOS.zip"

- name: Upload macOS package
if: runner.os == 'macOS'
uses: actions/upload-artifact@v4
with:
name: XAInyPredictor-macOS
path: dist/XAInyPredictor-*-macOS.zip
4 changes: 2 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ shiny run src/XAInyPredictor/app.py --port 8001 # Alternative
- **Generate docs**: `doxygen ./docs/Doxyfile`

## Testing
No tests exist. `test/tests.py` is a broken template leftover (imports `mymodule.template` which never existed). No test framework is properly configured.
No tests exist. No test framework is properly configured.

## Type Checking
None configured (no mypy, pyright, etc.).
Expand Down Expand Up @@ -51,4 +51,4 @@ Each use case is a subfolder under `data/` with 4 required files. Add a new use
Pre-commit uses black, reorder-python-imports, hadolint, commitizen. Config in `.pre-commit-config.yaml`.

## Commits
Do not commit changes without explicit user approval.
Do not commit changes without explicit user approval.
Loading
Loading