verilator/.github/workflows/coverage.yml

97 lines
1.9 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 }}
COVERAGE: 1
VERILATOR_ARCHIVE: verilator-coverage-${{ github.sha }}.tar.gz
2020-12-10 01:30:18 +00:00
2020-12-08 02:57:10 +00:00
jobs:
2020-12-10 01:30:18 +00:00
Build:
2021-03-28 15:47:45 +00:00
runs-on: ubuntu-20.04
env:
CI_BUILD_STAGE_NAME: build
2021-03-28 15:47:45 +00:00
CI_RUNS_ON: ubuntu-20.04
2020-12-10 01:30:18 +00:00
steps:
2021-03-28 13:54:50 +00:00
- name: Checkout
uses: actions/checkout@v2
2021-03-28 13:54:50 +00:00
- name: Install packages for build
env:
CI_BUILD_STAGE_NAME: build
run: ./ci/ci-install.bash
2021-03-28 13:54:50 +00:00
- name: Build
run: |
./ci/ci-script.bash
tar cvzf ${{ env.VERILATOR_ARCHIVE }} bin src/obj*/*.o src/obj*/*.gcno
- name: Upload Verilator artifact
uses: actions/upload-artifact@v2
with:
name: ${{ env.VERILATOR_ARCHIVE }}
path: ${{ env.VERILATOR_ARCHIVE }}
2020-12-10 01:30:18 +00:00
Test:
needs: Build
strategy:
fail-fast: false
matrix:
test:
- vlt-
- vltmt-
2021-03-28 16:47:35 +00:00
num:
- 0
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
include:
- { test: dist, num: '' }
2021-03-28 15:47:45 +00:00
runs-on: ubuntu-20.04
name: test-${{ matrix.test }}${{ matrix.num }}
env:
CI_BUILD_STAGE_NAME: test
2021-03-28 15:47:45 +00:00
CI_RUNS_ON: ubuntu-20.04
2020-12-10 01:30:18 +00:00
steps:
2021-03-28 13:54:50 +00:00
- name: Checkout
uses: actions/checkout@v2
- name: Download Verilator artifact
uses: actions/download-artifact@v2
with:
name: ${{ env.VERILATOR_ARCHIVE }}
- name: Unapack Verilator artifact
run: |
tar xvzf ${{ env.VERILATOR_ARCHIVE }}
2021-01-11 00:15:39 +00:00
touch src/obj*/*.o src/obj*/*.gcno
- name: Install test dependencies
run: |
./ci/ci-install.bash
- name: Test
env:
TESTS: coverage-${{ matrix.test }}${{ matrix.num }}
2021-06-10 00:04:43 +00:00
run: |
./ci/ci-script.bash