-
Notifications
You must be signed in to change notification settings - Fork 22
74 lines (68 loc) · 2.78 KB
/
code_coverage.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
name: Code Coverage
on:
push:
branches:
- master
paths-ignore:
- 'docs/**'
- '.github/workflows/**'
- '!.github/workflows/code_coverage.yml'
pull_request:
workflow_dispatch:
jobs:
code-coverage:
runs-on: ubuntu-latest
container: docker://oraclelinux:8
steps:
- name: Update Package Manager
run: |
dnf -y install epel-release
dnf -y update
dnf install -y 'dnf-command(config-manager)'
- name: Install Dependencies
run: |
dnf install -y bison clang flex git llvm make maven cmake zip clang-devel gcc gcc-c++ java-11-openjdk-devel libxml2-devel llvm-devel llvm-static ncurses-devel openmotif openmotif-devel perl perl-Digest-MD5 udunits2 udunits2-devel which zlib-devel python2-devel python3-devel swig diffutils lcov
- name: Install GTest
run: |
dnf config-manager --enable ol8_codeready_builder
dnf install -y gtest-devel gmock-devel
- name: Checkout repository
uses: actions/checkout@master
- name: Configure Trick
run: |
export MAKEFLAGS=-j`nproc`
export PYTHON_VERSION=3
./configure
- name: Build Trick
run: |
export MAKEFLAGS=-j`nproc`
export CFLAGS="-fprofile-arcs -ftest-coverage -O0"
export CXXFLAGS="-fprofile-arcs -ftest-coverage -O0"
export LDFLAGS="-fprofile-arcs -ftest-coverage -O0"
export TRICK_CFLAGS="-fprofile-arcs -ftest-coverage -O0"
export TRICK_CXXFLAGS="-fprofile-arcs -ftest-coverage -O0"
export TRICK_SYSTEM_LDFLAGS="-fprofile-arcs -ftest-coverage -O0"
export TRICK_SYSTEM_CFLAGS="-fprofile-arcs -ftest-coverage -O0"
export TRICK_SYSTEM_CXXFLAGS="-fprofile-arcs -ftest-coverage -O0"
export JAVA_HOME=$(dirname $(dirname $(readlink -f `which java`)))
make
- name: Generate Code Coverage
run: |
export MAKEFLAGS=-j`nproc`
export CFLAGS="-fprofile-arcs -ftest-coverage -O0"
export CXXFLAGS="-fprofile-arcs -ftest-coverage -O0"
export LDFLAGS="-fprofile-arcs -ftest-coverage -O0"
export TRICK_CFLAGS="-fprofile-arcs -ftest-coverage -O0"
export TRICK_CXXFLAGS="-fprofile-arcs -ftest-coverage -O0"
export TRICK_SYSTEM_LDFLAGS="-fprofile-arcs -ftest-coverage -O0"
export TRICK_SYSTEM_CFLAGS="-fprofile-arcs -ftest-coverage -O0"
export TRICK_SYSTEM_CXXFLAGS="-fprofile-arcs -ftest-coverage -O0"
cd share/trick/trickops/
python3 -m venv .venv && . .venv/bin/activate && pip3 install -r requirements.txt
cd ../../../
make code-coverage
- name: Upload to Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: "./coverage.info"