Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.
/ setup-ghdl-ci Public archive

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

License

Notifications You must be signed in to change notification settings

ghdl/setup-ghdl-ci

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

86 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

'test' workflow Status

GitHub Action to setup GHDL

Caution

This GitHub Action (setup-ghdl-ci) has been deprecated in favor of the new setup-ghdl Action. Please update your YAMl files and transition to the new GitHub Action. See the linked repository for details on optional parameters. Quick example:

jobs:
  GHDL-on-Ubuntu:
    runs-on: ubuntu-24.04
    steps:
      - name: Run VHDL Simulation
        uses: ghdl/setup-ghdl@v1
        with:
          version: nightly
          backend: mcode

Why has it been changed?

  • The Javascript GitHub Action is hard to maintain.
    In addition, it has a high complexity with Node.js and other tools compare to a much simpler Composite Action using simple shell instructions in Bash/Powershell.
  • This action doesn't support the ubuntu-24.04 (= ubuntu-latest) runner image.
  • This Action uses wrong tagging to select GHDL versions. See analysis: ghdl/ghdl#2852
  • Due to changes in GHDL's nightly releases and attached assets, the filenames are broken.

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-24.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 tip/nightly GHDL assets in GitHub Actions workflows

Resources

License

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •