mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-22 01:51:51 +00:00
ci: move coverage run to github
This also connects the coverage run to codecov.io. Signed-off-by: Adrian Reber <areber@redhat.com>
This commit is contained in:
parent
6be56e92c8
commit
3a4bffc143
14
.github/workflows/gcov-test.yml
vendored
Normal file
14
.github/workflows/gcov-test.yml
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
name: Coverage Tests
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-20.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Run Coverage Tests
|
||||
run: sudo -E make -C scripts/ci local GCOV=1
|
||||
- name: Run Coverage Analysis
|
||||
run: sudo -E make codecov
|
@ -43,7 +43,6 @@ jobs:
|
||||
allow_failures:
|
||||
- env: TR_ARCH=docker-test
|
||||
- env: TR_ARCH=docker-test DIST=xenial
|
||||
- env: TR_ARCH=local GCOV=1
|
||||
script:
|
||||
- sudo make CCACHE=1 -C scripts/ci $TR_ARCH
|
||||
after_success:
|
||||
|
5
Makefile
5
Makefile
@ -403,6 +403,11 @@ lint:
|
||||
shellcheck scripts/*.sh
|
||||
shellcheck scripts/ci/*.sh scripts/ci/apt-install
|
||||
|
||||
codecov: SHELL := $(shell which bash)
|
||||
codecov:
|
||||
bash <(curl -s https://codecov.io/bash)
|
||||
.PHONY: codecov
|
||||
|
||||
include Makefile.install
|
||||
|
||||
.DEFAULT_GOAL := all
|
||||
|
@ -64,12 +64,6 @@ ci_prep () {
|
||||
fi
|
||||
CI_PKGS="$CI_PKGS $CC"
|
||||
|
||||
[ -n "$GCOV" ] && {
|
||||
apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
|
||||
scripts/ci/apt-install --no-install-suggests g++-7
|
||||
CC=gcc-7
|
||||
}
|
||||
|
||||
# ccache support, only enable for non-GCOV case
|
||||
if [ "$CCACHE" = "1" ] && [ -z "$GCOV" ]; then
|
||||
# ccache is installed by default, need to set it up
|
||||
@ -291,5 +285,10 @@ make -C test/others/libcriu run
|
||||
# external namespace testing
|
||||
make -C test/others/ns_ext run
|
||||
|
||||
# Skip all further tests when running with GCOV=1
|
||||
# The one test which currently cannot handle GCOV testing is compel/test
|
||||
# Probably because the GCOV Makefile infrastructure does not exist in compel
|
||||
[ -n "$GCOV" ] && exit 0
|
||||
|
||||
# compel testing
|
||||
make -C compel/test
|
||||
|
Loading…
x
Reference in New Issue
Block a user