-
Notifications
You must be signed in to change notification settings - Fork 39
105 lines (94 loc) · 2.73 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
# Use pre-built docker containers to run our unit tests on different python versions.
#
# In general, we try to run on:
# - The oldest supported python
# - The latest stable python that is the common default on most systems and conda
# - (During transitions) The newly released bleeding edge python
name: Run Test Suite
on:
push:
branches:
- master
pull_request:
branches:
- master
- toast3
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Tests on ${{ matrix.arch }} with Conda Python-${{ matrix.python }}
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -l {0}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
python: "3.8"
arch: Linux-x86_64
ompdisable: 0
- os: ubuntu-latest
python: "3.11"
arch: Linux-x86_64
ompdisable: 0
- os: ubuntu-latest
python: "3.12"
arch: Linux-x86_64
ompdisable: 0
- os: macos-latest
python: "3.9"
arch: MacOSX-x86_64
ompdisable: 1
- os: macos-latest
python: "3.11"
arch: MacOSX-x86_64
ompdisable: 1
- os: macos-latest
python: "3.12"
arch: MacOSX-x86_64
ompdisable: 1
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Conda Base
uses: conda-incubator/setup-miniconda@v3
with:
miniforge-version: "latest"
auto-update-conda: true
auto-activate-base: true
- name: Check Conda Config
run: |
conda info
conda list
conda config --show-sources
conda config --show
- name: Create Conda Env
run: |
if [ ${{ matrix.python }} = 3.12 ]; then
./platforms/conda_dev_setup.sh toast ${{ matrix.python }} no
else
./platforms/conda_dev_setup.sh toast ${{ matrix.python }} yes
fi
- name: Install
run: |
conda activate toast
export TOAST_BUILD_DISABLE_OPENMP=${{ matrix.ompdisable }}
./platforms/conda.sh
- name: Run Serial Tests
run: |
conda activate toast
export OMP_NUM_THREADS=2
export MPI_DISABLE=1
python3 -c 'import toast.tests; toast.tests.run()'
unset MPI_DISABLE
unset OMP_NUM_THREADS
- name: Run MPI Tests
run: |
conda activate toast
export OMP_NUM_THREADS=1
mpirun -np 2 python -c 'import toast.tests; toast.tests.run()'
unset OMP_NUM_THREADS