-
Notifications
You must be signed in to change notification settings - Fork 9
130 lines (110 loc) · 3.37 KB
/
ci-build.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
name: CI
on:
pull_request:
branches:
- develop
- master
- main
jobs:
test-full:
name: Basic Test Suite
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest]
python-version: ["3.10"]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Check Python Version
run: python --version
- name: Install macOS Dependencies
if: runner.os == 'macOS'
run: |
brew tap sfarrens/sf
brew install bigmac
brew install catch2 cfitsio fftw libomp armadillo gsl healpix
- name: Install Linux Dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y libcfitsio-dev
sudo apt-get install -y libfftw3-dev
sudo apt-get install -y libarmadillo-dev
sudo apt-get install -y libgsl-dev
sudo apt-get install -y libsharp-dev
sudo apt-get install -y libhealpix-cxx-dev
sudo apt-get install -y healpy-data
wget https://github.com/catchorg/Catch2/archive/refs/tags/v3.1.0.tar.gz
tar -xvf v3.1.0.tar.gz
cd Catch2-3.1.0
cmake -Bbuild -H. -DBUILD_TESTING=OFF
sudo cmake --build build/ --target install
cd
- name: Compile Sparse2D Binaries
run: |
mkdir build
cd build
cmake .. --log-level=VERBOSE
make -j 4
- name: Run Unit Tests
run: |
cd build
make test
- name: Archive Unit Test Log
uses: actions/upload-artifact@v4
with:
name: test-log-${{ matrix.os }}
retention-days: 14
path: |
build/Testing/Temporary/LastTest.log
test-pysap:
name: PySAP Compatibility Test
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10"]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Check Python Version
run: python --version
- name: Install Linux Dependencies
run: |
sudo apt-get update
sudo apt-get install -y libcfitsio-dev
sudo apt-get install -y python3
sudo apt-get install -y python3-pip
wget https://github.com/catchorg/Catch2/archive/refs/tags/v3.1.0.tar.gz
tar -xvf v3.1.0.tar.gz
cd Catch2-3.1.0
cmake -Bbuild -H. -DBUILD_TESTING=OFF
sudo cmake --build build/ --target install
cd
- name: Compile Sparse2D Binaries
run: |
mkdir build
cd build
cmake .. --log-level=VERBOSE -DONLY_SPARSE=ON -DUSE_FFTW=OFF -DBUILD_CFITSIO=ON
make -j 4
- name: Run Unit Tests
run: |
cd build
make test
- name: Archive Unit Test Log
uses: actions/upload-artifact@v4
with:
name: test-log-pysap
retention-days: 14
path: |
build/Testing/Temporary/LastTest.log