Skip to content

Commit

Permalink
Added 4.1.0 to the tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
Paebbels committed Jan 17, 2025
1 parent 1334469 commit b981e9e
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 36 deletions.
109 changes: 75 additions & 34 deletions .github/workflows/Pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,30 +22,44 @@ on:

jobs:
Setup-GHDL-Nightly:
name: ${{ matrix.icon }} Setup GHDL ${{ matrix.backend }} on ${{ matrix.name }}
runs-on: ${{ matrix.image }}
name: ${{ matrix.os.icon }} GHDL ${{ matrix.version.install }} ${{ matrix.os.backend }} on ${{ matrix.os.name }}
runs-on: ${{ matrix.os.image }}
strategy:
fail-fast: false
matrix:
include:
- {'icon': '🐧', 'name': 'Ubuntu', 'image': 'ubuntu-20.04', 'runtime': '', 'backend': 'mcode'}
- {'icon': '🐧', 'name': 'Ubuntu', 'image': 'ubuntu-24.04', 'runtime': '', 'backend': 'xcode'}
- {'icon': '🐧', 'name': 'Ubuntu', 'image': 'ubuntu-24.04', 'runtime': '', 'backend': 'mcode'}
- {'icon': '🐧', 'name': 'Ubuntu', 'image': 'ubuntu-24.04', 'runtime': '', 'backend': 'llvm'}
- {'icon': '🐧', 'name': 'Ubuntu', 'image': 'ubuntu-24.04', 'runtime': '', 'backend': 'llvm-jit'}
- {'icon': '🐧', 'name': 'Ubuntu', 'image': 'ubuntu-24.04', 'runtime': '', 'backend': 'gcc'}
- {'icon': '🍎', 'name': 'macOS', 'image': 'macos-13', 'runtime': '', 'backend': 'gcc'}
- {'icon': '🍎', 'name': 'macOS', 'image': 'macos-13', 'runtime': '', 'backend': 'mcode'}
- {'icon': '🍎', 'name': 'macOS', 'image': 'macos-13', 'runtime': '', 'backend': 'llvm'}
- {'icon': '🍏', 'name': 'macOS', 'image': 'macos-14', 'runtime': '', 'backend': 'llvm'}
- {'icon': '🪟', 'name': 'Windows', 'image': 'windows-2022', 'runtime': '', 'backend': 'mcode'}
- {'icon': '🪟⬛', 'name': 'Windows', 'image': 'windows-2022', 'runtime': 'mingw32', 'backend': 'mcode'}
- {'icon': '🪟🟦', 'name': 'Windows', 'image': 'windows-2022', 'runtime': 'mingw64', 'backend': 'mcode'}
- {'icon': '🪟🟦', 'name': 'Windows', 'image': 'windows-2022', 'runtime': 'mingw64', 'backend': 'llvm'}
- {'icon': '🪟🟦', 'name': 'Windows', 'image': 'windows-2022', 'runtime': 'mingw64', 'backend': 'llvm-jit'}
- {'icon': '🪟🟨', 'name': 'Windows', 'image': 'windows-2022', 'runtime': 'ucrt64', 'backend': 'mcode'}
- {'icon': '🪟🟨', 'name': 'Windows', 'image': 'windows-2022', 'runtime': 'ucrt64', 'backend': 'llvm'}
- {'icon': '🪟🟨', 'name': 'Windows', 'image': 'windows-2022', 'runtime': 'ucrt64', 'backend': 'llvm-jit'}
os:
- {icon: '🐧', name: 'Ubuntu', image: 'ubuntu-20.04', runtime: '', backend: 'mcode'} # not supported
- {icon: '🐧', name: 'Ubuntu', image: 'ubuntu-22.04', runtime: '', backend: 'mcode'}
- {icon: '🐧', name: 'Ubuntu', image: 'ubuntu-22.04', runtime: '', backend: 'llvm'}
- {icon: '🐧', name: 'Ubuntu', image: 'ubuntu-22.04', runtime: '', backend: 'gcc'}
- {icon: '🐧', name: 'Ubuntu', image: 'ubuntu-24.04', runtime: '', backend: 'xcode'} # not supported
- {icon: '🐧', name: 'Ubuntu', image: 'ubuntu-24.04', runtime: '', backend: 'mcode'}
- {icon: '🐧', name: 'Ubuntu', image: 'ubuntu-24.04', runtime: '', backend: 'llvm'}
- {icon: '🐧', name: 'Ubuntu', image: 'ubuntu-24.04', runtime: '', backend: 'llvm-jit'}
- {icon: '🐧', name: 'Ubuntu', image: 'ubuntu-24.04', runtime: '', backend: 'gcc'}
- {icon: '🍎', name: 'macOS', image: 'macos-13', runtime: '', backend: 'gcc'} # not supported
- {icon: '🍎', name: 'macOS', image: 'macos-13', runtime: '', backend: 'mcode'}
- {icon: '🍎', name: 'macOS', image: 'macos-13', runtime: '', backend: 'llvm'}
- {icon: '🍏', name: 'macOS', image: 'macos-14', runtime: '', backend: 'llvm'}
- {icon: '🪟', name: 'Windows', image: 'windows-2022', runtime: '', backend: 'mcode'}
- {icon: '🪟⬛', name: 'Windows', image: 'windows-2022', runtime: 'mingw32', backend: 'mcode'} # not supported
- {icon: '🪟🟦', name: 'Windows', image: 'windows-2022', runtime: 'mingw64', backend: 'mcode'}
- {icon: '🪟🟦', name: 'Windows', image: 'windows-2022', runtime: 'mingw64', backend: 'llvm'}
- {icon: '🪟🟦', name: 'Windows', image: 'windows-2022', runtime: 'mingw64', backend: 'llvm-jit'}
- {icon: '🪟🟨', name: 'Windows', image: 'windows-2022', runtime: 'ucrt64', backend: 'mcode'}
- {icon: '🪟🟨', name: 'Windows', image: 'windows-2022', runtime: 'ucrt64', backend: 'llvm'}
- {icon: '🪟🟨', name: 'Windows', image: 'windows-2022', runtime: 'ucrt64', backend: 'llvm-jit'}
version:
- {install: '4.1.0', expected: '4.1.0'}
# - {install: '5.0.0', expected: '5.0.0'}
# - {install: 'latest', expected: '4.1.0'}
- {install: 'nightly', expected: '5.0.0-dev'}
exclude:
- {version: {install: '4.1.0'}, os: {image: 'ubuntu-24.04' }} # Ubuntu 24.04 didn't exist when 4.1.0 was released
- {version: {install: '4.1.0'}, os: {name: 'macOS' }} # macOS-13/14 didn't exist when 4.1.0 was released
- {version: {install: '4.1.0'}, os: {name: 'Windows', runtime: ""}} # There is no (functioning) standalone Windows version
- {version: {install: 'nightly'}, os: {image: 'ubuntu-22.04' }} # Nightly has no Ubuntu 22.04 support

