From ef3c6ba156ce2216181dc6d63fc2c78f66440d81 Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Thu, 16 Jan 2025 15:09:06 +0100 Subject: [PATCH] Simplify testing. --- .github/workflows/Pipeline.yml | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/.github/workflows/Pipeline.yml b/.github/workflows/Pipeline.yml index af4fd13..af06c3e 100644 --- a/.github/workflows/Pipeline.yml +++ b/.github/workflows/Pipeline.yml @@ -51,6 +51,17 @@ jobs: shell: bash steps: + - name: Detect correct shell + id: shell + shell: bash + run: | + # Detect correct shell + if [[ "${{ matrix.name }}" == "Windows" && "${{ matrix.runtime }}" != "" ]]; then + printf "shell=msys2 {0}" >> $GITHUB_OUTPUT + else + printf "shell=bash" >> $GITHUB_OUTPUT + fi + - name: 🟦 Setup MSYS2 for ${{ matrix.runtime }} uses: msys2/setup-msys2@v2 if: matrix.runtime != '' @@ -67,11 +78,9 @@ jobs: investigate: true - name: Verify on Linux or macOS - if: matrix.name == 'Ubuntu' || matrix.name == 'macOS' run: | - printf "%s\n" "${PATH}" + printf "which ghdl: %s\n" "$(which ghdl)" - which ghdl ghdl --version - name: Verify on Windows (native) @@ -80,10 +89,3 @@ jobs: run: | echo $(Get-Command ghdl).Source ghdl --version - - - name: Verify on Windows + MSYS2 - if: matrix.name == 'Windows' && matrix.runtime != '' - shell: 'msys2 {0}' - run: | - which ghdl - ghdl --version