-
Notifications
You must be signed in to change notification settings - Fork 3
82 lines (75 loc) · 2.46 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
name: Test Build
on: workflow_dispatch
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Conda ${{ matrix.arch }} on ${{ matrix.os }} with Python ${{ matrix.python }}
runs-on: ${{ matrix.os }}
env:
CI: "1"
defaults:
run:
shell: bash -l {0}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
python: "3.10"
arch: Linux-x86_64
- os: ubuntu-latest
python: "3.11"
arch: Linux-x86_64
- os: macos-13
python: "3.11"
arch: MacOSX-x86_64
- os: macos-14
python: "3.11"
arch: MacOSX-x86_64
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Conda Base
run: |
rm -rf /usr/share/miniconda
rm -rf /usr/local/miniconda
./tools/bootstrap_base.sh ~/conda ${{ matrix.arch }}
- name: Check Conda Config
run: |
source ~/conda/etc/profile.d/conda.sh &&
conda activate base &&
conda info &&
conda list &&
conda config --show-sources &&
conda config --show
- name: Install
run: |
source ~/conda/etc/profile.d/conda.sh &&
conda activate base &&
pyver=${{ matrix.python }} &&
sed -i -E "s/python=3\.[[:digit:]]+.*/python=${pyver}/" ./config/default/packages_conda.txt &&
cat ./config/default/packages_conda.txt &&
if [[ ${{ matrix.os }} == "macos-13" || ${{ matrix.os }} == "macos-14" ]]; then \
./soconda.sh -e soconda -v CI -c binary; \
else \
./soconda.sh -e soconda -v CI -c default; \
fi
- name: Run Tests
run: |
source ~/conda/etc/profile.d/conda.sh &&
conda activate "soconda_CI" &&
export OMP_NUM_THREADS=2 &&
export MPI_DISABLE=1 &&
export CI=1 &&
python3 -c 'import scipy; import toast' &&
python3 -c 'import so3g; from spt3g import core' &&
python3 -c 'from sotodlib import core' &&
python3 -c 'import toast.tests; toast.tests.run()' &&
git clone --depth=1 --single-branch --branch=master https://github.com/simonsobs/sotodlib.git &&
pushd sotodlib &&
python3 -m unittest &&
popd &&
unset MPI_DISABLE &&
unset OMP_NUM_THREADS