--- # DESCRIPTION: Github actions config # SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0 name: Regression on: push: branches-ignore: - 'dependabot/**' # Avoid duplicates: only run the PR, not the push pull_request: types: [opened, synchronize, reopened, labeled, unlabeled] workflow_dispatch: schedule: - cron: '0 0 * * 0' # weekly permissions: contents: read actions: read defaults: run: working-directory: repo concurrency: # At most 1 job per branch. Auto cancel on pull requests and on all forks. # Label events that do not concern the 'pr: regression' label are given a # unique concurrency group, so they do not cancel a run that is in progress. # This way adding the label starts a run, removing it cancels the in-progress # run, and any other label change has no effect. Note such an event still # creates a run of this workflow, which is skipped, and would then hide the # one in progress on the pull request. 'pr-run-cleanup.yml' deletes those. group: >- ${{ github.workflow }}-${{ github.ref }}-${{ (github.event.action == 'labeled' || github.event.action == 'unlabeled') && github.event.label.name != 'pr: regression' && github.run_id || 'shared' }} cancel-in-progress: ${{ github.event_name == 'pull_request' || github.repository != 'verilator/verilator' }} jobs: start: name: Start # Only run pull request jobs if labelled as needing a regression run. # Always run push, workflow dispatch and scheduled jobs if: | (github.event_name == 'pull_request' && ((github.event.action == 'labeled' && github.event.label.name == 'pr: regression') || (github.event.action != 'labeled' && github.event.action != 'unlabeled' && contains(github.event.pull_request.labels.*.name, 'pr: regression')))) || (github.event_name == 'push') || (github.event_name == 'workflow_dispatch') || (github.event_name == 'schedule') runs-on: ubuntu-slim defaults: run: working-directory: . # The workflow default is not checked out here steps: - name: Enabled run: echo "Regression is enabled for this run" build-2604-gcc: name: Build | 26.04 | gcc needs: start uses: ./.github/workflows/reusable-build.yml with: cc: gcc runs-on: ubuntu-26.04 sha: ${{ github.sha }} build-2604-clang: name: Build | 26.04 | clang needs: start uses: ./.github/workflows/reusable-build.yml with: cc: clang dev-asan: true # Build (and run) with address sanitizer runs-on: ubuntu-26.04 sha: ${{ github.sha }} build-2404-gcc: name: Build | 24.04 | gcc needs: start uses: ./.github/workflows/reusable-build.yml with: cc: gcc runs-on: ubuntu-24.04 sha: ${{ github.sha }} build-2404-clang: name: Build | 24.04 | clang needs: start uses: ./.github/workflows/reusable-build.yml with: cc: clang runs-on: ubuntu-24.04 sha: ${{ github.sha }} build-2204-gcc: name: Build | 22.04 | gcc needs: start uses: ./.github/workflows/reusable-build.yml with: cc: gcc runs-on: ubuntu-22.04 sha: ${{ github.sha }} build-macos-26-clang: name: Build | macos-26 | clang needs: start uses: ./.github/workflows/reusable-build.yml with: cc: clang runs-on: macos-26 sha: ${{ github.sha }} build-windows: name: Build | windows-2025-vs2026 | msvc needs: start runs-on: windows-2025-vs2026 steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 with: path: repo - name: Cache win_flex_bison uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v5 with: path: ${{ github.workspace }}/win_flex_bison key: win_flex_bison - name: compile run: ./ci/ci-win-compile.ps1 - name: test build run: ./ci/ci-win-test.ps1 test-2604-gcc: name: Test | 26.04 | gcc | ${{ matrix.suite }} needs: build-2604-gcc uses: ./.github/workflows/reusable-test.yml with: archive: ${{ needs.build-2604-gcc.outputs.archive }} cc: gcc runs-on: ubuntu-26.04 suite: ${{ matrix.suite }} strategy: fail-fast: false matrix: suite: [dist-vlt-0, dist-vlt-1, dist-vlt-2, dist-vlt-3, vltmt-0, vltmt-1, vltmt-2] test-2604-clang: name: Test | 26.04 | clang | ${{ matrix.suite }} needs: build-2604-clang uses: ./.github/workflows/reusable-test.yml with: archive: ${{ needs.build-2604-clang.outputs.archive }} cc: clang runs-on: ubuntu-26.04 suite: ${{ matrix.suite }} strategy: fail-fast: false matrix: suite: [dist-vlt-0, dist-vlt-1, dist-vlt-2, dist-vlt-3, vltmt-0, vltmt-1, vltmt-2] test-2404-gcc: name: Test | 24.04 | gcc | ${{ matrix.suite }} needs: build-2404-gcc uses: ./.github/workflows/reusable-test.yml with: archive: ${{ needs.build-2404-gcc.outputs.archive }} cc: gcc runs-on: ubuntu-24.04 suite: ${{ matrix.suite }} strategy: fail-fast: false matrix: suite: [dist-vlt-0, dist-vlt-1, dist-vlt-2, dist-vlt-3, vltmt-0, vltmt-1, vltmt-2] test-2404-clang: name: Test | 24.04 | clang | ${{ matrix.suite }} needs: build-2404-clang uses: ./.github/workflows/reusable-test.yml with: archive: ${{ needs.build-2404-clang.outputs.archive }} cc: clang reloc: true # Test with relocated installation runs-on: ubuntu-24.04 suite: ${{ matrix.suite }} strategy: fail-fast: false matrix: suite: [dist-vlt-0, dist-vlt-1, dist-vlt-2, dist-vlt-3, vltmt-0, vltmt-1, vltmt-2] test-2204-gcc: name: Test | 22.04 | gcc | ${{ matrix.suite }} needs: build-2204-gcc uses: ./.github/workflows/reusable-test.yml with: archive: ${{ needs.build-2204-gcc.outputs.archive }} cc: gcc runs-on: ubuntu-22.04 suite: ${{ matrix.suite }} strategy: fail-fast: false matrix: suite: [dist-vlt-0, dist-vlt-1, dist-vlt-2, dist-vlt-3, vltmt-0, vltmt-1, vltmt-2] lint-py: name: Lint Python needs: start uses: ./.github/workflows/reusable-lint-py.yml passed: name: Regression passed # This job is used as a required status check on PRs if: ${{ !cancelled() && needs.start.result != 'skipped' }} needs: - start - build-2604-gcc - build-2604-clang - build-2404-gcc - build-2404-clang - build-2204-gcc - build-macos-26-clang - build-windows - test-2604-gcc - test-2604-clang - test-2404-gcc - test-2404-clang - test-2204-gcc - lint-py runs-on: ubuntu-slim steps: - name: Check all needed jobs succeeded working-directory: . run: jq -e 'all(.result == "success")' <<< '${{ toJSON(needs) }}'