3131 # Create CUDA-enabled executable
3232 - name : Install CUDA-enabled llama_cpp
3333 run : |
34- pip install --index-url https://abetlen.github.io/llama-cpp-python/whl/cu124 --extra-index-url https://pypi.org/simple llama-cpp-python==v0.2.90
34+ pip install --index-url https://abetlen.github.io/llama-cpp-python/whl/cu124 --extra-index-url https://pypi.org/simple llama-cpp-python==v0.3.8
3535
3636 - name : Instal CUDA drivers for NVIDIA install
3737 run : |
4646
4747 - name : Run PyInstaller for NVIDIA
4848 run : |
49- pyinstaller --runtime-hook=.\scripts\runtime_hooks\hook-runtime.py --additional-hooks-dir=.\scripts\hooks --hidden-import=en_core_web_md --add-data ".\scripts\NVIDIA_INSTALL.txt:install_state" --add-data ".\src\FreeScribe.client\whisper-assets:faster_whisper\assets" --add-data ".\src\FreeScribe.client\markdown:markdown" --add-data ".\src\FreeScribe.client\assets:assets" --add-data "C:\hostedtoolcache\windows\Python\3.10.11\x64\lib\site-packages\nvidia:nvidia-drivers" --name freescribe-client-nvidia --icon=.\src\FreeScribe.client\assets\logo.ico --noconsole .\src\FreeScribe.client\client.py
49+ pyinstaller --runtime-hook=.\scripts\runtime_hooks\hook-runtime.py --additional-hooks-dir=.\scripts\hooks --hidden-import=en_core_web_md --hidden-import=en_core_sci_md -- add-data ".\scripts\NVIDIA_INSTALL.txt:install_state" --add-data ".\src\FreeScribe.client\whisper-assets:faster_whisper\assets" --add-data ".\src\FreeScribe.client\markdown:markdown" --add-data ".\src\FreeScribe.client\assets:assets" --add-data "C:\hostedtoolcache\windows\Python\3.10.11\x64\lib\site-packages\nvidia:nvidia-drivers" --name freescribe-client-nvidia --icon=.\src\FreeScribe.client\assets\logo.ico --noconsole .\src\FreeScribe.client\client.py
5050
5151 # Create CPU-only executable
5252 - name : Uninstall CUDA-enabled llama_cpp (if necessary) and install CPU-only llama_cpp
@@ -56,18 +56,136 @@ jobs:
5656 pip uninstall nvidia-cuda-nvrtc-cu12==12.4.127
5757 pip uninstall nvidia-cublas-cu12==12.4.5.8
5858 pip uninstall -y llama-cpp-python
59- pip install --index-url https://abetlen.github.io/llama-cpp-python/whl/cpu --extra-index-url https://pypi.org/simple llama-cpp-python==v0.2.90
59+ pip install --index-url https://abetlen.github.io/llama-cpp-python/whl/cpu --extra-index-url https://pypi.org/simple llama-cpp-python==v0.3.8
6060
6161 - name : Run PyInstaller for CPU-only
6262 run : |
63- pyinstaller --runtime-hook=.\scripts\runtime_hooks\hook-runtime.py --additional-hooks-dir=.\scripts\hooks --hidden-import=en_core_web_md --add-data ".\scripts\CPU_INSTALL.txt:install_state" --add-data ".\src\FreeScribe.client\whisper-assets:faster_whisper\assets" --add-data ".\src\FreeScribe.client\markdown:markdown" --add-data ".\src\FreeScribe.client\assets:assets" --name freescribe-client-cpu --icon=.\src\FreeScribe.client\assets\logo.ico --noconsole .\src\FreeScribe.client\client.py
63+ pyinstaller --runtime-hook=.\scripts\runtime_hooks\hook-runtime.py --additional-hooks-dir=.\scripts\hooks --hidden-import=en_core_web_md --hidden-import=en_core_sci_md -- add-data ".\scripts\CPU_INSTALL.txt:install_state" --add-data ".\src\FreeScribe.client\whisper-assets:faster_whisper\assets" --add-data ".\src\FreeScribe.client\markdown:markdown" --add-data ".\src\FreeScribe.client\assets:assets" --name freescribe-client-cpu --icon=.\src\FreeScribe.client\assets\logo.ico --noconsole .\src\FreeScribe.client\client.py
6464
6565 - name : Set up NSIS
6666 uses : joncloud/makensis-action@1c9f4bf2ea0c771147db31a2f3a7f5d8705c0105
6767 with :
6868 script-file : .\scripts\install.nsi
6969 additional-plugin-paths : " ./scripts/nsis-plugins"
7070
71+ - name : Rename Installer
72+ run : |
73+ mv dist/FreeScribeInstaller.exe dist/FreeScribeInstaller_windows.exe
74+
75+ - name : Upload Artifact
76+ uses : actions/upload-artifact@v4
77+ with :
78+ name : FreeScribeInstaller_windows.exe
79+ path : dist/FreeScribeInstaller_windows.exe
80+
81+
82+ build-macos-intel :
83+ runs-on : macos-13
84+ permissions :
85+ contents : write
86+ steps :
87+ - name : Checkout
88+ uses : actions/checkout@v4
89+
90+ - name : Install Python
91+ uses : actions/setup-python@v5
92+ with :
93+ python-version : " 3.12"
94+ cache : " pip"
95+ cache-dependency-path : " **/client_requirements_mac.txt"
96+
97+ - name : Install PortAudio
98+ run : |
99+ brew install portaudio
100+
101+ - name : Install requirements
102+ run : |
103+ pip install -r client_requirements_mac.txt
104+
105+ - name : Install ffmpeg
106+ run : |
107+ brew install ffmpeg
108+
109+ - name : Build macOS app
110+ run : |
111+ ./build-mac.sh
112+
113+ - name : Build PKG installer
114+ run : |
115+ ./build-pkg.sh --arch x86_64
116+ env :
117+ GITHUB_REF : ${{ github.ref }}
118+
119+ - name : Upload Artifact
120+ uses : actions/upload-artifact@v4
121+ with :
122+ name : FreeScribeInstaller_x86_64.pkg
123+ path : dist/FreeScribeInstaller_x86_64.pkg
124+
125+ build-macos-arm :
126+ runs-on : macos-latest
127+ permissions :
128+ contents : write
129+ steps :
130+ - name : Checkout
131+ uses : actions/checkout@v4
132+
133+ - name : Install Python
134+ uses : actions/setup-python@v5
135+ with :
136+ python-version : " 3.12"
137+ cache : " pip"
138+ cache-dependency-path : " **/client_requirements_mac.txt"
139+
140+ - name : Install PortAudio
141+ run : |
142+ brew install portaudio
143+
144+ - name : Install requirements
145+ run : |
146+ pip install -r client_requirements_mac.txt
147+
148+ - name : Install ffmpeg
149+ run : |
150+ brew install ffmpeg
151+
152+ - name : Build macOS app
153+ run : |
154+ ./build-mac.sh
155+
156+ - name : Build PKG installer
157+ run : |
158+ ./build-pkg.sh --arch arm64
159+ env :
160+ GITHUB_REF : ${{ github.ref }}
161+
162+ - name : Upload Artifact
163+ uses : actions/upload-artifact@v4
164+ with :
165+ name : FreeScribeInstaller_arm64.pkg
166+ path : dist/FreeScribeInstaller_arm64.pkg
167+
168+ create-release :
169+ runs-on : ubuntu-latest
170+ needs : [build-windows, build-macos-intel, build-macos-arm]
171+ permissions :
172+ contents : write
173+ steps :
174+ - name : Download Windows Installer
175+ uses : actions/download-artifact@v4
176+ with :
177+ name : FreeScribeInstaller_windows.exe
178+
179+ - name : Download Intel Installer
180+ uses : actions/download-artifact@v4
181+ with :
182+ name : FreeScribeInstaller_x86_64.pkg
183+
184+ - name : Download ARM Installer
185+ uses : actions/download-artifact@v4
186+ with :
187+ name : FreeScribeInstaller_arm64.pkg
188+
71189 - name : Check if alpha or RC release
72190 id : check_alpha
73191 run : |
@@ -78,29 +196,22 @@ jobs:
78196 }
79197 shell : pwsh
80198
81- - name : Create release
82- id : create_release
83- uses : actions/create- release@v1
199+ - name : Upload Installer
200+ id : upload-installer
201+ uses : softprops/action-gh- release@v2
84202 env :
85203 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
86204 with :
205+ name : Release ${{ github.ref_name }}
87206 tag_name : ${{ github.ref }}
88- release_name : Release ${{ github.ref }}
89207 body : |
90208 ## What's Changed
91209 ${{ steps.changelog.outputs.CHANGELOG }}
92210
93211 For full changelog, see [the commits since last release](${{ github.server_url }}/${{ github.repository }}/compare/${{ steps.changelog.last_tag }}...${{ github.ref }})
94212 draft : false
95213 prerelease : ${{ steps.check_alpha.outputs.is_alpha == 'true' }}
96-
97- - name : Upload Installer
98- id : upload-installer
99- uses : actions/upload-release-asset@v1
100- env :
101- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
102- with :
103- upload_url : ${{steps.create_release.outputs.upload_url}}
104- asset_path : dist/FreeScribeInstaller.exe
105- asset_name : FreeScribeInstaller_windows.exe
106- asset_content_type : application/octet-stream
214+ files : |
215+ FreeScribeInstaller_x86_64.pkg
216+ FreeScribeInstaller_arm64.pkg
217+ FreeScribeInstaller_windows.exe
0 commit comments