GitHub Action
Setup GHDL
GitHub Action to setup GHDL
setup-ghdl-ci is a JavaScript GitHub Action (GHA) to setup GHDL using nightly release assets. Latest packages are retrieved and installed along with required dependencies, to enable testing of VHDL designs in Continuous Integration (CI) workflows.
Currently, GitHub Actions workflow tasks running on Ubuntu or Windows are supported only. Precisely environments ubuntu-18.04
, ubuntu-20.04
|ubuntu-latest
, ubuntu-22.04
, windows-2019
or windows-2022
|windows-latest
can be used.
Contributions for supporting addional platforms or CI services are welcome! For instance, GHDL is already tested on GitHub Actions macos-latest
, but packaging is not done yet.
See test.yml and the actions tab for runs of this action! 🚀
This Action sets envvars GHDL
, GHDL_PREFIX
, and (on Windows only) MSYS2_PATH
. Those can be used for running GHDL from shells other than bash
.
- uses: ghdl/setup-ghdl-ci@nightly
with:
backend: llvm
- run: |
ghdl --version
$GHDL --version
Allowed values for backend
are: mcode
(default), llvm
or gcc
.
- uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: true
- uses: ghdl/setup-ghdl-ci@nightly
with:
backend: llvm
- shell: msys2 {0}
run: |
ghdl --version
$GHDL --version
- shell: bash
run: |
$GHDL --version
"$MSYS2_PATH"MINGW64\\bin\\ghdl.exe --version
- shell: powershell
run: |
& "$env:GHDL" --version
& "$($env:MSYS2_PATH)MINGW64\bin\ghdl.exe" --version
Note that MSYS2 must be setup first. Using Action msys2/setup-msys2
is recommended.
Allowed values are MINGW64
, MINGW32
, or UCRT64
.
Note that simulation with mcode backend on 64 bits is not supported yet, and backend LLVM is not available on 32 bits yet.
Changes should be done in main.js
, but are uneffective until JS sources are packaged. Packaging generates index.js
, which is the entry point for GitHub Actions (as defined in action.yml
). Packaging assembles the code into one file, enabling fast and reliable execution and preventing the need to check in node_modules
.
$ npm install
$ npm run pkg
- See the metadata documentation
- See the toolkit documentation for the various packages.
- See the versioning documentation