Skip to content

fixing site-packages in path #30

fixing site-packages in path

fixing site-packages in path #30

Workflow file for this run

name: Build and Compile
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: windows-latest
steps:
# Checkout the code
- name: Checkout repository
uses: actions/checkout@v2
- name: Download and install Python debug build
run: |
curl -o python312.zip https://www.python.org/ftp/python/3.12.0/python-3.12.0-embed-amd64.zip
unzip python312.zip -d python312
# Update PATH to point to the extracted directory
echo python312 >> $GITHUB_ENV
echo "PATH=$GITHUB_ENV/python312:$PATH" >> $GITHUB_ENV
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
# Build the DLL
- name: Build DLL using CMake
run: |
cd engine
mkdir build
cd build
cmake ..
cmake --build . --config Debug
cmake --build . --config Release
- name: Print contents of build/bin directory
run: |
dir engine/build
dir engine/build/Release
# Move the DLL to VoiceServer directory
- name: Move DLL and other bits to VoiceServer directory
run: |
mkdir -p VoiceServer/_libs
move engine/build/Release/* VoiceServer/_libs/
- name: Set up UV
uses: yezz123/setup-uv@v4
- name: Sync UV dependencies
run: |
cd VoiceServer
uv sync
- name: Compile RegisterVoice.py with PyInstaller inside UV virtual environment
run: |
cd VoiceServer
$site_packages = uv run python -c "import site; print(site.getsitepackages()[0])" | Out-String
$site_packages = $site_packages.Trim() -replace "`r`n", "" # Remove any newlines
uv run python -m PyInstaller RegisterVoice.py --noupx --onedir --noconsole --name "RegisterVoice" -i .\icon.ico --clean --add-binary "$site_packages/Lib/site-packages/azure/cognitiveservices/speech/Microsoft.CognitiveServices.Speech.core.dll;." --collect-all comtypes -y
- name: Compile VoiceServer.py with PyInstaller inside UV virtual environment
run: |
cd VoiceServer
$site_packages = uv run python -c "import site; print(site.getsitepackages()[0])" | Out-String
$site_packages = $site_packages.Trim() -replace "`r`n", "" # Remove any newlines
uv run python -m PyInstaller VoiceServer.py --noupx --onedir --noconsole --name "VoiceServer" -i .\icon.ico --clean --add-binary "$site_packages/Lib/site-packages/azure/cognitiveservices/speech/Microsoft.CognitiveServices.Speech.core.dll;." --collect-all comtypes -y
- name: Build Installer with Inno Setup
run: |
cd VoiceServer
"C:\Program Files (x86)\Inno Setup 6\ISCC.exe" /Q buildinstaller.iss
# Archive the compiled executables
- name: Archive the output
uses: actions/upload-artifact@v4
with:
name: compiled-executables
path: |
VoiceServer/VoiceServer.exe
VoiceServer/RegisterVoice.exe