From 7186a900abe29991b77a7728b166b0a10e00341c Mon Sep 17 00:00:00 2001 From: Richard Top Date: Mon, 30 Mar 2026 15:16:52 +0200 Subject: [PATCH 1/6] Skip check for missing installations when no easystack file is changed --- .github/workflows/test-software.eessi.io.yml | 36 ++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/.github/workflows/test-software.eessi.io.yml b/.github/workflows/test-software.eessi.io.yml index 5f4dd0de71..f1948b9022 100644 --- a/.github/workflows/test-software.eessi.io.yml +++ b/.github/workflows/test-software.eessi.io.yml @@ -33,7 +33,42 @@ env: # and then allow for special cases for specific architectures aarch64/a64fx: [] jobs: + check_EESSI_version_changed_files: + runs-on: ubuntu-24.04 + outputs: + EESSI_VERSIONS: ${{ steps.detect.outputs.EESSI_VERSIONS }} + steps: + - name: Check out software-layer repository + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + with: + fetch-depth: 0 # Fetch all history for all branches and tags + + - name: Detect EESSI version in modified easystack files + id: detect + run: | + # Use base_ref and head_ref for diff in PRs + # Ensure you have checked out with fetch-depth: 0 + changed_files=$(git diff --name-only origin/${{ github.base_ref }} origin/${{ github.head_ref }}) + echo "Files changed: $changed_files" + + # Default to both versions + EESSI_VERSIONS="" + + # Check for specific versions in the changed easystack files + if echo "$changed_files" | grep -q "easystacks/software.eessi.io/2023.06"; then + EESSI_VERSIONS="2023.06" + elif echo "$changed_files" | grep -q "easystacks/software.eessi.io/2025.06"; then + EESSI_VERSIONS="2025.06" + fi + echo "PR easystack changes related to EESSI VERSION: $EESSI_VERSIONS" + + # Use GITHUB_OUTPUT heredoc correctly + echo "EESSI_VERSIONS<> "$GITHUB_OUTPUT" + echo "$EESSI_VERSIONS" >> "$GITHUB_OUTPUT" + echo "EOF" >> "$GITHUB_OUTPUT" + check_missing: + needs: check_EESSI_version_changed_files strategy: fail-fast: false matrix: @@ -153,6 +188,7 @@ jobs: cvmfs_repositories: software.eessi.io - name: Check for missing installlations + if: contains(needs.check_EESSI_version_changed_files.outputs.EESSI_VERSIONS, matrix.EESSI_VERSION) run: | export EESSI_SOFTWARE_SUBDIR_OVERRIDE=${{matrix.EESSI_SOFTWARE_SUBDIR_OVERRIDE}} source /cvmfs/software.eessi.io/versions/${{matrix.EESSI_VERSION}}/init/bash From 08e7aa70579d9cd5a992ae34340e3f1600fc9de0 Mon Sep 17 00:00:00 2001 From: Richard Top Date: Mon, 30 Mar 2026 16:05:11 +0200 Subject: [PATCH 2/6] uses three dot diff against the current checked-out commit --- .github/workflows/test-software.eessi.io.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test-software.eessi.io.yml b/.github/workflows/test-software.eessi.io.yml index f1948b9022..54fede2713 100644 --- a/.github/workflows/test-software.eessi.io.yml +++ b/.github/workflows/test-software.eessi.io.yml @@ -46,9 +46,10 @@ jobs: - name: Detect EESSI version in modified easystack files id: detect run: | - # Use base_ref and head_ref for diff in PRs - # Ensure you have checked out with fetch-depth: 0 - changed_files=$(git diff --name-only origin/${{ github.base_ref }} origin/${{ github.head_ref }}) + # Fetch base branch explicitly to ensure it's available + git fetch origin ${{ github.base_ref }} + + changed_files=$(git diff --name-only origin/${{ github.base_ref }}...HEAD) echo "Files changed: $changed_files" # Default to both versions From 3067521a4d4a959dd34e3386d64c85b0060e81d0 Mon Sep 17 00:00:00 2001 From: TopRichard <121792457+TopRichard@users.noreply.github.com> Date: Tue, 7 Apr 2026 14:42:07 +0200 Subject: [PATCH 3/6] Update .github/workflows/test-software.eessi.io.yml Co-authored-by: Caspar van Leeuwen <33718780+casparvl@users.noreply.github.com> --- .github/workflows/test-software.eessi.io.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-software.eessi.io.yml b/.github/workflows/test-software.eessi.io.yml index 54fede2713..b74a36ddae 100644 --- a/.github/workflows/test-software.eessi.io.yml +++ b/.github/workflows/test-software.eessi.io.yml @@ -52,7 +52,7 @@ jobs: changed_files=$(git diff --name-only origin/${{ github.base_ref }}...HEAD) echo "Files changed: $changed_files" - # Default to both versions + # Default to not checking missing software for any version EESSI_VERSIONS="" # Check for specific versions in the changed easystack files From 618c71153cecb2664b646f76eff4dca7aa0782b0 Mon Sep 17 00:00:00 2001 From: Richard Top Date: Tue, 7 Apr 2026 16:05:45 +0200 Subject: [PATCH 4/6] Added requested changes --- .github/workflows/test-software.eessi.io.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test-software.eessi.io.yml b/.github/workflows/test-software.eessi.io.yml index b74a36ddae..aedaadeaba 100644 --- a/.github/workflows/test-software.eessi.io.yml +++ b/.github/workflows/test-software.eessi.io.yml @@ -33,6 +33,12 @@ env: # and then allow for special cases for specific architectures aarch64/a64fx: [] jobs: + # Checks whether this PR modifies any easystack files and, if so, + # determines which EESSI versions are affected. + # It then stores those versions as a space-separated list in an + # environment variable. + # Finally, it writes that value to GITHUB_OUTPUT using the correct + # heredoc format. check_EESSI_version_changed_files: runs-on: ubuntu-24.04 outputs: @@ -56,11 +62,10 @@ jobs: EESSI_VERSIONS="" # Check for specific versions in the changed easystack files - if echo "$changed_files" | grep -q "easystacks/software.eessi.io/2023.06"; then - EESSI_VERSIONS="2023.06" - elif echo "$changed_files" | grep -q "easystacks/software.eessi.io/2025.06"; then - EESSI_VERSIONS="2025.06" - fi + EESSI_VERSIONS=$(git diff --name-only origin/${{ github.base_ref }}...HEAD \ + | grep -oP 'easystacks/software\.eessi\.io/\K[0-9]{4}\.[0-9]{2}' \ + | sort -u \ + | tr '\n' ' ') echo "PR easystack changes related to EESSI VERSION: $EESSI_VERSIONS" # Use GITHUB_OUTPUT heredoc correctly From 0183d94d8f98fc37b10a6a9f59c8d49b6bced589 Mon Sep 17 00:00:00 2001 From: TopRichard <121792457+TopRichard@users.noreply.github.com> Date: Wed, 8 Apr 2026 14:29:42 +0200 Subject: [PATCH 5/6] Update .github/workflows/test-software.eessi.io.yml Co-authored-by: Caspar van Leeuwen <33718780+casparvl@users.noreply.github.com> --- .github/workflows/test-software.eessi.io.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-software.eessi.io.yml b/.github/workflows/test-software.eessi.io.yml index aedaadeaba..b67f05f80d 100644 --- a/.github/workflows/test-software.eessi.io.yml +++ b/.github/workflows/test-software.eessi.io.yml @@ -62,8 +62,12 @@ jobs: EESSI_VERSIONS="" # Check for specific versions in the changed easystack files + # The regex pattern matches a prefix, but only returns the part after \K, so that we get only the version + # The sort ensures predictable ordering, and with -u only keeps unique items (neither are probably essential, but both are nice) + # Finally, since the grep returns multiple lines if there are multiple versions that were touched, + # the tr replaces newlies with space, to make this space-separated. EESSI_VERSIONS=$(git diff --name-only origin/${{ github.base_ref }}...HEAD \ - | grep -oP 'easystacks/software\.eessi\.io/\K[0-9]{4}\.[0-9]{2}' \ + | grep -oP 'easystacks/software\.eessi\.io/\K[0-9]+\.[0-9]+' \ | sort -u \ | tr '\n' ' ') echo "PR easystack changes related to EESSI VERSION: $EESSI_VERSIONS" From 6fc821718f55aa464da53aa555471b9e033424eb Mon Sep 17 00:00:00 2001 From: TopRichard <121792457+TopRichard@users.noreply.github.com> Date: Wed, 8 Apr 2026 14:44:58 +0200 Subject: [PATCH 6/6] Update test-software.eessi.io.yml --- .github/workflows/test-software.eessi.io.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-software.eessi.io.yml b/.github/workflows/test-software.eessi.io.yml index b67f05f80d..6457d25710 100644 --- a/.github/workflows/test-software.eessi.io.yml +++ b/.github/workflows/test-software.eessi.io.yml @@ -65,7 +65,7 @@ jobs: # The regex pattern matches a prefix, but only returns the part after \K, so that we get only the version # The sort ensures predictable ordering, and with -u only keeps unique items (neither are probably essential, but both are nice) # Finally, since the grep returns multiple lines if there are multiple versions that were touched, - # the tr replaces newlies with space, to make this space-separated. + # the tr replaces newlines with space, to make this space-separated. EESSI_VERSIONS=$(git diff --name-only origin/${{ github.base_ref }}...HEAD \ | grep -oP 'easystacks/software\.eessi\.io/\K[0-9]+\.[0-9]+' \ | sort -u \