-
Notifications
You must be signed in to change notification settings - Fork 0
143 lines (130 loc) · 4.53 KB
/
test.yml
File metadata and controls
143 lines (130 loc) · 4.53 KB
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# 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:
- main
pull_request:
branches:
- main
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.10"
arch: Linux-x86_64
ompdisable: 0
- os: ubuntu-latest
python: "3.12"
arch: Linux-x86_64
ompdisable: 0
- os: ubuntu-latest
python: "3.14"
arch: Linux-x86_64
ompdisable: 0
- os: macos-15-intel
python: "3.10"
arch: MacOSX-x86_64
ompdisable: 1
- os: macos-15-intel
python: "3.13"
arch: MacOSX-x86_64
ompdisable: 1
- os: macos-15
python: "3.10"
arch: MacOSX-arm64
ompdisable: 1
- os: macos-15
python: "3.13"
arch: MacOSX-arm64
ompdisable: 1
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup Conda Base
run: |
sudo rm -rf /usr/share/miniconda \
&& sudo rm -rf /usr/local/miniconda \
&& curl -SL -o miniforge.sh https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-${{ matrix.arch }}.sh \
&& bash miniforge.sh -b -f -p ~/conda \
&& source ~/conda/etc/profile.d/conda.sh \
&& conda activate base \
&& conda update -n base --yes conda
- 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 Dependencies
run: |
source ~/conda/etc/profile.d/conda.sh \
&& conda create --yes -n test python==${{ matrix.python }} \
&& conda activate test \
&& conda install --yes --file packaging/conda_build_requirements.txt
if test ${{ matrix.python }} = "3.10"; then conda install libxcrypt; fi
- name: Install
run: |
source ~/conda/etc/profile.d/conda.sh \
&& conda activate test \
&& pip install .
- name: Serial Tests (MPI Disabled)
run: |
source ~/conda/etc/profile.d/conda.sh \
&& conda activate test \
&& export OMP_NUM_THREADS=2 \
&& export MPI_DISABLE=1 \
&& mkdir -p test \
&& pushd test >/dev/null 2>&1 \
&& python3 -c 'import flacarray.tests; flacarray.tests.run()' \
&& popd >/dev/null 2>&1
- name: Serial Tests
run: |
source ~/conda/etc/profile.d/conda.sh \
&& conda activate test \
&& export OMP_NUM_THREADS=2 \
&& mkdir -p test \
&& pushd test >/dev/null 2>&1 \
&& python3 -c 'import flacarray.tests; flacarray.tests.run()' \
&& popd >/dev/null 2>&1
- name: MPI Tests
run: |
source ~/conda/etc/profile.d/conda.sh \
&& conda activate test \
&& export OMP_NUM_THREADS=1 \
&& mkdir -p test \
&& pushd test >/dev/null 2>&1 \
&& mpirun -np 2 python -m mpi4py -c 'import flacarray.tests; flacarray.tests.run()' \
&& popd >/dev/null 2>&1
- name: External C Link Tests (Dynamic)
run: |
source ~/conda/etc/profile.d/conda.sh \
&& conda activate test \
&& export OMP_NUM_THREADS=2 \
&& cmake -S packaging/test_c_link -B build_c_link \
&& cmake --build build_c_link \
&& ctest --test-dir build_c_link
- name: External C Link Tests (Static)
run: |
source ~/conda/etc/profile.d/conda.sh \
&& conda activate test \
&& export OMP_NUM_THREADS=2 \
&& cmake -S packaging/test_c_link -B build_c_link_static \
&& cmake --build build_c_link_static \
&& ctest --test-dir build_c_link_static