Skip to content

Commit

Permalink
Added grouping of outputs for Linux variant.
Browse files Browse the repository at this point in the history
  • Loading branch information
Paebbels committed Jan 10, 2025
1 parent 40f3a50 commit c3e4a00
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 14 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/Pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,25 @@ jobs:
fail-fast: false
matrix:
os:
- {'icon': '🐧', 'name': 'Ubuntu', 'image': 'ubuntu-24.04', 'backend': 'mcode'}
- {'icon': '🍏', 'name': 'macOS', 'image': 'macos-14', 'backend': 'mcode'}
- {'icon': '🪟', 'name': 'Windows', 'image': 'windows-2022', 'backend': 'mcode'}
- {'icon': '🐧', 'name': 'Ubuntu', 'image': 'ubuntu-24.04', 'shell': 'bash', 'backend': 'mcode'}
- {'icon': '🐧', 'name': 'Ubuntu', 'image': 'ubuntu-24.04', 'shell': 'bash', 'backend': 'llvm'}
- {'icon': '🐧', 'name': 'Ubuntu', 'image': 'ubuntu-24.04', 'shell': 'bash', 'backend': 'llvm-jit'}
- {'icon': '🐧', 'name': 'Ubuntu', 'image': 'ubuntu-24.04', 'shell': 'bash', 'backend': 'gcc'}
- {'icon': '🍎', 'name': 'macOS', 'image': 'macos-13', 'shell': 'bash', 'backend': 'mcode'}
- {'icon': '🍏', 'name': 'macOS', 'image': 'macos-14', 'shell': 'bash', 'backend': 'llvm'}
- {'icon': '🪟', 'name': 'Windows', 'image': 'windows-2022', 'shell': 'bash', 'backend': 'mcode'}
defaults:
run:
shell: bash
shell: ${{ matrix.os.shell }}

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

- name: Verify
run: |
ghdl --version
27 changes: 17 additions & 10 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ runs:
if: runner.os == 'Linux' && runner.arch == 'X64'
shell: bash
run: |
ANSI_LIGHT_BLUE="\e[94m"
ANSI_NOCOLOR=$'\x1b[0m'
source /etc/lsb-release
if [[ "${DISTRIB_RELEASE}" != "24.04" ]]; then
Expand Down Expand Up @@ -82,16 +85,20 @@ runs:
mkdir -p "${{ inputs.install-directory }}"
cd "${{ inputs.install-directory }}"
printf "Downloading asset and extracting tar.gz file ...\n"
curl -L "https://github.com/ghdl/ghdl/releases/download/${VERSION_IN_URL}/ghdl-${{ inputs.backend }}-${VERSION_IN_FILE}-ubuntu${DISTRIB_RELEASE}-x86_64.tar.gz" | tar -xz --strip-components 1
(
cd bin
pwd
ls -lAh .
)
# tree .
printf "Installing dependencies from './ubuntu.requirements' using 'apt-get' ...\n"
DOWNLOAD_URL="https://github.com/ghdl/ghdl/releases/download/${VERSION_IN_URL}/ghdl-${{ inputs.backend }}-${VERSION_IN_FILE}-ubuntu${DISTRIB_RELEASE}-x86_64.tar.gz"
printf "::group::${ANSI_LIGHT_BLUE}%s${ANSI_NOCOLOR}\n" "Downloading asset and extracting '${DOWNLOAD_URL}' file ..."
curl -L "${DOWNLOAD_URL}z" | tar -xz --strip-components 1
printf "::endgroup::\n"
if [[ "${{ inputs.investigate }}" == "true" ]]; then
printf "::group::${ANSI_LIGHT_BLUE}%s.${ANSI_NOCOLOR}\n" "Content of '$(pwd)'"
tree -pash .
printf "::endgroup::\n"
fi
printf "::group::${ANSI_LIGHT_BLUE}%s.${ANSI_NOCOLOR}\n" Installing dependencies from './ubuntu.requirements' using 'apt-get' ..."
sudo xargs --no-run-if-empty -a ./ubuntu.requirements -- apt-get install -y --no-install-recommends
printf "::endgroup::\n"
)
printf "Setting environment variable 'GHDL_PREFIX' ...\n"
Expand Down Expand Up @@ -187,7 +194,7 @@ runs:
exit 1
fi
if [[ "${{ inputs.backend }}" != "mcode" ]]; then
if [[ "${{ inputs.backend }}" != "llvm" ]]; then
printf "::error title=%s::%s\n" "setup-ghdl" "Unsupported GHDL backend '${{ inputs.backend }}'."
exit 1
else
Expand Down

0 comments on commit c3e4a00

Please sign in to comment.