verilator/.github/workflows/coverage.yml
2020-12-09 21:33:22 -05:00

181 lines
5.1 KiB
YAML

# DESCRIPTION: Github actions config
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
name: coverage
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * 0' # weekly
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
jobs:
buildjob:
strategy:
fail-fast: false
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- 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 }}
- run: bash -c "CI_BUILD_STAGE_NAME=build ci/ci-install-build.bash"
test-dist:
needs: buildjob
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- 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 }}
- run: bash -c "CI_BUILD_STAGE_NAME=build ci/ci-install-build.bash"
- run: bash -c "TESTS=coverage-dist ci/ci-script.bash"
test-vlt-0:
needs: buildjob
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- 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 }}
- run: bash -c "CI_BUILD_STAGE_NAME=build ci/ci-install-build.bash"
- run: bash -c "TESTS=coverage-vlt-0 ci/ci-script.bash"
test-vlt-1:
needs: buildjob
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- 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 }}
- run: bash -c "CI_BUILD_STAGE_NAME=build ci/ci-install-build.bash"
- run: bash -c "TESTS=coverage-vlt-1 ci/ci-script.bash"
test-vlt-2:
needs: buildjob
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- 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 }}
- run: bash -c "CI_BUILD_STAGE_NAME=build ci/ci-install-build.bash"
- run: bash -c "TESTS=coverage-vlt-2 ci/ci-script.bash"
test-vlt-3:
needs: buildjob
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- 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 }}
- run: bash -c "CI_BUILD_STAGE_NAME=build ci/ci-install-build.bash"
- run: bash -c "TESTS=coverage-vlt-3 ci/ci-script.bash"
test-vltmt-0:
needs: buildjob
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- 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 }}
- run: bash -c "CI_BUILD_STAGE_NAME=build ci/ci-install-build.bash"
- run: bash -c "TESTS=coverage-vltmt-0 ci/ci-script.bash"
test-vltmt-1:
needs: buildjob
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- 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 }}
- run: bash -c "CI_BUILD_STAGE_NAME=build ci/ci-install-build.bash"
- run: bash -c "TESTS=coverage-vltmt-1 ci/ci-script.bash"
test-vltmt-2:
needs: buildjob
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- 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 }}
- run: bash -c "CI_BUILD_STAGE_NAME=build ci/ci-install-build.bash"
- run: bash -c "TESTS=coverage-vltmt-2 ci/ci-script.bash"
test-vltmt-3:
needs: buildjob
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- 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 }}
- run: bash -c "CI_BUILD_STAGE_NAME=build ci/ci-install-build.bash"
- run: bash -c "TESTS=coverage-vltmt-3 ci/ci-script.bash"