-
Notifications
You must be signed in to change notification settings - Fork 19
53 lines (52 loc) · 1.64 KB
/
lgm-ci.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
name: lgm-ci
on:
# Trigger the workflow on push or pull request,
# but only for the main branch
push:
branches:
- master
pull_request:
branches:
- master
workflow_dispatch:
jobs:
basic-suite:
runs-on: ubuntu-20.04
steps:
- name: Install python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependencies for C lib
run: |
sudo apt-get update -qq
sudo apt-get install -y make gcc g++ autotools-dev autoconf check
sudo apt-get install -y libgsl-dev libgsl23 gsl-bin libgsl-dbg
sudo apt-get install -y libhdf5-dev libperl-dev
gcc --version
gsl-config --version
python -m pip install cpplint
- name: Checkout
uses: actions/checkout@v2
- name: Code style checks
run: |
cpplint --filter=-whitespace,-readability,+build,-build/include_subdir,-build/header_guard,-build/include_what_you_use,-legal,+runtime,-runtime/int,-runtime/printf,-runtime/threadsafe_fn --linelength=120 --exclude=Examples/KdTree/magConj.c Examples/*/*.h Examples/*/*.c Tools/*.c libLanlGeoMag/Lgm_* libLanlGeoMag/Lgm/Lgm_*
- name: compile_test
run: |
autoreconf -i
./configure
make
sudo make install
- name: unit_tests
run: |
make check
- name: diagnostics
if: failure()
run: |
cat tests/check_ClosedField.log
cat tests/check_CoordTrans.log
cat tests/check_DE421.log
cat tests/check_IsoTimeStringToDateTime.log
cat tests/check_Lstar.log
cat tests/check_MagModels.log
cat tests/check_libLanlGeoMag.log