Skip to content

Commit 0ef8cd6

Browse files
authored
Merge pull request #39 from projecthorus/actions_tests
Github actions for OSX builds
2 parents 24bdf69 + 655279e commit 0ef8cd6

File tree

2 files changed

+114
-3
lines changed

2 files changed

+114
-3
lines changed

.github/workflows/pull-request.yml

Lines changed: 69 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,9 @@ jobs:
9191
python-version: '3.11'
9292
cache: 'pip' # caching pip dependencies
9393

94+
- name: Install Homebrew dependencies
95+
run: brew install portaudio
96+
9497
- name: Install pyAudio wheel
9598
run: pip install pyaudio
9699

@@ -107,11 +110,74 @@ jobs:
107110
cp horusdemodlib/build/src/libhorus.dylib .
108111
109112
- name: Run pyinstaller
110-
run: pyinstaller horus-gui_osx.spec
113+
run: pyinstaller horus-gui_osx_runner.spec
114+
115+
- name: Create the DMG file
116+
run: hdiutil create -format UDZO -srcfolder dist/horus-gui.app dist/horus-gui_OSX-M1.dmg
111117

112118
- name: Upload Artifact
113119
uses: actions/upload-artifact@v4
114120
with:
115121
name: horus-gui_OSX-M1.zip
116-
path: dist/horus-gui.app
117-
retention-days: 2
122+
path: dist/horus-gui_OSX-M1.dmg
123+
retention-days: 2
124+
125+
# Currently having issues with portaudio and these builds...
126+
# build-osx-intel:
127+
# runs-on: [macos-13]
128+
129+
# steps:
130+
131+
# - name: Checkout code
132+
# uses: actions/checkout@v4
133+
134+
# - name: Checkout horusdemodlib
135+
# uses: actions/checkout@v4
136+
# with:
137+
# repository: "projecthorus/horusdemodlib"
138+
# ref: "master"
139+
# path: "horusdemodlib"
140+
141+
# - name: Build horusdemodlib
142+
# run: |
143+
# cd horusdemodlib
144+
# mkdir build
145+
# cd build
146+
# cmake ..
147+
# make
148+
149+
# - uses: actions/setup-python@v5
150+
# with:
151+
# python-version: '3.11'
152+
# cache: 'pip' # caching pip dependencies
153+
154+
# - name: Install Homebrew dependencies
155+
# run: brew install portaudio
156+
157+
# - name: Install pyAudio wheel
158+
# run: pip install pyaudio
159+
160+
# - name: Install other dependencies
161+
# run: pip install -r requirements.txt
162+
163+
# - name: Install pyinstaller
164+
# run: pip install pyinstaller
165+
166+
# - name: Prep file locations
167+
# shell: bash
168+
# run: |
169+
# mkdir -p dist
170+
# cp horusdemodlib/build/src/libhorus.dylib .
171+
172+
# - name: Run pyinstaller
173+
# run: pyinstaller horus-gui_osx_runner.spec
174+
175+
# - name: Create the DMG file
176+
# run: hdiutil create -format UDZO -srcfolder dist/horus-gui.app dist/horus-gui_OSX-Intel.dmg
177+
178+
# - name: Upload Artifact
179+
# uses: actions/upload-artifact@v4
180+
# with:
181+
# name: horus-gui_OSX-Intel.zip
182+
# path: dist/horus-gui_OSX-Intel.dmg
183+
# retention-days: 2

horus-gui_osx_runner.spec

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# -*- mode: python ; coding: utf-8 -*-
2+
3+
block_cipher = None
4+
5+
6+
a = Analysis(['horus-gui.py'],
7+
pathex=['.'],
8+
binaries=[('libhorus.dylib','.')],
9+
datas=[],
10+
hiddenimports=[],
11+
hookspath=[],
12+
runtime_hooks=[],
13+
excludes=[],
14+
win_no_prefer_redirects=False,
15+
win_private_assemblies=False,
16+
cipher=block_cipher,
17+
noarchive=False)
18+
pyz = PYZ(a.pure, a.zipped_data,
19+
cipher=block_cipher)
20+
exe = EXE(pyz,
21+
a.scripts,
22+
[],
23+
exclude_binaries=True,
24+
name='horus-gui',
25+
debug=False,
26+
bootloader_ignore_signals=False,
27+
strip=False,
28+
upx=True,
29+
console=False , icon='doc/horus_logo.icns')
30+
coll = COLLECT(exe,
31+
a.binaries,
32+
a.zipfiles,
33+
a.datas,
34+
strip=False,
35+
upx=True,
36+
upx_exclude=[],
37+
name='horus-gui')
38+
app = BUNDLE(coll,
39+
name='horus-gui.app',
40+
icon='doc/horus_logo.icns',
41+
bundle_identifier=None,
42+
info_plist={
43+
'NSMicrophoneUsageDescription': 'Horus-GUI needs audio access to receive telemetry.'
44+
},
45+
)

0 commit comments

Comments
 (0)