forked from LuaJIT/LuaJIT
-
Notifications
You must be signed in to change notification settings - Fork 13
64 lines (61 loc) · 2.15 KB
/
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
name: Code coverage
on:
push:
branches-ignore:
- '**-notest'
- 'upstream-**'
tags-ignore:
- '**'
concurrency:
# An update of a developer branch cancels the previously
# scheduled workflow run for this branch. However, the default
# branch, and long-term branch (tarantool/release/2.11,
# tarantool/release/2.10, etc) workflow runs are never canceled.
#
# We use a trick here: define the concurrency group as 'workflow
# run ID' + # 'workflow run attempt' because it is a unique
# combination for any run. So it effectively discards grouping.
#
# XXX: we cannot use `github.sha` as a unique identifier because
# pushing a tag may cancel a run that works on a branch push
# event.
group: ${{ startsWith(github.ref, 'refs/heads/tarantool/')
&& format('{0}-{1}', github.run_id, github.run_attempt)
|| format('{0}-{1}', github.workflow, github.ref) }}
cancel-in-progress: true
jobs:
coverage:
strategy:
fail-fast: false
runs-on: [self-hosted, regular, x86_64, Linux]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: setup Linux
uses: ./.github/actions/setup-linux
- name: install gcovr
uses: ./.github/actions/setup-gcovr
- name: configure
run: >
cmake -S . -B ${{ env.BUILDDIR }}
-G Ninja
-DCMAKE_BUILD_TYPE=RelWithDebInfo
-DLUAJIT_ENABLE_COVERAGE=ON
-DLUAJIT_ENABLE_GC64=ON
- name: build
run: cmake --build . --parallel
working-directory: ${{ env.BUILDDIR }}
- name: run regression tests
run: cmake --build ${{ env.BUILDDIR }} --parallel --target LuaJIT-test
- name: generate code coverage report
run: cmake --build ${{ env.BUILDDIR }} --parallel --target LuaJIT-coverage
- name: send code coverage to coveralls.io
run: |
curl -LO https://coveralls.io/coveralls-linux.tar.gz
tar xvzf coveralls-linux.tar.gz
./coveralls -f ./coverage/luajit.xml
working-directory: ${{ env.BUILDDIR }}
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}