Skip to content

Commit

Permalink
Add M1 macOS runner (#9071)
Browse files Browse the repository at this point in the history
  • Loading branch information
rusty1s committed Mar 19, 2024
1 parent ae7ce43 commit 13d8198
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 5 deletions.
9 changes: 7 additions & 2 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ runs:
shell: bash

- name: Install faiss-cpu
if: ${{ inputs.full_install == 'true' && inputs.cuda-version == 'cpu' }}
if: ${{ inputs.full_install == 'true' && inputs.cuda-version == 'cpu' && runner.os != 'macOS' }}
run: |
pip install faiss-cpu
shell: bash
Expand All @@ -67,10 +67,15 @@ runs:
pip install faiss-gpu
shell: bash

- name: Install extension packages
- name: Install torchvision
if: ${{ inputs.full_install == 'true' && inputs.torch-version != 'nightly' }}
run: |
pip install torchvision==${{ inputs.torchvision-version }} --extra-index-url https://download.pytorch.org/whl/${{ inputs.cuda-version }}
shell: bash

- name: Install extension packages
if: ${{ inputs.full_install == 'true' && inputs.torch-version != 'nightly' && runner.os != 'macOS' }}
run: |
pip install scipy
pip install --no-index --upgrade torch-scatter torch-sparse torch-cluster torch-spline-conv -f https://data.pyg.org/whl/torch-${{ inputs.torch-version }}+${{ inputs.cuda-version }}.html
shell: bash
5 changes: 4 additions & 1 deletion .github/workflows/full_testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
os: [ubuntu-latest, windows-latest, macos-14]
python-version: ['3.8', '3.10']
torch-version: [1.13.0, 2.0.0, 2.1.0, 2.2.0, nightly]
include:
Expand All @@ -28,6 +28,9 @@ jobs:
torchvision-version: 0.17.0
- torch-version: nightly
torchvision-version: nightly
exclude:
- os: macos-14
python-version: '3.8'

steps:
- name: Checkout repository
Expand Down
16 changes: 15 additions & 1 deletion .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,19 @@ on: # yamllint disable-line rule:truthy
jobs:

pytest:
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-14]
include:
- os: ubuntu-latest
python-version: '3.8'
- os: windows-latest
python-version: '3.8'
- os: macos-14
python-version: '3.10'

steps:
- name: Checkout repository
Expand All @@ -35,6 +47,8 @@ jobs:
- name: Setup packages
if: steps.changed-files-specific.outputs.only_changed != 'true'
uses: ./.github/actions/setup
with:
python-version: ${{ matrix.python-version }}

- name: Install main package
if: steps.changed-files-specific.outputs.only_changed != 'true'
Expand Down
3 changes: 2 additions & 1 deletion test/graphgym/test_graphgym.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
auto_select_device,
params_count,
)
from torch_geometric.testing import onlyOnline, withPackage
from torch_geometric.testing import onlyLinux, onlyOnline, withPackage

num_trivial_metric_calls = 0

Expand Down Expand Up @@ -164,6 +164,7 @@ def test_graphgym_module(tmp_path):


@onlyOnline
@onlyLinux
@withPackage('yacs', 'pytorch_lightning')
def test_train(tmp_path, capfd):
warnings.filterwarnings('ignore', ".*does not have many workers.*")
Expand Down

0 comments on commit 13d8198

Please sign in to comment.