Skip to content

Commit 431ee24

Browse files
committed
ci: install PortAudio
1 parent d551aa2 commit 431ee24

2 files changed

Lines changed: 14 additions & 1 deletion

File tree

.github/workflows/pre-release-tcp-server.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,14 @@ jobs:
4242
python-version: 3.11.9
4343
architecture: ${{ matrix.python_arch }}
4444

45+
- name: Install PortAudio (Linux)
46+
if: runner.os == 'Linux'
47+
run: sudo apt-get update && sudo apt-get install -y portaudio19-dev
48+
49+
- name: Install PortAudio (macOS)
50+
if: runner.os == 'macOS'
51+
run: brew install portaudio
52+
4553
- name: Install Pipenv
4654
run: pip install --upgrade pip && pip install pipenv==2024.0.1
4755

scripts/setup/setup-python-dev-env.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
EN_SPACY_MODEL_VERSION,
99
FR_SPACY_MODEL_NAME,
1010
FR_SPACY_MODEL_VERSION,
11+
IS_GITHUB_ACTIONS,
1112
PYTHON_BRIDGE_SRC_PATH,
1213
PYTHON_TCP_SERVER_SRC_PATH
1314
} from '@/constants'
@@ -263,13 +264,17 @@ SPACY_MODELS.set('fr', {
263264
LogHelper.success('Python packages installed')
264265

265266
if (givenSetupTarget === 'tcp-server') {
266-
if (!hasSharedPyTorch()) {
267+
if (!hasSharedPyTorch() && !IS_GITHUB_ACTIONS) {
267268
LogHelper.error(
268269
'Shared PyTorch bundle not found. Please run "npm run postinstall" and retry.'
269270
)
270271
process.exit(1)
271272
}
272273

274+
if (!hasSharedPyTorch() && IS_GITHUB_ACTIONS) {
275+
LogHelper.info('Skipping shared PyTorch bundle check in CI')
276+
}
277+
273278
LogHelper.success('Shared PyTorch bundle found')
274279
await downloadNLTKData()
275280
}

0 commit comments

Comments
 (0)