Skip to content

Commit

Permalink
Adding Windows native support.
Browse files Browse the repository at this point in the history
  • Loading branch information
Paebbels committed Jan 11, 2025
1 parent 8267b27 commit 642dcfa
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 20 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/Pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@ jobs:
matrix:
os:
- {'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': 'mcode'}
- {'icon': '🍎', 'name': 'macOS', 'image': 'macos-13', 'runtime': '', 'backend': 'llvm'}
- {'icon': '🍏', 'name': 'macOS', 'image': 'macos-14', 'runtime': '', 'backend': 'llvm'}
# - {'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': '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': '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'}
# - {'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'}
defaults:
run:
shell: bash
Expand Down
49 changes: 41 additions & 8 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,6 @@ runs:
nightly-version-msys2=5.0.0.dev-1
EOF
- name: Debugging
id: debug
shell: bash
run: |
echo "runner.os: ${{ runner.os }}"
echo "runner.arch: ${{ runner.arch }}"
- name: Download and install GHDL on Ubuntu 2024.04 (x86-64)
id: ubuntu
if: runner.os == 'Linux' && runner.arch == 'X64'
Expand Down Expand Up @@ -212,7 +205,47 @@ runs:
if: runner.os == 'Windows' && runner.arch == 'X64' && inputs.runtime == ''
shell: powershell
run: |
curl -L "https://github.com/ghdl/ghdl/releases/download/${VERSION_IN_URL}/mingw-w64-ucrt-x86_64-ghdl-mcode-5.0.0.dev-1-any.pkg.tar.zst" -o ghdl.pkg.tar.zst
# Download and install GHDL on Windows (native)
$BACKEND = "mcode"
$RUNTIME = "ucrt64"
if ( "${{ inputs.version }}" -eq "nightly" ) {
$VERSION_IN_URL = "nightly"
$VERSION_IN_FILE = "${{ steps.variables.outputs.nightly-version }}"
echo "Version: nightly (${VERSION_IN_FILE})"
} elseif ( "${{ inputs.version }}" -match '^[0-9]{1,2}\.[0-9]{1,2}\.[0-9]{1,2}$' ) {
$VERSION_IN_URL = "${{ inputs.version }}"
$VERSION_IN_FILE = "${{ inputs.version }}"
echo "Version: ${{ inputs.version }}"
} else {
echo "::error title=setup-ghdl::Unsupported GHDL version '${{ inputs.version }}'."
exit 1
}
if ( "${{ inputs.backend }}" -eq "mcode" ) {
echo "Backend: ${{ inputs.backend }}"
} else {
echo "::error title=setup-ghdl::Unsupported GHDL backend '${{ inputs.backend }}'."
exit 1
}
echo "Creating installation directory '${{ inputs.install-directory }}' ..."
mkdir "${{ inputs.install-directory }}" | Out-Null
cd "${{ inputs.install-directory }}"
$DOWNLOAD_URL = "https://github.com/ghdl/ghdl/releases/download/${VERSION_IN_URL}/ghdl-${BACKEND}-${VERSION_IN_FILE}-${RUNTIME}.zip"
echo "Downloading asset from '${DOWNLOAD_URL}' ..."
curl "${DOWNLOAD_URL}" -o ghdl.zip
ls
echo "Extracting zip file 'ghdl.zip' ..."
Expand-Archive "ghdl.zip"
ls
- name: Download and install GHDL on Windows + MSYS2 (x86-64)
Expand Down

0 comments on commit 642dcfa

Please sign in to comment.