-
Notifications
You must be signed in to change notification settings - Fork 10
executable file
·132 lines (110 loc) · 3.81 KB
/
ccpp.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
name: Build and test
on:
push:
branches:
- "*"
pull_request:
branches:
- "*"
jobs:
build:
strategy:
matrix:
name: [ubuntu-gcc-9,
ubuntu-gcc-10,
ubuntu-clang-15
]
include:
- name: ubuntu-gcc-9
os: ubuntu-latest
compiler: gcc
version: "9"
- name: ubuntu-gcc-10
os: ubuntu-latest
compiler: gcc
version: "10"
- name: ubuntu-clang-15
os: ubuntu-latest
compiler: clang
version: "15"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v3
with:
python-version: 3.8
- name: Install dependencies (linux)
if: runner.os == 'Linux' && matrix.name != 'windows'
run: |
sudo apt-get install libcppunit-dev valgrind r-base-core lcov doxygen graphviz ccache
if [ "${{ matrix.compiler }}" = "gcc" ]; then
sudo apt-get install -y g++-${{ matrix.version }}
echo "CC=ccache gcc-${{ matrix.version }}" >> $GITHUB_ENV
echo "CXX=ccache g++-${{ matrix.version }}" >> $GITHUB_ENV
else
sudo apt-get install -y clang-${{ matrix.version }}
echo "CC=ccache clang-${{ matrix.version }}" >> $GITHUB_ENV
echo "CXX=ccache clang++-${{ matrix.version }}" >> $GITHUB_ENV
fi
- name: Install dependencies (macOS)
if: runner.os == 'macOS'
run: |
brew install cppunit r lcov doxygen graphviz ccache coreutils automake
echo "DEVELOPER_DIR=/Applications/Xcode_${{ matrix.version }}.app/Contents/Developer" >> $GITHUB_ENV
echo "CC=ccache clang" >> $GITHUB_ENV
echo "CXX=ccache clang++" >> $GITHUB_ENV
ccache --set-config=cache_dir=$HOME/.ccache
- name: Install python packages
run: python3 -mpip install cpp-coveralls cpplint
- name: Check style
run: cpplint --version # .ci/style.sh
- name: Prepare ccache timestamp
id: ccache_cache_timestamp
run: |
if [ "$RUNNER_OS" = "Linux" ]; then
stamp=$(date '+%s')
else
stamp=$(gdate '+%s')
fi
echo "${stamp}"
echo "::set-output name=timestamp::${stamp}"
- name: ccache cache files
uses: actions/cache@v2
with:
path: ~/.ccache
key: ${{ matrix.name }}-ccache-${{ steps.ccache_cache_timestamp.outputs.timestamp }}
restore-keys: |
${{ matrix.name }}-ccache-
- name: configure
run: ./bootstrap
- name: make
run: make -j2
- name: make check
run: make -j2 check
- name: make install
run: sudo make install
- name: test
run: |
# Mac OS does not have valgrind!
if [ "$RUNNER_OS" == Linux ]; then echo ::group::binary ; ./tests/test_binary.sh; fi
echo ::group::POS
./tests/testPOS.sh
echo ::group::binaryVcf
./tests/test_binaryVcfVsTxt.sh
echo ::group::test-against-previous-version
./tests/test-against-previous-version.sh
echo ::group::binary reproducible
./tests/test_binaryReproducible.sh
- name: docs
run: if [ $TRAVIS_OS_NAME == linux ]; then cd docs/doxygen; doxygen Doxyfile; fi
- name: run coverage
if: matrix.name == 'ubuntu-gcc-9'
run: |
tests/test-coverage-coverall.sh
# See: https://github.com/marketplace/actions/coveralls-github-action
- name: Coveralls
if: matrix.name == 'ubuntu-gcc-9'
uses: coverallsapp/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
#run: coveralls --exclude lib --exclude tests --exclude src/random --exclude src/codeCogs/ --exclude src/export/ --exclude src/gzstream/ --gcov-options '\-lp'