-
Notifications
You must be signed in to change notification settings - Fork 73
55 lines (52 loc) · 2.06 KB
/
Copy path_code-coverage.yml
File metadata and controls
55 lines (52 loc) · 2.06 KB
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
# Reusable workflow: code coverage build + Coveralls upload.
# Called by ci.yml. Do not add push/pull_request triggers here.
name: Code Coverage
on:
workflow_call:
permissions:
contents: read
jobs:
code-coverage:
name: lcov + Coveralls
runs-on: ubuntu-latest
env:
CFLAGS: "-fprofile-arcs -ftest-coverage -fprofile-update=atomic -O0"
CXXFLAGS: "-fprofile-arcs -ftest-coverage -fprofile-update=atomic -O0"
LDFLAGS: "-fprofile-arcs -ftest-coverage -O0"
TRICK_CFLAGS: "-fprofile-arcs -ftest-coverage -fprofile-update=atomic -O0"
TRICK_CXXFLAGS: "-fprofile-arcs -ftest-coverage -fprofile-update=atomic -O0"
TRICK_SYSTEM_LDFLAGS: "-fprofile-arcs -ftest-coverage -O0"
TRICK_SYSTEM_CFLAGS: "-fprofile-arcs -ftest-coverage -fprofile-update=atomic -O0"
TRICK_SYSTEM_CXXFLAGS: "-fprofile-arcs -ftest-coverage -fprofile-update=atomic -O0"
steps:
- name: Install Dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -y \
bison clang flex git llvm make maven cmake zip \
g++ libclang-dev llvm-dev \
default-jdk libxml2-dev libmotif-dev libxt-dev \
perl libdigest-md5-perl libudunits2-dev zlib1g-dev \
python3-dev python3-pip python3-venv swig \
libgtest-dev libgmock-dev lcov
- name: Checkout repository
uses: actions/checkout@v7
- name: Configure Trick
run: |
echo "MAKEFLAGS=-j$(nproc)" >> "$GITHUB_ENV"
echo "JAVA_HOME=$(dirname $(dirname $(readlink -f $(which java))))" >> "$GITHUB_ENV"
./configure
- name: Build Trick
run: make
- name: Generate Code Coverage
run: |
python3 -m venv share/trick/trickops/.venv
. share/trick/trickops/.venv/bin/activate
pip3 install -r share/trick/trickops/requirements.txt
make code-coverage
- name: Upload to Coveralls
uses: coverallsapp/github-action@v2
continue-on-error: true
with:
file: coverage.info
format: lcov