mirror of
https://github.com/verilator/verilator.git
synced 2025-01-07 15:17:36 +00:00
01a54d6960
Prep for adding more CI targets. Building dbg and opt in the same job (as standard) simplifies caching, debugging and artifact handling. With ccache it should not take much longer either. Also removes the need to re-configure in the test job.
99 lines
2.0 KiB
YAML
99 lines
2.0 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 }}
|
|
COVERAGE: 1
|
|
VERILATOR_ARCHIVE: verilator-coverage-${{ github.sha }}.tar.gz
|
|
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
working-directory: repo
|
|
|
|
jobs:
|
|
|
|
|
|
Build:
|
|
runs-on: ubuntu-20.04
|
|
env:
|
|
CI_BUILD_STAGE_NAME: build
|
|
CI_RUNS_ON: ubuntu-20.04
|
|
steps:
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
with:
|
|
path: repo
|
|
|
|
- name: Install packages for build
|
|
run: ./ci/ci-install.bash
|
|
|
|
- name: Build
|
|
run: ./ci/ci-script.bash
|
|
|
|
- name: Tar up repository
|
|
working-directory: ${{ github.workspace }}
|
|
run: tar --posix -c -z -f ${{ env.VERILATOR_ARCHIVE }} repo
|
|
|
|
- name: Upload tar archive
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
path: ${{ github.workspace }}/${{ env.VERILATOR_ARCHIVE }}
|
|
name: ${{ env.VERILATOR_ARCHIVE }}
|
|
|
|
|
|
Test:
|
|
needs: Build
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
test:
|
|
- vlt-
|
|
- vltmt-
|
|
num:
|
|
- 0
|
|
- 1
|
|
- 2
|
|
- 3
|
|
- 4
|
|
- 5
|
|
- 6
|
|
- 7
|
|
- 8
|
|
- 9
|
|
include:
|
|
- { test: dist, num: '' }
|
|
runs-on: ubuntu-20.04
|
|
name: test-${{ matrix.test }}${{ matrix.num }}
|
|
env:
|
|
CI_BUILD_STAGE_NAME: test
|
|
CI_RUNS_ON: ubuntu-20.04
|
|
steps:
|
|
|
|
- name: Download tar archive
|
|
uses: actions/download-artifact@v2
|
|
with:
|
|
name: ${{ env.VERILATOR_ARCHIVE }}
|
|
path: ${{ github.workspace }}
|
|
|
|
- name: Unpack tar archive
|
|
working-directory: ${{ github.workspace }}
|
|
run: tar -x -z -f ${{ env.VERILATOR_ARCHIVE }}
|
|
|
|
- name: Install test dependencies
|
|
run: ./ci/ci-install.bash
|
|
|
|
- name: Test
|
|
env:
|
|
TESTS: coverage-${{ matrix.test }}${{ matrix.num }}
|
|
run: ./ci/ci-script.bash
|