forked from github/verilator
Tests: Add coverage github action
This commit is contained in:
parent
3c680ddf22
commit
a15540dfdd
101
.github/workflows/coverage.yml
vendored
Normal file
101
.github/workflows/coverage.yml
vendored
Normal file
@ -0,0 +1,101 @@
|
|||||||
|
# DESCRIPTION: Github actions config
|
||||||
|
|
||||||
|
name: coverage
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
schedule:
|
||||||
|
- cron: '0 0 * * 0' # weekly
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
vlt:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-20.04]
|
||||||
|
compiler: [gcc]
|
||||||
|
include:
|
||||||
|
- compiler: gcc
|
||||||
|
cc: gcc
|
||||||
|
cxx: g++
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
name: ${{ matrix.os }}-${{ matrix.compiler }}-build-test
|
||||||
|
env:
|
||||||
|
CI_OS_NAME: linux
|
||||||
|
CI_COMMIT: ${{ github.sha }}
|
||||||
|
CCACHE_COMPRESS: 1
|
||||||
|
CCACHE_DIR: ${{ github.workspace }}/.ccache
|
||||||
|
CCACHE_MAXSIZE: 2Gi # 2GiB for clang and gcc, 4GiB in total
|
||||||
|
COVERAGE: 1
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Cache
|
||||||
|
uses: actions/cache@v2
|
||||||
|
env:
|
||||||
|
cache-name: ccache
|
||||||
|
with:
|
||||||
|
path: ${{ github.workspace }}/.ccache
|
||||||
|
key: ${{ matrix.os }}-${{ matrix.compiler }}-${{ env.cache-name }}-${{ github.sha }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ matrix.os }}-${{ matrix.compiler }}-${{ env.cache-name }}
|
||||||
|
- name: Install packages for build
|
||||||
|
env:
|
||||||
|
CI_BUILD_STAGE_NAME: build
|
||||||
|
run: bash ci/ci-install.bash
|
||||||
|
- name: CCACHE maintenance
|
||||||
|
run: mkdir -p $CCACHE_DIR && bash ci/ci-ccache-maint.bash
|
||||||
|
- name: Build
|
||||||
|
env:
|
||||||
|
CI_BUILD_STAGE_NAME: build
|
||||||
|
run: bash ci/ci-script.bash
|
||||||
|
- name: Install packages for tests
|
||||||
|
env:
|
||||||
|
CI_BUILD_STAGE_NAME: test
|
||||||
|
run: bash ci/ci-install.bash
|
||||||
|
|
||||||
|
- name: Test coverage-dist
|
||||||
|
env:
|
||||||
|
CI_BUILD_STAGE_NAME: test
|
||||||
|
TESTS: coverage-dist
|
||||||
|
run: bash ci/ci-script.bash
|
||||||
|
- name: Test coverage-vlt-0
|
||||||
|
env:
|
||||||
|
CI_BUILD_STAGE_NAME: test
|
||||||
|
TESTS: coverage-vlt-0
|
||||||
|
run: bash ci/ci-script.bash
|
||||||
|
- name: Test coverage-vlt-1
|
||||||
|
env:
|
||||||
|
CI_BUILD_STAGE_NAME: test
|
||||||
|
TESTS: coverage-vlt-1
|
||||||
|
run: bash ci/ci-script.bash
|
||||||
|
- name: Test coverage-vlt-2
|
||||||
|
env:
|
||||||
|
CI_BUILD_STAGE_NAME: test
|
||||||
|
TESTS: coverage-vlt-2
|
||||||
|
run: bash ci/ci-script.bash
|
||||||
|
- name: Test coverage-vlt-3
|
||||||
|
env:
|
||||||
|
CI_BUILD_STAGE_NAME: test
|
||||||
|
TESTS: coverage-vlt-3
|
||||||
|
run: bash ci/ci-script.bash
|
||||||
|
- name: Test coverage-vltmt-0
|
||||||
|
env:
|
||||||
|
CI_BUILD_STAGE_NAME: test
|
||||||
|
TESTS: coverage-vltmt-0
|
||||||
|
run: bash ci/ci-script.bash
|
||||||
|
- name: Test coverage-vltmt-1
|
||||||
|
env:
|
||||||
|
CI_BUILD_STAGE_NAME: test
|
||||||
|
TESTS: coverage-vltmt-1
|
||||||
|
run: bash ci/ci-script.bash
|
||||||
|
- name: Test coverage-vltmt-2
|
||||||
|
env:
|
||||||
|
CI_BUILD_STAGE_NAME: test
|
||||||
|
TESTS: coverage-vltmt-2
|
||||||
|
run: bash ci/ci-script.bash
|
||||||
|
- name: Test coverage-vltmt-3
|
||||||
|
env:
|
||||||
|
CI_BUILD_STAGE_NAME: test
|
||||||
|
TESTS: coverage-vltmt-3
|
||||||
|
run: bash ci/ci-script.bash
|
@ -428,10 +428,10 @@ sub run {
|
|||||||
our $_Ci_Action;
|
our $_Ci_Action;
|
||||||
sub ci_fold_start {
|
sub ci_fold_start {
|
||||||
$_Ci_Action = shift;
|
$_Ci_Action = shift;
|
||||||
print "travis_fold:start:$_Ci_Action\n";
|
print "::group::$_Ci_Action\n";
|
||||||
}
|
}
|
||||||
sub ci_fold_end {
|
sub ci_fold_end {
|
||||||
print "travis_fold:end:$_Ci_Action\n";
|
print "::endgroup::\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
#######################################################################
|
#######################################################################
|
||||||
|
Loading…
Reference in New Issue
Block a user