Skip to content

umarcor/setup-ghdl-ci

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

'test' workflow Status

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-20.04, ubuntu-22.04|ubuntu-latest, 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.

Usage

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.

Ubuntu

- uses: ghdl/setup-ghdl-ci@nightly
  with:
    backend: llvm

- run: |
    ghdl --version

    $GHDL --version

Allowed values for backend are: mcode (default), llvm or gcc.

Windows

- 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.

Development

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

About

JavaScript action for users to easily install nightly GHDL assets in GitHub Actions workflows

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%