-
Notifications
You must be signed in to change notification settings - Fork 692
80 lines (66 loc) · 2.01 KB
/
Copy pathcode-coverage.yml
File metadata and controls
80 lines (66 loc) · 2.01 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
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
name: Code Coverage
on:
push:
branches:
- main
- develop
- develop-4.14
pull_request:
branches:
- main
- develop
- develop-4.14
env:
# Opt into Node.js 24 for all actions now, ahead of the June 2026 forced migration.
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Determine number of cores
run: |
CORES=$(nproc)
echo "cores=$CORES" >>$GITHUB_OUTPUT
echo "Using $CORES cores"
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y lcov build-essential autoconf automake libtool
- name: Unpack and List the test data
run: |
cd ..
pwd
wget -q https://digitalcorpora.s3.amazonaws.com/corpora/drives/tsk-2024/sleuthkit_test_data.zip
unzip sleuthkit_test_data.zip
cd sleuthkit_test_data
make unpack
find . -ls | grep -v '[.]git'
echo "SLEUTHKIT_TEST_DATA_DIR=$(pwd)" >> $GITHUB_ENV
- name: Run bootstrap
run: |
./bootstrap
- name: Configure with coverage flags
run: |
./configure CFLAGS="--coverage -fprofile-update=atomic" CXXFLAGS="--coverage -fprofile-update=atomic" LDFLAGS="--coverage"
- name: Build project
run: make -j$(nproc)
- name: Run tests
run: make check V=0
- name: Generate coverage report
run: |
lcov --capture --directory . --output-file coverage.info
lcov --remove coverage.info '/usr/*' --output-file coverage.info --ignore-errors unused
lcov --list coverage.info
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false
files: coverage.info
flags: unittests
name: sleuthkit-codecov
- uses: ammaraskar/[email protected]
name: GCC Problem Matcher