-
Notifications
You must be signed in to change notification settings - Fork 13
131 lines (113 loc) · 3.15 KB
/
run-tests.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
126
127
128
129
130
131
name: Run tests
on:
pull_request:
branches:
- master
push:
branches:
- master
env:
apt_options: -o Acquire::Retries=3
jobs:
build-linux-cpp:
name: Run tests on ubuntu-20.04
runs-on: ubuntu-20.04
strategy:
matrix:
compiler:
- CC: clang
CXX: clang++
- CC: gcc
CXX: g++
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: 'true'
- name: Install packages
run: |
sudo apt-get ${{env.apt_options}} update -y
sudo apt-get ${{env.apt_options}} install -y libhdf5-dev
- name: Build and run unittests
env:
CC: ${{ matrix.compiler.CC }}
CXX: ${{ matrix.compiler.CXX }}
run: |
./ci/cpp_test.sh
build-linux-cpp-phdf5:
name: Run tests on ubuntu-22.04 with pHDF5.
runs-on: ubuntu-22.04
strategy:
matrix:
compiler:
- CC: gcc
CXX: g++
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: 'true'
- name: Install packages
run: |
sudo apt-get ${{env.apt_options}} update -y
sudo apt-get ${{env.apt_options}} install -y libhdf5-openmpi-dev
- name: Build and run unittests
env:
CC: mpicc
CXX: mpic++
run: |
./ci/cpp_test.sh
build-linux-python:
name: Run python tests on ubuntu-20.04
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: 'true'
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: ${{ matrix.python-version }}
- name: Install packages
run: |
sudo apt-get ${{env.apt_options}} update -y
sudo apt-get ${{env.apt_options}} install -y libhdf5-dev doxygen
- name: Build and run unittests
run: |
./ci/python_test.sh
build-macos:
name: Run tests on macos
runs-on: macos-latest
env:
CIBW_ARCHS_MACOS: "x86_64"
CMAKE_OSX_ARCHITECTURES: "x86_64"
UNIXY_AEC_VERSION: 1.0.4
UNIXY_HDF5_VERSION: 1.14.2
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: 'true'
- name: Cache HDF5 On Linux/macOS
if: runner.os == 'Linux' || runner.os == 'macOS'
uses: actions/cache@v3
id: cache-hdf5-posix
env:
cache-name: cache-hdf5-posix
with:
path: src-cache/
key: ${{ runner.os }}-build-${{ env.cache-name }}
- name: Install packages on MacOS
run: |
mkdir -p $PWD/src-cache
ln -s $PWD/src-cache /Users/runner/work/src-cache
bash ci/hdf5-build.sh /Users/runner/work/src-cache
- name: Build and run unittests
run: |
export HDF5_ROOT=/Users/runner/work/src-cache/install-$CIBW_ARCHS_MACOS
./ci/cpp_test.sh
./ci/python_test.sh