Spaces:
Paused
Paused
Mirrowel
commited on
Build workflow shenanigans (#9)
Browse files- .github/workflows/build.yml +6 -12
- src/proxy_app/build.py +2 -1
.github/workflows/build.yml
CHANGED
|
@@ -39,20 +39,15 @@ jobs:
|
|
| 39 |
shell: bash
|
| 40 |
run: |
|
| 41 |
uv python install 3.12
|
| 42 |
-
uv venv
|
| 43 |
|
| 44 |
- name: Install dependencies
|
| 45 |
shell: bash
|
| 46 |
run: |
|
| 47 |
grep -v -- '-e src/rotator_library' requirements.txt > temp_requirements.txt
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
source .venv/bin/activate
|
| 52 |
-
fi
|
| 53 |
-
uv pip install -r temp_requirements.txt
|
| 54 |
-
uv pip install pyinstaller
|
| 55 |
-
uv pip install -e src/rotator_library
|
| 56 |
|
| 57 |
- name: Get PyInstaller cache directory
|
| 58 |
id: pyinstaller-cache-dir
|
|
@@ -78,11 +73,10 @@ jobs:
|
|
| 78 |
shell: bash
|
| 79 |
run: |
|
| 80 |
if [ "${{ runner.os }}" == "Windows" ]; then
|
| 81 |
-
.
|
| 82 |
else
|
| 83 |
-
|
| 84 |
fi
|
| 85 |
-
python src/proxy_app/build.py
|
| 86 |
|
| 87 |
- name: Ensure PyInstaller cache directory exists
|
| 88 |
shell: pwsh
|
|
|
|
| 39 |
shell: bash
|
| 40 |
run: |
|
| 41 |
uv python install 3.12
|
| 42 |
+
uv venv
|
| 43 |
|
| 44 |
- name: Install dependencies
|
| 45 |
shell: bash
|
| 46 |
run: |
|
| 47 |
grep -v -- '-e src/rotator_library' requirements.txt > temp_requirements.txt
|
| 48 |
+
uv pip install --python .venv -r temp_requirements.txt
|
| 49 |
+
uv pip install --python .venv pyinstaller
|
| 50 |
+
uv pip install --python .venv -e src/rotator_library
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 51 |
|
| 52 |
- name: Get PyInstaller cache directory
|
| 53 |
id: pyinstaller-cache-dir
|
|
|
|
| 73 |
shell: bash
|
| 74 |
run: |
|
| 75 |
if [ "${{ runner.os }}" == "Windows" ]; then
|
| 76 |
+
.venv/Scripts/python src/proxy_app/build.py
|
| 77 |
else
|
| 78 |
+
.venv/bin/python src/proxy_app/build.py
|
| 79 |
fi
|
|
|
|
| 80 |
|
| 81 |
- name: Ensure PyInstaller cache directory exists
|
| 82 |
shell: pwsh
|
src/proxy_app/build.py
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
import os
|
|
|
|
| 2 |
import platform
|
| 3 |
import subprocess
|
| 4 |
|
|
@@ -29,7 +30,7 @@ def main():
|
|
| 29 |
"""
|
| 30 |
# Base PyInstaller command with optimizations
|
| 31 |
command = [
|
| 32 |
-
|
| 33 |
"-m",
|
| 34 |
"PyInstaller",
|
| 35 |
"--onefile",
|
|
|
|
| 1 |
import os
|
| 2 |
+
import sys
|
| 3 |
import platform
|
| 4 |
import subprocess
|
| 5 |
|
|
|
|
| 30 |
"""
|
| 31 |
# Base PyInstaller command with optimizations
|
| 32 |
command = [
|
| 33 |
+
sys.executable,
|
| 34 |
"-m",
|
| 35 |
"PyInstaller",
|
| 36 |
"--onefile",
|