Skip to content

Commit ed40a98

Browse files
authored
CI: fix macOS and Windows builds (#416)
* CI: Fix macOS build Constraints: - `macos-latest` is now ARM64. - Python 3.11 is the first macOS ARM release available in the action. So, we use macos-13 for older versions and stop unconditionally setting the architecture to x86, so that `macos-latest` uses ARM64 builds. * Pin to PyTorch 2.2.2 on Windows Until pytorch/pytorch#124897 is resolved.
1 parent ba6bf82 commit ed40a98

1 file changed

Lines changed: 13 additions & 6 deletions

File tree

.github/workflows/tests.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ on:
1010
- "*.md"
1111

1212
env:
13-
MODULE_NAME: 'spacy_transformers'
14-
RUN_MYPY: 'true'
13+
MODULE_NAME: "spacy_transformers"
14+
RUN_MYPY: "true"
1515

1616
jobs:
1717
tests:
@@ -21,16 +21,18 @@ jobs:
2121
fail-fast: false
2222
matrix:
2323
os: [ubuntu-latest, windows-latest, macos-latest]
24-
python_version: ["3.11"]
24+
python_version: ["3.12"]
2525
include:
26-
- os: macos-latest
26+
- os: macos-13
2727
python_version: "3.7"
2828
- os: windows-latest
2929
python_version: "3.8"
3030
- os: ubuntu-latest
3131
python_version: "3.9"
32-
- os: macos-latest
32+
- os: macos-13
3333
python_version: "3.10"
34+
- os: windows-latest
35+
python_version: "3.11"
3436

3537
runs-on: ${{ matrix.os }}
3638

@@ -42,13 +44,18 @@ jobs:
4244
uses: actions/setup-python@v4
4345
with:
4446
python-version: ${{ matrix.python_version }}
45-
architecture: x64
4647

4748
- name: Install oldest supported torch for python 3.6
4849
if: matrix.python_version == '3.6'
4950
run: |
5051
python -m pip install "torch==1.8.1+cpu" -f https://download.pytorch.org/whl/torch_stable.html
5152
53+
# Remove when https://github.com/pytorch/pytorch/issues/124897 is fixed.
54+
- name: Install torch 2.2.2
55+
if: matrix.python_version != '3.6' && matrix.os == 'windows-latest'
56+
run: |
57+
python -m pip install "torch==2.2.2+cpu" -f https://download.pytorch.org/whl/torch_stable.html
58+
5259
- name: Install dependencies
5360
run: |
5461
python -m pip install -U build pip setuptools wheel

0 commit comments

Comments
 (0)