-
Notifications
You must be signed in to change notification settings - Fork 16
41 lines (37 loc) · 1.36 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
name: C/C++ CI
on: [push, pull_request]
# push:
# branches: [ master ]
# pull_request:
# branches: [ master ]
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.7'
- name: dependencies
run: |
sudo apt update -qq
sudo apt install swig libboost-dev libarmadillo9 libarmadillo-dev cmake python3-setuptools python3-numpy python3-pip lcov
- name: configure
run: mkdir build && cd build && cmake -DBUILD_R=no -DCMAKE_BUILD_TYPE=DEBUG -DENABLE_TESTS=ON ..
- name: build
run: cd build && VERBOSE=1 make develop-python-user
- name: test
run: |
cd build
/usr/bin/python3 -m pip install coverage nose
make tests
lcov --directory CMakeFiles/gridpp.dir/src/api --capture --output-file coverage.info
lcov --remove coverage.info '/usr/*' --output-file coverage.info
lcov --list coverage.info
# - name: test
# run: |
# /usr/bin/python3 -c "import gridpp; print(gridpp.version())"
# /usr/bin/python3 -m pip install --upgrade pip
# /usr/bin/python3 -m pip install coverage nose
# coverage run --omit */*-packages/*,*tests* -m nose
# coverage report