Skip to content

Commit

Permalink
fix ci, review 2
Browse files Browse the repository at this point in the history
  • Loading branch information
bejager committed May 3, 2024
1 parent d975bdc commit 66603ed
Show file tree
Hide file tree
Showing 10 changed files with 327 additions and 416 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/c-demos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
make_file: "MinGW Makefiles"
- os: macos-latest
platform: mac
arch: x86_64
arch: undetermined
make_file: "Unix Makefiles"

steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python-demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
install_dep: sudo apt install libportaudio2
- os: windows-latest
- os: macos-latest
install_dep: brew install portaudio --HEAD
install_dep: brew uninstall portaudio && brew install portaudio --HEAD

steps:
- uses: actions/checkout@v3
Expand Down
23 changes: 16 additions & 7 deletions demo/c/test/test_orca_c.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#

import os.path
import platform as pltf
import subprocess
import sys
import unittest
Expand All @@ -23,8 +24,15 @@ class OrcaCTestCase(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls._access_key = sys.argv[1]
cls._platform = sys.argv[2]
cls._arch = "" if len(sys.argv) != 4 else sys.argv[3]
platform = sys.argv[2]
if platform == "mac":
if pltf.machine() == "x86_64":
cls._arch = "x86_64"
elif pltf.machine() == "arm64":
cls._arch = "arm64"
else:
cls._arch = "" if len(sys.argv) != 4 else sys.argv[3]
cls._platform = platform
cls._root_dir = os.path.join(os.path.dirname(__file__), "../../..")

@staticmethod
Expand Down Expand Up @@ -59,12 +67,13 @@ def run_orca(self, model_path: str) -> None:
process = subprocess.Popen(args, stderr=subprocess.PIPE, stdout=subprocess.PIPE)
stdout, stderr = process.communicate()

print("Command:", args) # Print the command being run
print("stdout:", stdout.decode()) # Print the stdout output
print("stderr:", stderr.decode()) # Print the stderr output
print("Exit code:", process.poll()) # Print the exit code
poll_result = process.poll()
if poll_result != 0:
print(stdout.decode('utf-8'))
print(stderr.decode('utf-8'))
raise RuntimeError("Error running demo. See details above")

self.assertEqual(process.poll(), 0)
self.assertEqual(poll_result, 0)
self.assertEqual(stderr.decode('utf-8'), '')
self.assertTrue("Saved audio" in stdout.decode('utf-8'))
os.remove(output_path)
Expand Down
14 changes: 0 additions & 14 deletions demo/python/__init__.py

This file was deleted.

109 changes: 0 additions & 109 deletions demo/python/_audio_device.py

This file was deleted.

137 changes: 0 additions & 137 deletions demo/python/_orca_thread.py

This file was deleted.

64 changes: 0 additions & 64 deletions demo/python/_util.py

This file was deleted.

Loading

0 comments on commit 66603ed

Please sign in to comment.