-
-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (67 loc) · 2 KB
/
test_mpi.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
on:
push:
branches:
- main
pull_request:
branches:
- main
name: paralell pytest
jobs:
py-check:
runs-on: ${{ matrix.config.os }}
name: ${{ matrix.config.os }} (${{ matrix.config.py }})
strategy:
fail-fast: false
matrix:
config:
- {os: windows-2022, py: '3.12'}
- {os: macOS-14, py: '3.11'}
- {os: ubuntu-24.04, py: '3.10'}
- {os: ubuntu-24.04, py: '3.12'}
env:
SDKROOT: /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Checkout
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.config.py }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install .[ci]
- name: Install MPI (linux)
if: contains(matrix.config.os, 'ubuntu')
run: |
sudo apt-get update
sudo apt-get install -y mpi-default-dev
pip install mpi4py
- name: Download Microsoft MPI
if: contains(matrix.config.os, 'windows')
run: (new-object net.webclient).DownloadFile("https://download.microsoft.com/download/a/5/2/a5207ca5-1203-491a-8fb8-906fd68ae623/msmpisetup.exe",
"msmpisetup.exe")
shell: powershell
- name: Install MPI (win)
if: contains(matrix.config.os, 'windows')
run: |
msmpisetup.exe -unattend -minimal
pip install mpi4py
shell: cmd
- name: Install MPI (osx)
if: contains(matrix.config.os, 'macOS')
run: |
brew install openmpi
pip install mpi4py
- name: (disabled) run pytest
if: contains(matrix.config.os, 'windows')
run: |
print mpiexec -n 2 pytest
- name: (disabled) run pytest
if: ${{ ! contains(matrix.config.os, 'windows') }}
run: |
echo mpirun -np 2 pytest