# 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 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 ${{ 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 }} 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 - name: Download Verilator artifact uses: actions/download-artifact@v2 with: name: ${{ env.VERILATOR_ARCHIVE }} - name: Unapack Verilator artifact run: | tar xvzf ${{ env.VERILATOR_ARCHIVE }} 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 }} run: | ./ci/ci-script.bash