-
Notifications
You must be signed in to change notification settings - Fork 29
140 lines (140 loc) · 4.73 KB
/
main.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
132
133
134
135
136
137
138
139
140
---
name: "Build and Test"
"on": [push, pull_request]
jobs:
pre_build:
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@v5
with:
concurrent_skipping: 'same_content'
skip_after_successful_duplicate: 'true'
do_not_skip: '["pull_request", "workflow_dispatch", "schedule"]'
build:
needs: pre_build
if: ${{ needs.pre_build.outputs.should_skip != 'true' }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [self-hosted, ubuntu-latest, macos-latest]
python-version: ['3.8', '3.10', '3.12']
include:
- os: ubuntu-20.04
python-version: '3.6'
- os: macos-latest
python-version: '3.6'
fail-fast: false
steps:
- name: "Software Install - Ubuntu"
if: ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'ubuntu-20.04' || matrix.os == 'self-hosted' }}
run: |
sudo apt-get update && \
sudo apt-get install -y \
autoconf \
automake \
build-essential \
ca-certificates \
curl \
exuberant-ctags \
gfortran \
git \
libhwloc-dev \
libopenblas-dev \
libtool \
pkg-config \
software-properties-common
- name: "Software Install - MacOS"
if: ${{ matrix.os == 'macos-latest' }}
run: |
brew install \
curl \
ctags-exuberant \
gawk \
gnu-sed \
hwloc \
pkg-config
- uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
- name: "Software Install - Python"
run: python -m pip install \
setuptools \
"numpy<2" \
matplotlib \
contextlib2 \
simplejson \
pint \
graphviz \
ctypesgen==1.0.2 \
pylint \
coverage
- name: "Software Install - Python, part 2"
if: ${{ matrix.os == 'self-hosted' }}
# Setting CPLUS_INCLUDE_PATH helps pycuda find the right
# Python header files <pyconfig.h> to use with its embedded
# subset of Boost.
env:
CPLUS_INCLUDE_PATH: "${{ env.pythonLocation }}/include/python\
${{ matrix.python-version }}"
run: python -m pip install \
cupy-cuda12x \
pycuda \
numba \
jupyterlab \
jupyter_client \
nbformat \
nbconvert
- name: "Software Install - PSRDADA"
if: ${{ matrix.os == 'ubuntu-20.04' || matrix.os == 'self-hosted' }}
run: |
git clone git://git.code.sf.net/p/psrdada/code psrdada
cd psrdada
./bootstrap
./configure
make -j all
sudo make install
cd ..
- uses: actions/checkout@v3
- name: "Build and Install"
run: |
./configure
make -j all
sudo make install
- name: Test
env:
LD_LIBRARY_PATH: /usr/local/lib:${{ env.LD_LIBRARY_PATH }}
run: |
python -m pip install scipy
cd test
bash ./download_test_data.sh
python -c "from bifrost import telemetry; telemetry.disable()"
coverage run --source=bifrost.ring,bifrost,bifrost.pipeline \
-m unittest discover
coverage xml
- name: "Test, part 2"
if: ${{ matrix.os == 'self-hosted' }}
env:
LD_LIBRARY_PATH: /usr/local/lib:${{ env.LD_LIBRARY_PATH }}
run: |
cd testbench
python generate_test_data.py
coverage run --source=bifrost.ring,bifrost,bifrost.pipeline test_file_read_write.py
coverage run --source=bifrost.ring,bifrost,bifrost.pipeline test_fft.py
coverage run --source=bifrost.ring,bifrost,bifrost.pipeline your_first_block.py
python download_breakthrough_listen_data.py -y
coverage run --source=bifrost.ring,bifrost,bifrost.pipeline test_fdmt.py ./testdata/pulsars/blc0_guppi_57407_61054_PSR_J1840%2B5640_0004.fil
coverage xml
- name: "Upload Coverage"
env:
UNITTEST_OS: ${{ matrix.os }}
UNITTEST_PY: ${{ matrix.python-version }}
if: ${{ matrix.os == 'self-hosted' && matrix.python-version == '3.8' }}
uses: codecov/codecov-action@v4
with:
files: ./test/coverage.xml, ./testbench/coverage.xml
env_vars: UNITTEST_OS,UNITTEST_PY
fail_ci_if_error: false
verbose: true