diff --git a/.github/workflows/Pipeline.yml b/.github/workflows/Pipeline.yml index abe74a5..2b8c8dd 100644 --- a/.github/workflows/Pipeline.yml +++ b/.github/workflows/Pipeline.yml @@ -67,6 +67,8 @@ jobs: - name: Verify on Linux or macOS if: matrix.name == 'Ubuntu' || matrix.name == 'macOS' run: | + printf "%s\n" "${PATH}" + which ghdl ghdl --version diff --git a/action.yml b/action.yml index cbac6e9..59add42 100644 --- a/action.yml +++ b/action.yml @@ -56,16 +56,28 @@ inputs: runs: using: composite steps: + - name: Detect correct shell + id: shell + shell: bash + run: | + # Detect correct shell + if [[ "${{ runner.os }}" == "Windows" && "${{ inputs.runtime }}" != "" ]]; then + printf "shell=msys2 {0}" >> $GITHUB_OUTPUT + else + printf "shell=bash" >> $GITHUB_OUTPUT + fi + - name: Update Bash on macOS if: runner.os == 'macOS' shell: bash run: | + # Update Bash on macOS brew install bash - name: Download and install GHDL id: generic if: runner.os == 'Linux' || runner.os == 'macOS' || ( runner.os == 'Windows' && inputs.runtime != '' ) - shell: bash + shell: ${{ steps.shell.outputs.shell }} run: | # Download and install GHDL ANSI_LIGHT_RED=$'\x1b[91m' @@ -105,15 +117,21 @@ runs: fi if [[ "${{ inputs.runtime }}" == "mingw64" ]]; then osRuntime="mingw64" + + printf "::group::${ANSI_LIGHT_BLUE}%s${ANSI_NOCOLOR}\n" "Installing 'jq' file ..." + pacman -S --noconfirm mingw64/mingw-w64-x86_64-jq + printf "::endgroup::\n" elif [[ "${{ inputs.runtime }}" == "ucrt64" ]]; then osRuntime="ucrt4" + + printf "::group::${ANSI_LIGHT_BLUE}%s${ANSI_NOCOLOR}\n" "Installing 'jq' file ..." + pacman -S --noconfirm ucrt64/mingw-w64-ucrt-x86_64-jq + printf "::endgroup::\n" else printf "::error title=%s::%s\n" "setup-ghdl" "Unsupported MSYS 2 runtime '${{ inputs.runtime }}'." exit 1 fi - cmd /c ver - osName="Windows" osMajorVersion="2022" osArchitecture="x86-64"