Setup GHDL in GitHub Action Workflows
June 16, 2026 ยท View on GitHub
Setup GHDL in GitHub Action Workflows
This composite action, installs GHDL in a GitHub Action's workflow job.
Important
This GitHub Action replaces setup-ghdl-ci.
Features
- Select GHDL version:
- tagged release like
5.0.1,5.1.1,6.0.0, or - latest release, currently
6.0.0, or nightlyrelease (rolling release).latestrelease (retrieved from latest nightly release'sinventory.json).
- tagged release like
- Select GHDL backend:
- mcode
- LLVM
- LLVM-JIT (new)
- GCC (deprecated).
- Activate an investigation mode (check and show GHDL installation, ...).
- Supported runner OS' provided by GitHub (automatically detected):
- Ubuntu 24.04 (LTS),
- Ubuntu 26.04 (LTS),
- macOS-14 (aarch64),
- macOS-15 (aarch64),
- Windows Server 2025.
Usage
jobs:
GHDL-on-Ubuntu:
runs-on: ubuntu-24.04
steps:
- name: Run VHDL Simulation
uses: ghdl/setup-ghdl@v1
with:
version: nightly
backend: mcode
investigate: true
GHDL-on-macOS:
runs-on: macOS-15
steps:
- name: Run VHDL Simulation
uses: ghdl/setup-ghdl@v1
with:
version: nightly
backend: llvm
GHDL-on-Windows:
runs-on: windows-2025
steps:
- name: Run VHDL Simulation
uses: ghdl/setup-ghdl@v1
with:
version: nightly
backend: mcode
GHDL-on-Windows-with-UCRT64:
runs-on: windows-2025
steps:
- name: ๐ฆ Setup MSYS2 for UCRT64
uses: msys2/setup-msys2@v2
with:
msystem: ucrt64
update: true
- name: Run VHDL Simulation
uses: ghdl/setup-ghdl@v1
with:
version: nightly
backend: mcode
runtime: ucrt64
Input Parameters
| Parameter | Required | Default | Description |
|---|---|---|---|
version | no | 'nightly' | A tagged GHDL version (starting at v5.1.1), latest or nightly. |
backend | no | 'mcode' | GHDL backend: llvm, llvm-jit, mcode, gcc. |
runtime | no | '' | If runner OS is Windows, a MSYS2 runtime can be selected (mingw64, ucrt64). If not set, Windows native is used (not MSYS2 environment). |
install-directory | no | 'install' | Local installation directory, in case an archive asset is downloaded and extracted. |
investigate | no | false | If enabled, more details are printed and check the GHDL installation is checked. |
Output Parameters
| Parameter | Description |
|---|---|
ghdl-bin-directory | tbd |
ghdl-lib-directory | tbd |
Behavior and Dependencies
On Linux (Ubuntu)
- Download GHDL asset from https://github.com/ghdl/ghdl/releases as
*.tar.gzand extract files intoinstall-directory. - Further dependencies will be installed using
apt-getand reading the embeddedubuntu.requirementsfile. - GHDL's
bindirectory will be added toPATH.
On macOS
- Download GHDL asset from https://github.com/ghdl/ghdl/releases as
*.tar.gzand extract files intoinstall-directory. - All dependencies are contained within the archive, thus no further dependencies need to be installed.
- GHDL's
bindirectory will be added toPATH.
On Windows (native)
- Download GHDL asset from https://github.com/ghdl/ghdl/releases as
*.zipintoinstall-directory. - The archive is extracted into the same directory.
- All dependencies are contained within the archive, thus no further dependencies need to be installed.
- GHDL's
bindirectory will be added toPATH.
On Windows + MSYS2
- Download GHDL asset from https://github.com/ghdl/ghdl/releases as
*.pkg.tar.zstinstallation package for pacman. - Install this package.
- Further dependencies get automatically installed by pacman, as listed as dependencies in the package.
- No need to modify
PATH, because GHDL got installed into the MSYS2 system.
Contributors
- Patrick Lehmann (Maintainer)
- and more...
Credits
This GitHub Action replaces setup-ghdl-ci, a Javascript Action developed by
Unai Martinez-Corral, with a composite action using simples instructions (curl, tar,
apt-get) written in Bash or Powershell.
License
This GitHub Composite Action (source code) licensed under The MIT License.
SPDX-License-Identifier: MIT