-
Notifications
You must be signed in to change notification settings - Fork 19
125 lines (107 loc) · 3.24 KB
/
test.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
name: Build and Test
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
linux:
name: Linux with Python-${{ matrix.python }}
runs-on: ubuntu-latest
env:
SOTODLIB_TEST_DISABLE_PLOTS: 1
strategy:
# Ensure that a test continues even if another fails. Useful for
# debugging multiple problems in parallel.
fail-fast: false
matrix:
include:
- python: "3.8"
pyshort: "38"
- python: "3.9"
pyshort: "39"
- python: "3.10"
pyshort: "310"
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: ${{ matrix.python }}
- name: Install OpenMPI for Tests
run: |
sudo apt update
sudo apt install -y libopenmpi-dev
- name: Install Dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade wheel
python3 -m pip install mpi4py
python3 -m pip install so3g
python3 -m pip install pshmem
python3 -m pip install --pre toast
- name: Install sotodlib
run: |
python3 -m pip install -vvv .[tests]
- name: Run Serial Tests
run: |
export OMP_NUM_THREADS=2
export OPENBLAS_NUM_THREADS=2
export MPI_DISABLE=1
python3 setup.py test
- name: Run MPI Tests
run: |
export OMP_NUM_THREADS=1
export OPENBLAS_NUM_THREADS=1
mpirun -np 2 python3 setup.py test
# FIXME: Re-enable after testing this procedure on a local
# apple machine.
#
# macos-clang:
# name: MacOS (clang) with Python-${{ matrix.python }}
# runs-on: macos-latest
# env:
# SOTODLIB_TEST_DISABLE_PLOTS: 1
# strategy:
# # Ensure that a test continues even if another fails. Useful for
# # debugging multiple problems in parallel.
# fail-fast: false
# matrix:
# include:
# - python: "3.9"
# pyshort: "39"
# - python: "3.10"
# pyshort: "310"
# steps:
# - name: Cancel Previous Runs
# uses: styfle/[email protected]
# with:
# access_token: ${{ github.token }}
# - name: Checkout
# uses: actions/checkout@v4
# - uses: actions/setup-python@v5
# name: Install Python
# with:
# python-version: ${{ matrix.python }}
# - name: Install Homebrew Packages
# run: |
# brew install freetype pkg-config libpng
# - name: Install Dependencies
# run: |
# python3 -m pip install --upgrade pip
# python3 -m pip install --upgrade wheel
# python3 -m pip install so3g
# python3 -m pip install --pre toast
# - name: Install sotodlib
# run: |
# python3 -m pip install -vvv .
# - name: Run Serial Tests
# run: |
# export OMP_NUM_THREADS=1
# export OPENBLAS_NUM_THREADS=1
# export MPI_DISABLE=1
# python3 setup.py test