Skip to content

Enforce code style using cpplint #75

Enforce code style using cpplint

Enforce code style using cpplint #75

Workflow file for this run

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