Skip to content

Commit

Permalink
Deploy on x64 mac, install neuroconv from github on arm64 mac
Browse files Browse the repository at this point in the history
  • Loading branch information
rly committed Jun 8, 2024
1 parent 527ad37 commit 9aa0382
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/build_and_deploy_mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ on:

jobs:
deploy-on-mac:
runs-on: macos-latest
# not using macos-latest because that runner is an arm64 mac and there are issues
# building and deploying with sonpy (Spike2RecordingInterface) on arm64 mac
runs-on: macos-13
# NOTE: macos-latest is an arm64 mac, and the dependency sonpy (Spike2RecordingInterface) has a .so file that
# works only on mac x64. This causes issues building and deploying on mac arm64. So we use macos-13 (x64)
# to build and deploy both the x64 and arm64 versions of the app.
# NOTE: if changing this to macos-latest, make sure to use the apple-silicon conda environment.

defaults:
run:
Expand All @@ -31,7 +33,7 @@ jobs:
use-mamba: true

- name: Create and activate environment
run: mamba env update --name nwb-guide --file environments/environment-MAC-apple-silicon.yml
run: mamba env update --name nwb-guide --file environments/environment-MAC-intel.yml

- name: Use Node.js 20
uses: actions/setup-node@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/testing_flask_build_and_dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:

# Fix for macos build - remove bad sonpy file
- if: matrix.os == 'macos-latest' || matrix.os == 'macos-13'
run: rm -f /Users/runner/miniconda3/envs/nwb-guide/lib/python3.9/site-packages/sonpy/linux/sonpy.so
run: rm -f "$CONDA_PREFIX/lib/python3.9/site-packages/sonpy/linux/sonpy.so"

- name: Build PyFlask distribution
run: npm run build:flask
Expand Down
2 changes: 2 additions & 0 deletions environments/environment-MAC-apple-silicon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ dependencies:
- flask == 2.3.2
- flask-cors == 4.0.0
- flask_restx == 1.1.0
# NOTE: the neuroconv wheel on pypi includes sonpy which is not compatible with arm64, so build and install
# neuroconv from github, which will remove the sonpy dependency when building from mac arm64
- neuroconv @ git+https://github.com/catalystneuro/neuroconv.git@main#neuroconv[full]
- dandi >= 0.60.0
- pytest == 7.4.0
Expand Down

0 comments on commit 9aa0382

Please sign in to comment.