Skip to content

Commit e79de37

Browse files
authored
Merge pull request #478 from zivy/addMacArmWorkflow
Adding Mac ARM github hosted runner.
2 parents ce23a28 + fcef193 commit e79de37

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

.github/workflows/main.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ jobs:
3333
test:
3434
needs: lint
3535
strategy:
36-
matrix: #using macos-13 because pyenchant doesn't work on macos-latest (macos 14, arm64 architecture)
37-
os: [macos-13, windows-latest, ubuntu-latest]
36+
matrix: #using macos-13, last available intel architecture. macos-latest is arm64 architecture.
37+
os: [macos-13, windows-latest, ubuntu-latest, macos-latest]
3838
python-version: ['3.9', '3.12']
3939
runs-on: ${{ matrix.os }}
4040
steps:
@@ -81,7 +81,10 @@ jobs:
8181
if: steps.nbl.outputs.any_changed == 'true'
8282
env:
8383
SIMPLE_ITK_MEMORY_CONSTRAINED_ENVIRONMENT: 1
84-
run: |
84+
run: | # pyenchant has a problem locating libenchant on macOS-ARM64. setting this environment variable resolves the issue
85+
if [ "$RUNNER_OS" == "macOS" ] && [ "${{ matrix.os }}" != "macos-13" ]; then
86+
export PYENCHANT_LIBRARY_PATH=/opt/homebrew/lib/libenchant-2.dylib
87+
fi
8588
test_files="${{ steps.nbl.outputs.all_changed_files }}"
8689
# on windows the paths use backslashes, so replace with forward slashes
8790
if [ "$RUNNER_OS" == "Windows" ]; then

.github/workflows/scheduled_or_manual.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ jobs:
3434
test:
3535
needs: lint
3636
strategy:
37-
matrix: #using macos-13 because pyenchant doesn't work on macos-latest (macos 14, arm64 architecture)
38-
os: [macos-13, windows-latest]
37+
matrix: #using macos-13, last available intel architecture. macos-latest is arm64 architecture.
38+
os: [macos-13, windows-latest, macos-latest]
3939
python-version: ['3.9', '3.12']
4040
inputs: ["00_ or 01_ or 02_ or 03_ or 04_ or 05_ or 10_ or 20_ or 21_ or 22_ or 300_ or 30_ or 31_ or 32_ or 33_ or 34_ or 35_ or 36_", "51_ or 55_ or 56_ or 60_ or 61_ or 62_ or 63_ or 64_", "65_ or 66_ or 67_ or 68_ or 69_ or 70_ or 71_"]
4141
runs-on: ${{ matrix.os }}
@@ -77,6 +77,9 @@ jobs:
7777
- name: run the test
7878
env:
7979
SIMPLE_ITK_MEMORY_CONSTRAINED_ENVIRONMENT: 1
80-
run: |
80+
run: | # pyenchant has a problem locating libenchant on macOS-ARM64. setting this environment variable resolves the issue
81+
if [ "$RUNNER_OS" == "macOS" ] && [ "${{ matrix.os }}" != "macos-13" ]; then
82+
export PYENCHANT_LIBRARY_PATH=/opt/homebrew/lib/libenchant-2.dylib
83+
fi
8184
pytest -v --tb=short -k "${{matrix.inputs}}" tests/test_notebooks.py::Test_notebooks::test_python_notebook
8285
pytest -v --tb=short tests/test_scripts.py

0 commit comments

Comments
 (0)