mirror of
https://github.com/verilator/verilator.git
synced 2025-01-07 15:17:36 +00:00
CI: coverage action parallelism
This commit is contained in:
parent
7d05be802d
commit
9a904b97b2
3
.github/workflows/build.yml
vendored
3
.github/workflows/build.yml
vendored
@ -3,9 +3,10 @@
|
|||||||
|
|
||||||
name: build
|
name: build
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
pull_request:
|
pull_request:
|
||||||
|
workflow_dispatch:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 0 * * 0' # weekly
|
- cron: '0 0 * * 0' # weekly
|
||||||
|
|
||||||
|
33
.github/workflows/coverage-build-action.yml
vendored
Normal file
33
.github/workflows/coverage-build-action.yml
vendored
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
# DESCRIPTION: Github actions config
|
||||||
|
|
||||||
|
name: coverage-build-action
|
||||||
|
description: "Common steps needed for coverage build jobs"
|
||||||
|
|
||||||
|
runs:
|
||||||
|
using: "Composite"
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Cache
|
||||||
|
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 }}
|
||||||
|
|
||||||
|
- name: Install and build
|
||||||
|
env:
|
||||||
|
CI_BUILD_STAGE_NAME: build
|
||||||
|
run: |
|
||||||
|
bash ci/ci-install.bash
|
||||||
|
mkdir -p $CCACHE_DIR && bash ci/ci-ccache-maint.bash
|
||||||
|
bash ci/ci-script.bash
|
||||||
|
|
||||||
|
- name: Install packages for tests
|
||||||
|
env:
|
||||||
|
CI_BUILD_STAGE_NAME: test
|
||||||
|
run: bash ci/ci-install.bash
|
115
.github/workflows/coverage.yml
vendored
115
.github/workflows/coverage.yml
vendored
@ -2,60 +2,79 @@
|
|||||||
|
|
||||||
name: coverage
|
name: coverage
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 0 * * 0' # weekly
|
- 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:
|
jobs:
|
||||||
vlt:
|
buildjob:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
runs-on: ubuntu-20.04
|
||||||
os: [ubuntu-20.04]
|
|
||||||
compiler: [gcc]
|
|
||||||
include:
|
|
||||||
- compiler: gcc
|
|
||||||
cc: gcc
|
|
||||||
cxx: g++
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
name: ${{ matrix.os }}-${{ matrix.compiler }}-build-test
|
|
||||||
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
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Build
|
||||||
uses: actions/checkout@v2
|
uses: actions/coverage-build-action
|
||||||
- name: Cache
|
|
||||||
uses: actions/cache@v2
|
|
||||||
env:
|
|
||||||
cache-name: ccache
|
|
||||||
with:
|
|
||||||
path: ${{ github.workspace }}/.ccache
|
|
||||||
key: ${{ matrix.os }}-${{ matrix.compiler }}-${{ env.cache-name }}-${{ github.sha }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ matrix.os }}-${{ matrix.compiler }}-${{ env.cache-name }}
|
|
||||||
- name: Install packages for build
|
|
||||||
env:
|
|
||||||
CI_BUILD_STAGE_NAME: build
|
|
||||||
run: bash ci/ci-install.bash
|
|
||||||
- name: CCACHE maintenance
|
|
||||||
run: mkdir -p $CCACHE_DIR && bash ci/ci-ccache-maint.bash
|
|
||||||
- name: Build
|
|
||||||
env:
|
|
||||||
CI_BUILD_STAGE_NAME: build
|
|
||||||
run: bash ci/ci-script.bash
|
|
||||||
- name: Install packages for tests
|
|
||||||
env:
|
|
||||||
CI_BUILD_STAGE_NAME: test
|
|
||||||
run: bash ci/ci-install.bash
|
|
||||||
|
|
||||||
- name: Test coverage-all
|
test-dist:
|
||||||
env:
|
needs: buildjob
|
||||||
CI_BUILD_STAGE_NAME: test
|
steps:
|
||||||
TESTS: coverage-all
|
- uses: actions/coverage-build-action
|
||||||
run: bash ci/ci-script.bash
|
- run: bash TESTS=coverage-dist ci/ci-script.bash
|
||||||
|
|
||||||
|
test-vlt-0:
|
||||||
|
needs: buildjob
|
||||||
|
steps:
|
||||||
|
- uses: actions/coverage-build-action
|
||||||
|
- run: bash TESTS=coverage-vlt-0 ci/ci-script.bash
|
||||||
|
|
||||||
|
test-vlt-1:
|
||||||
|
needs: buildjob
|
||||||
|
steps:
|
||||||
|
- uses: actions/coverage-build-action
|
||||||
|
- run: bash TESTS=coverage-vlt-1 ci/ci-script.bash
|
||||||
|
|
||||||
|
test-vlt-2:
|
||||||
|
needs: buildjob
|
||||||
|
steps:
|
||||||
|
- uses: actions/coverage-build-action
|
||||||
|
- run: bash TESTS=coverage-vlt-2 ci/ci-script.bash
|
||||||
|
|
||||||
|
test-vlt-3:
|
||||||
|
needs: buildjob
|
||||||
|
steps:
|
||||||
|
- uses: actions/coverage-build-action
|
||||||
|
- run: bash TESTS=coverage-vlt-3 ci/ci-script.bash
|
||||||
|
|
||||||
|
test-vltmt-0:
|
||||||
|
needs: buildjob
|
||||||
|
steps:
|
||||||
|
- uses: actions/coverage-build-action
|
||||||
|
- run: bash TESTS=coverage-vltmt-0 ci/ci-script.bash
|
||||||
|
|
||||||
|
test-vltmt-1:
|
||||||
|
needs: buildjob
|
||||||
|
steps:
|
||||||
|
- uses: actions/coverage-build-action
|
||||||
|
- run: bash TESTS=coverage-vltmt-1 ci/ci-script.bash
|
||||||
|
|
||||||
|
test-vltmt-2:
|
||||||
|
needs: buildjob
|
||||||
|
steps:
|
||||||
|
- uses: actions/coverage-build-action
|
||||||
|
- run: bash TESTS=coverage-vltmt-2 ci/ci-script.bash
|
||||||
|
|
||||||
|
test-vltmt-3:
|
||||||
|
needs: buildjob
|
||||||
|
steps:
|
||||||
|
- uses: actions/coverage-build-action
|
||||||
|
- run: bash TESTS=coverage-vltmt-3 ci/ci-script.bash
|
||||||
|
Loading…
Reference in New Issue
Block a user