Added action to generate executable. Test 3 #3
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build DashAI CPU for Windows | |
| on: | |
| push: | |
| branches: | |
| - feat/executables | |
| workflow_dispatch: | |
| jobs: | |
| build-windows: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python 3.12 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install dependencies (CPU-only) | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements-cpu.txt | |
| pip install pyinstaller | |
| pip install --force-reinstall llama-cpp-python --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu | |
| - name: Build executable | |
| shell: cmd | |
| run: | | |
| if exist "%PythonPath%\Lib\site-packages\llama_cpp\lib" ( | |
| echo Found llama_cpp/lib — adding binaries | |
| pyinstaller -F -n DashAI-launcher-cpu --clean ^ | |
| --add-data "DashAI/front/build;DashAI/front/build" ^ | |
| --add-data "%PythonPath%\Lib\site-packages\transformers;transformers" ^ | |
| --add-binary "%PythonPath%\Lib\site-packages\llama_cpp\lib\*;llama_cpp/lib" ^ | |
| --additional-hooks-dir=hooks DashAI/__main__.py | |
| ) else ( | |
| echo No llama_cpp/lib — building without binaries | |
| pyinstaller -F -n DashAI-launcher-cpu --clean ^ | |
| --add-data "DashAI/front/build;DashAI/front/build" ^ | |
| --add-data "%PythonPath%\Lib\site-packages\transformers;transformers" ^ | |
| --additional-hooks-dir=hooks DashAI/__main__.py | |
| ) | |
| - name: Upload artifact (expires in 1 day) | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: DashAI-windows-cpu | |
| path: dist/DashAI-launcher-cpu.exe | |
| retention-days: 1 |