verilator/.github/workflows/coverage.yml

66 lines
1.6 KiB
YAML
Raw Normal View History

2020-12-08 02:57:10 +00:00
# DESCRIPTION: Github actions config
2020-12-10 02:10:34 +00:00
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
2020-12-08 02:57:10 +00:00
name: coverage
2020-12-10 01:30:18 +00:00
on:
2020-12-08 02:57:10 +00:00
workflow_dispatch:
schedule:
- cron: '0 0 * * 0' # weekly
2020-12-10 01:30:18 +00:00
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
CI_BUILD_STAGE_NAME: test
2020-12-08 02:57:10 +00:00
jobs:
2020-12-10 01:30:18 +00:00
buildjob:
2020-12-10 01:38:41 +00:00
runs-on: ubuntu-20.04
2020-12-10 01:30:18 +00:00
steps:
2020-12-10 01:37:11 +00:00
- uses: actions/checkout@v2
2020-12-10 02:30:31 +00:00
- uses: actions/cache@v2
env:
cache-name: ccache
with:
path: ${{ github.workspace }}/.ccache
key: coverage-${{ env.cache-name }}-${{ github.sha }}
restore-keys: |
coverage-${{ env.cache-name }}
2020-12-10 02:33:22 +00:00
- run: bash -c "CI_BUILD_STAGE_NAME=build ci/ci-install-build.bash"
2020-12-10 01:30:18 +00:00
test:
2020-12-10 01:30:18 +00:00
needs: buildjob
strategy:
fail-fast: false
matrix:
test:
- vlt-
- vltmt-
num:
- 0
- 1
- 2
- 3
include:
- { test: dist, num: '' }
name: test-${{ matrix.test }}${{ matrix.num }}
2020-12-10 01:38:41 +00:00
runs-on: ubuntu-20.04
2020-12-10 01:30:18 +00:00
steps:
2020-12-10 01:37:11 +00:00
- uses: actions/checkout@v2
2020-12-10 02:30:31 +00:00
- uses: actions/cache@v2
env:
cache-name: ccache
with:
path: ${{ github.workspace }}/.ccache
key: coverage-${{ env.cache-name }}-${{ github.sha }}
restore-keys: |
coverage-${{ env.cache-name }}
2020-12-10 02:33:22 +00:00
- run: bash -c "CI_BUILD_STAGE_NAME=build ci/ci-install-build.bash"
- run: bash -c "TESTS=coverage-${{ matrix.test }}${{ matrix.num }} ci/ci-script.bash"