defaults:
run:
shell: bash
Expand All @@ -55,44 +69,71 @@ jobs:
id: detect
run: |
# Detect correct shell
if [[ "${{ matrix.name }}" == "Windows" && "${{ matrix.runtime }}" != "" ]]; then
if [[ "${{ matrix.os.name }}" == "Windows" && "${{ matrix.os.runtime }}" != "" ]]; then
printf "shell=msys2 {0}" >> $GITHUB_OUTPUT
else
printf "shell=bash" >> $GITHUB_OUTPUT
fi
- name: 🟦 Setup MSYS2 for ${{ matrix.runtime }}
- name: 🟦 Setup MSYS2 for ${{ matrix.os.runtime }}
uses: msys2/setup-msys2@v2
if: matrix.runtime != ''
if: matrix.os.runtime != ''
with:
msystem: ${{ matrix.runtime }}
msystem: ${{ matrix.os.runtime }}
update: true

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

- name: Verify on Linux, macOS and Windows (native)
if: matrix.name == 'Linux' || matrix.name == 'macOS' || ( matrix.name == 'Windows' && matrix.runtime == '' )
if: matrix.os.name == 'Ubuntu' || matrix.os.name == 'macOS' || ( matrix.os.name == 'Windows' && matrix.os.runtime == '' )
run: |
ANSI_LIGHT_RED=$'\x1b[91m'
ANSI_LIGHT_GREEN=$'\x1b[92m'
ANSI_NOCOLOR=$'\x1b[0m'
printf "which ghdl: %s\n" "$(which ghdl)"
ghdl --version
expected="${{ matrix.version.expected }}"
printf "%s" "Verify GHDL version '${expected}' ... "
if [[ "$(ghdl --version | head -n 1)" =~ ${expected//./\\.} ]]; then
printf "${ANSI_LIGHT_GREEN}%s${ANSI_NOCOLOR}\n" "[OK]"
else
printf "${ANSI_LIGHT_RED}%s\${ANSI_NOCOLOR}n" "[FAILED]"
printf "::warning title=%s::%s\n" "Test-SetupGHDL" "GHDL version doesn't match."
ghdl --version
fi
- name: Verify on Windows + MSYS2
if: matrix.name == 'Windows' && matrix.runtime != ''
if: matrix.os.name == 'Windows' && matrix.os.runtime != ''
shell: "msys2 {0}"
run: |
ANSI_LIGHT_RED=$'\x1b[91m'
ANSI_LIGHT_GREEN=$'\x1b[92m'
ANSI_NOCOLOR=$'\x1b[0m'
printf "which ghdl: %s\n" "$(which ghdl)"
ghdl --version
expected="${{ matrix.version.expected }}"
printf "%s" "Verify GHDL version '${expected}' ... "
if [[ "$(ghdl --version | head -n 1)" =~ ${expected//./\\.} ]]; then
printf "${ANSI_LIGHT_GREEN}%s${ANSI_NOCOLOR}\n" "[OK]"
else
printf "${ANSI_LIGHT_RED}%s${ANSI_NOCOLOR}\n" "[FAILED]"
printf "::warning title=%s::%s\n" "Test-SetupGHDL" "GHDL version doesn't match."
ghdl --version
fi
- name: Verify on Windows (native) with Powershell
if: matrix.name == 'Windows' && matrix.runtime == ''
if: matrix.os.name == 'Windows' && matrix.os.runtime == ''
shell: powershell
run: |
echo $(Get-Command ghdl).Source
Expand Down
6 changes: 4 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,11 @@ runs:
# A generic test for supported named versions or tagged versions.
if [[ "${{ inputs.version }}" == "latest" ]]; then
# TODO: could be read from nightly's inventory.json
VERSION_IN_URL="5.0.0"
elif [[ "${{ inputs.version }}" =~ ^[0-9]{1,2}\.[0-9]{1,2}\.[0-9]{1,2}|nightly$ ]]; then
VERSION_IN_URL="v5.0.0"
elif [[ "${{ inputs.version }}" =~ ^v[0-9]{1,2}\.[0-9]{1,2}\.[0-9]{1,2}|nightly$ ]]; then
VERSION_IN_URL="${{ inputs.version }}"
elif [[ "${{ inputs.version }}" =~ ^[0-9]{1,2}\.[0-9]{1,2}\.[0-9]{1,2}$ ]]; then
VERSION_IN_URL="v${{ inputs.version }}"
else
printf "::error title=%s::%s\n" "setup-ghdl" "Unsupported GHDL version '${{ inputs.version }}'."
exit 1
Expand Down

0 comments on commit b981e9e

Please sign in to comment.