Skip to content

Commit

Permalink
Fixed setting of PATH on Windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
Paebbels committed Jan 11, 2025
1 parent ccdbd3e commit 5adcaf7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/Pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,19 +62,22 @@ jobs:
runtime: ${{ matrix.os.runtime }}
investigate: true

- name: Verify on Linux, macOS or Windows (native)
- name: Verify on Linux or macOS
if: matrix.os.name == 'Ubuntu' || matrix.os.name == 'macOS'
run: |
which ghdl
ghdl --version
- name: Verify on Linux, macOS or Windows (native)
- name: Verify on Windows (native)
if: matrix.os.name == 'Windows' && matrix.os.runtime == ''
shell: powershell
run: |
echo $(Get-Command dot).Source
ghdl --version
- name: Verify on Windows + MSYS2
if: matrix.os.name == 'Windows' && matrix.os.runtime != ''
shell: 'msys2 {0}'
run: |
which ghdl
ghdl --version
10 changes: 7 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -265,14 +265,16 @@ runs:
echo "GHDL_PREFIX=$($(pwd).Path)\${{ inputs.install-directory }}\lib\ghdl" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo "Adding GHDL to 'PATH' ..."
echo "$($(pwd).Path)\${{ inputs.install-directory }}\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
echo "$($(pwd).Path)\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Download and install GHDL on Windows + MSYS2 (x86-64)
id: MSYS2
if: runner.os == 'Windows' && runner.arch == 'X64' && ( inputs.runtime == 'mingw64' || inputs.runtime == 'ucrt64' )
shell: 'msys2 {0}'
run: |
# Download and install GHDL on Windows + MSYS2 (x86-64)
ANSI_LIGHT_RED=$'\x1b[91m'
ANSI_LIGHT_GREEN=$'\x1b[92m'
ANSI_LIGHT_BLUE="\e[94m"
ANSI_NOCOLOR=$'\x1b[0m'
Expand Down Expand Up @@ -326,5 +328,7 @@ runs:
printf "::warning title=%s::%s\n" "setup-ghdl" "Failed to remove 'ghdl.pkg.tar.zst'."
fi
echo "GHDL_PREFIX=$(realpath $(dirname $(which ghdl))/../lib/ghdl) >> $GITHUB_ENV"
echo "GHDL_PREFIX=$(realpath $(dirname $(which ghdl))/../lib/ghdl)" >> $GITHUB_ENV
printf "Setting environment variable 'GHDL_PREFIX' ...\n"
tee "${GITHUB_ENV}" <<EOF
GHDL_PREFIX=$(realpath $(dirname $(which ghdl))/../lib/ghdl)
EOF

0 comments on commit 5adcaf7

Please sign in to comment.