mirror of
https://github.com/verilator/verilator.git
synced 2025-01-07 15:17:36 +00:00
02835f199b
GitHub Actions allow a total 5 GB of cache storage space per repository, after which it will evict old caches. Tweaked cache sizes so master + a few PRs can fit at the same time. Don't cache coverage builds as they run weekly and with additional compiler options, so their caches would likely be state anyway.
88 lines
1.7 KiB
YAML
88 lines
1.7 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
|
|
|
|
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
|
|
|
|
- name: Install packages for build
|
|
env:
|
|
CI_BUILD_STAGE_NAME: build
|
|
run: ./ci/ci-install.bash
|
|
|
|
- name: Build
|
|
run: |
|
|
./ci/ci-script.bash
|
|
tar cvzf verilator-${CI_COMMIT}-coverage.tgz bin src/obj*/*.o src/obj*/*.gcno
|
|
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
path: verilator-${{ env.CI_COMMIT }}-coverage.tgz
|
|
|
|
|
|
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: Checkout
|
|
uses: actions/checkout@v2
|
|
|
|
- uses: actions/download-artifact@v2
|
|
|
|
- name: Install Verilator and test dependencies
|
|
run: |
|
|
tar xvzf artifact/verilator-${CI_COMMIT}-coverage.tgz
|
|
touch src/obj*/*.o src/obj*/*.gcno
|
|
./ci/ci-install.bash
|
|
|
|
- name: Test
|
|
env:
|
|
TESTS: coverage-${{ matrix.test }}${{ matrix.num }}
|
|
run: |
|
|
./ci/ci-script.bash
|