CI: Put all OS builds into build-deploy workflow, add passed job (#6358)

This commit is contained in:
Wilson Snyder 2025-09-03 06:32:10 -04:00 committed by GitHub
parent 041dad92cf
commit 1e4ede08b6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 147 additions and 156 deletions

View File

@ -3,7 +3,7 @@
# This name is key to badges in README.rst, so we use the name build
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
name: build
name: build-test
on:
push:
@ -17,7 +17,6 @@ permissions:
defaults:
run:
shell: bash
working-directory: repo
concurrency:
@ -27,7 +26,7 @@ concurrency:
jobs:
build-2404-gcc:
name: Build
name: Build-Ubuntu
uses: ./.github/workflows/reusable-build.yml
with:
os: ${{ matrix.os }}
@ -39,7 +38,7 @@ jobs:
- {os: ubuntu-24.04, cc: gcc}
build-2404-clang:
name: Build
name: Build-Ubuntu
uses: ./.github/workflows/reusable-build.yml
with:
os: ${{ matrix.os }}
@ -51,7 +50,7 @@ jobs:
- {os: ubuntu-24.04, cc: clang}
build-2204-gcc:
name: Build
name: Build-Ubuntu
uses: ./.github/workflows/reusable-build.yml
with:
os: ${{ matrix.os }}
@ -63,7 +62,7 @@ jobs:
- {os: ubuntu-22.04, cc: gcc}
build-2204-clang:
name: Build
name: Build-Ubuntu
uses: ./.github/workflows/reusable-build.yml
with:
os: ${{ matrix.os }}
@ -74,6 +73,69 @@ jobs:
include:
- {os: ubuntu-22.04, cc: clang}
build-osx-gcc:
name: Build-OSX
uses: ./.github/workflows/reusable-build.yml
with:
os: ${{ matrix.os }}
os-name: osx
cc: ${{ matrix.cc }}
strategy:
fail-fast: false
matrix:
include:
- {os: macos-15, cc: gcc}
build-osx-clang:
name: Build-OSX
uses: ./.github/workflows/reusable-build.yml
with:
os: ${{ matrix.os }}
os-name: osx
cc: ${{ matrix.cc }}
strategy:
fail-fast: false
matrix:
include:
- {os: macos-15, cc: clang}
windows:
name: Build-Windows
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- {os: windows-2025, cc: msvc}
env:
CI_OS_NAME: win
CI_COMMIT: ${{ github.sha }}
CCACHE_COMPRESS: 1
CCACHE_DIR: ${{ github.workspace }}/.ccache
CCACHE_LIMIT_MULTIPLE: 0.95
steps:
- uses: actions/checkout@v4
with:
path: repo
- name: Cache $CCACHE_DIR
uses: actions/cache@v4
with:
path: ${{ env.CCACHE_DIR }}
key: msbuild-msvc-cmake
- name: compile
env:
WIN_FLEX_BISON: ${{ github.workspace }}/.ccache
run: ./ci/ci-win-compile.ps1
- name: test build
run: ./ci/ci-win-test.ps1
- name: Zip up repository
run: Compress-Archive -LiteralPath install -DestinationPath verilator.zip
- name: Upload zip archive
uses: actions/upload-artifact@v4
with:
path: ${{ github.workspace }}/repo/verilator.zip
name: verilator-win.zip
test-2404-gcc:
name: Test | ${{ matrix.os }} | ${{ matrix.cc }}
needs: build-2404-gcc
@ -163,34 +225,30 @@ jobs:
- {os: ubuntu-22.04, cc: clang, reloc: 1, suite: vltmt-2}
lint-py:
runs-on: ubuntu-22.04
name: Lint Python
env:
CI_OS_NAME: linux
CI_COMMIT: ${{ github.sha }}
CI_BUILD_STAGE_NAME: build
CI_RUNS_ON: ubuntu-22.04
CCACHE_COMPRESS: 1
CCACHE_DIR: ${{ github.workspace }}/.ccache
CCACHE_LIMIT_MULTIPLE: 0.95
strategy:
fail-fast: false
uses: ./.github/workflows/reusable-lint-py.yml
passed:
name: Test suite passed
if: always()
needs:
- build-2404-gcc
- build-2404-clang
- build-2204-gcc
- build-2204-clang
- build-osx-gcc
- build-osx-clang
- windows
- test-2404-gcc
- test-2404-clang
- test-2204-gcc
- test-2204-clang
- lint-py
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
path: repo
- name: Install packages for build
run: ./ci/ci-install.bash
# We use specific version numbers, otherwise a Python package
# update may add a warning and break our build
- name: Install packages for lint
run: sudo pip3 install pylint==3.0.2 ruff==0.1.3 clang sphinx sphinx_rtd_theme sphinxcontrib-spelling breathe ruff
- name: Configure
run: autoconf && ./configure --enable-longtests --enable-ccwarn
- name: Lint
run: make -k lint-py
jobs: ${{ toJSON(needs) }}

View File

@ -92,6 +92,6 @@ jobs:
- name: Upload coverage data to Codecov
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: |
run: |-
find . -name '*.gcno' -exec rm {} \;
./ci/codecov -v upload-process -Z --sha ${{ github.sha }} -f nodist/obj_dir/coverage/app_total.info

View File

@ -38,7 +38,7 @@ jobs:
make -j 2 format CLANGFORMAT=clang-format-18 &&
git status
- name: Push
run: |
run: |-
if [ -n "$(git status --porcelain)" ]; then
git commit . -m "Apply 'make format'" &&
git push origin

View File

@ -1,52 +0,0 @@
---
# DESCRIPTION: Github actions config
# This name is key to badges in README.rst, so we use the name build
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
#
name: msbuild
on:
push:
pull_request:
workflow_dispatch:
schedule:
- cron: 0 0 * * 0 # weekly
permissions:
contents: read
env:
CI_OS_NAME: win
CI_COMMIT: ${{ github.sha }}
CCACHE_COMPRESS: 1
CCACHE_DIR: ${{ github.workspace }}/.ccache
CCACHE_LIMIT_MULTIPLE: 0.95
defaults:
run:
working-directory: repo
concurrency:
group: ${{ github.workflow }}-${{ github.actor }}-${{ github.event_name == 'pull_request' && github.ref || github.run_id }}
cancel-in-progress: true
jobs:
windows:
name: run on windows
runs-on: windows-2025
steps:
- uses: actions/checkout@v4
with:
path: repo
- name: Cache $CCACHE_DIR
uses: actions/cache@v4
with:
path: ${{ env.CCACHE_DIR }}
key: msbuild-msvc-cmake
- name: compile
env:
WIN_FLEX_BISON: ${{ github.workspace }}/.ccache
run: ./ci/ci-win-compile.ps1
- name: test build
run: ./ci/ci-win-test.ps1
- name: Zip up repository
run: Compress-Archive -LiteralPath install -DestinationPath verilator.zip
- name: Upload zip archive
uses: actions/upload-artifact@v4
with:
path: ${{ github.workspace }}/repo/verilator.zip
name: verilator-win.zip

View File

@ -1,53 +0,0 @@
---
# DESCRIPTION: Github actions config
# This name is key to badges in README.rst, so we use the name build
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
#
name: osx-build
on:
push:
pull_request:
workflow_dispatch:
schedule:
- cron: 0 0 * * 0 # weekly
permissions:
contents: read
defaults:
run:
shell: bash
working-directory: repo
concurrency:
group: ${{ github.workflow }}-${{ github.actor }}-${{ github.event_name == 'pull_request' && github.ref || github.run_id }}
cancel-in-progress: true
jobs:
build-osx-gcc:
name: Build
uses: ./.github/workflows/reusable-build.yml
with:
os: ${{ matrix.os }}
os-name: osx
cc: ${{ matrix.cc }}
strategy:
fail-fast: false
matrix:
include:
- {os: macos-15, cc: gcc}
build-osx-clang:
name: Build
uses: ./.github/workflows/reusable-build.yml
with:
os: ${{ matrix.os }}
os-name: osx
cc: ${{ matrix.cc }}
strategy:
fail-fast: false
matrix:
include:
- {os: macos-15, cc: clang}

47
.github/workflows/reusable-lint-py.yml vendored Normal file
View File

@ -0,0 +1,47 @@
---
# DESCRIPTION: Github actions config
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
name: reusable-lint-py
on:
workflow_call:
env:
CI_OS_NAME: linux
CI_COMMIT: ${{ github.sha }}
CI_BUILD_STAGE_NAME: build
CI_RUNS_ON: ubuntu-22.04
CCACHE_COMPRESS: 1
CCACHE_DIR: ${{ github.workspace }}/.ccache
CCACHE_LIMIT_MULTIPLE: 0.95
defaults:
run:
shell: bash
working-directory: repo
jobs:
lint-py:
runs-on: ubuntu-22.04
name: Sub-lint | Python
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: repo
- name: Install packages for build
run: ./ci/ci-install.bash
# We use specific version numbers, otherwise a Python package
# update may add a warning and break our build
- name: Install packages for lint
run: sudo pip3 install pylint==3.0.2 ruff==0.1.3 clang sphinx sphinx_rtd_theme sphinxcontrib-spelling breathe ruff
- name: Configure
run: autoconf && ./configure --enable-longtests --enable-ccwarn
- name: Lint
run: make -k lint-py

View File

@ -7,10 +7,8 @@ name: RTLMeter PR results
on:
workflow_run:
workflows:
- RTLMeter
types:
- completed
workflows: [RTLMeter]
types: [completed]
jobs:
publish:
@ -44,7 +42,7 @@ jobs:
- name: Comment on PR
env:
GH_TOKEN: ${{ steps.generate-token.outputs.token }}
run: |
run: |-
ls -la
cat report.txt
gh pr --repo ${{ github.repository }} comment $(cat pr-number.txt) --body-file report.txt

View File

@ -10,12 +10,7 @@ on:
schedule:
- cron: '0 2 * * *' # Daily, starting at 02:00 UTC
pull_request:
types:
- opened
- synchronize
- reopened
- labeled
- unlabeled
types: [opened, synchronize, reopened, labeled, unlabeled]
permissions:
contents: read
@ -155,9 +150,7 @@ jobs:
strategy:
fail-fast: false
matrix:
tag:
- gcc
- clang
tag: [gcc, clang]
steps:
- name: Checkout RTLMeter
uses: actions/checkout@v4
@ -357,7 +350,7 @@ jobs:
- name: Create issue
env:
GH_TOKEN: ${{ steps.generate-token.outputs.token }}
run: |
run: |-
echo "This issue was created automatically by the GitHub Actions CI due to the failure of a scheduled RTLMeter run." >> body.txt
echo "" >> body.txt
echo "Workflow status: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" >> body.txt