mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-12-14 06:50:17 +00:00
ci: fix gcc version disambiguation in setup-deps
Use JSON output and jq to select the newest installed gcc version when multiple versions match, avoiding conflicts between system and spack-installed compilers.
This commit is contained in:
3
.github/actions/setup-deps/action.yml
vendored
3
.github/actions/setup-deps/action.yml
vendored
@@ -36,7 +36,8 @@ runs:
|
|||||||
run: |
|
run: |
|
||||||
echo "::group::Install GCC"
|
echo "::group::Install GCC"
|
||||||
spack install ${{ inputs.fresh == 'true' && '--fresh' || '' }} gcc@${{ inputs.gcc }} target=x86_64_v3
|
spack install ${{ inputs.fresh == 'true' && '--fresh' || '' }} gcc@${{ inputs.gcc }} target=x86_64_v3
|
||||||
spack compiler find $(spack location -i gcc@${{ inputs.gcc }})
|
gcc_hash=$(spack find --json gcc@${{ inputs.gcc }} target=x86_64_v3 | jq -r 'sort_by(.version | split(".") | map(tonumber)) | last | .hash')
|
||||||
|
spack compiler find "$(spack location -i /$gcc_hash)"
|
||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
|
|||||||
Reference in New Issue
Block a user