Skip to content

Commit

Permalink
v0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Paebbels authored Jan 11, 2025
2 parents abc9a58 + 9c656d8 commit 1f9743e
Show file tree
Hide file tree
Showing 6 changed files with 406 additions and 1 deletion.
17 changes: 17 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
root = true

[*]
charset = utf-8
# end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = tab
indent_size = 2
tab_width = 2

[*.{yml,yaml}]
indent_style = space
indent_size = 2

[*.md]
trim_trailing_whitespace = false
16 changes: 16 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: 2
updates:
# Maintain GitHub Action runners
- package-ecosystem: "github-actions"
directory: "/"
target-branch: dev
commit-message:
prefix: "[Dependabot]"
labels:
- Dependencies
assignees:
- Paebbels
reviewers:
- Paebbels
schedule:
interval: "daily" # Checks on Monday trough Friday.
30 changes: 30 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# New Features

* tbd
* tbd

# Changes

* tbd
* tbd

# Bug Fixes

* tbd
* tbd

# Documentation

* tbd
* tbd

# Unit Tests

* tbd
* tbd

----------
# Related Issues and Pull-Requests

* tbd
* tbd
46 changes: 46 additions & 0 deletions .github/workflows/Pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Verification of setup-ghdl

on:
push:
workflow_dispatch:

jobs:
Setup-GHDL-Nightly:
name: ${{ matrix.os.icon }} Setup GHDL ${{ matrix.os.backend }} on ${{ matrix.os.name }}
runs-on: ${{ matrix.os.image }}
strategy:
fail-fast: false
matrix:
os:
- {'icon': '🐧', 'name': 'Ubuntu', 'image': 'ubuntu-24.04', 'shell': 'bash', 'runtime': '', 'backend': 'mcode'}
- {'icon': '🐧', 'name': 'Ubuntu', 'image': 'ubuntu-24.04', 'shell': 'bash', 'runtime': '', 'backend': 'llvm'}
- {'icon': '🐧', 'name': 'Ubuntu', 'image': 'ubuntu-24.04', 'shell': 'bash', 'runtime': '', 'backend': 'llvm-jit'}
- {'icon': '🐧', 'name': 'Ubuntu', 'image': 'ubuntu-24.04', 'shell': 'bash', 'runtime': '', 'backend': 'gcc'}
- {'icon': '🍎', 'name': 'macOS', 'image': 'macos-13', 'shell': 'bash', 'runtime': '', 'backend': 'mcode'}
- {'icon': '🍎', 'name': 'macOS', 'image': 'macos-13', 'shell': 'bash', 'runtime': '', 'backend': 'llvm'}
- {'icon': '🍏', 'name': 'macOS', 'image': 'macos-14', 'shell': 'bash', 'runtime': '', 'backend': 'llvm'}
- {'icon': '🪟', 'name': 'Windows', 'image': 'windows-2022', 'shell': 'powershell','runtime': '', 'backend': 'mcode'}
- {'icon': '🪟', 'name': 'Windows', 'image': 'windows-2022', 'shell': 'msys2 {0}', 'runtime': 'ucrt64', 'backend': 'mcode'}
defaults:
run:
shell: ${{ matrix.os.shell }}

steps:
- name: 🟦 Setup MSYS2 for ${{ matrix.os.runtime }}
uses: msys2/setup-msys2@v2
if: startsWith(matrix.os.shell, 'msys2')
with:
msystem: ${{ matrix.os.runtime }}
update: true

- name: Setup GHDL ${{ matrix.os.backend }}
uses: paebbels/setup-ghdl@dev
with:
version: nightly
backend: ${{ matrix.os.backend }}
runtime: ${{ matrix.os.runtime }}
investigate: true

- name: Verify
run: |
ghdl --version
70 changes: 69 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,69 @@
# `setup-ghdl` GitHub Action
# Setup GHDL in GitHub Action Workflows

This composite action, installs GHDL in a GitHub Action's workflow job.


## Features

* Select GHDL version (tagged release or nightly build).
* Select GHDL backend (LLVM, LLVM-JIT, mcode, GCC)
* Activate an investigation mode (check and show GHDL installation, ...)
* Supported runner OS' (automatically detected): Ubuntu 2024.04, macOS (x86-64), macOS (aarch64), Windows

## Usage

```yaml
jobs:
MyJob:
steps:
- name: Run VHDL Simulation
uses: paebbels/setup-ghdl@v1
with:
version: nightly
backend: mcode
investigate: true
```
### Input Parameters
| Parameter | Required | Default | Description |
|----------------------------|:--------:|-------------|----------------------------------------------------------|
| `version` | no | `'nightly'` | A tagged GHDL version starting at `v5.0.0` or `nightly`. |
| `backend` | no | `'mcode'` | GHDL backend: `llvm`, `llvm-jit`, `mcode`, `gcc`. |
| `investigate` | no | `false` | If enabled, details and check GHDL installation. |


### Output Parameters

| Parameter | Description |
|--------------------|-------------|
| `ghdl-binary-dir` | tbd |
| `ghdl-library-dir` | tbd |


## Dependencies

### On Linux (Ubuntu)

* Further dependencies will be installed using `apt-get`.
* GHDL will be added to `PATH`.

### On macOS

*tbd*

### On Windows (native)


### On Windows + MSYS2

## Contributors

* [Patrick Lehmann](https://GitHub.com/Paebbels) (Maintainer)
* [and more...](https://GitHub.com/ghdl/setup-ghdl/graphs/contributors)

### Credits

This GitHub Action replaces `setup-ghdl-ci`, a Javascript Action developed by Umarcor, with a composite action using
simples instructions (`curl`, `tar`, `apt-get`) written in Bash.
Loading

0 comments on commit 1f9743e

Please sign in to comment.