-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci.yml: Updated splitting logic, added better error logs, added TODO (#…
…83)
- Loading branch information
Showing
1 changed file
with
5 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -128,6 +128,7 @@ jobs: | |
# this step checks that the versions of the packages themselves match with the | ||
# names of the modules. For example, [email protected] matches with the | ||
# modulefile access-om3/2023.12.12 (specifically, the version strings match) | ||
# TODO: Move this into the `scripts` directory - it's getting unweildly. | ||
run: | | ||
FAILED='false' | ||
DEPS=$(yq ".spack.modules.default.tcl.include | join(\" \")" spack.yaml) | ||
|
@@ -138,13 +139,15 @@ jobs: | |
if [[ "$DEP" == "${{ needs.defaults.outputs.root-sbd }}" ]]; then | ||
DEP_VER=$(yq '.spack.specs[0] | split("@git.") | .[1]' spack.yaml) | ||
else | ||
DEP_VER=$(yq ".spack.packages.\"$DEP\".require[0] | split(\"@git.\") | .[1]" spack.yaml) | ||
# Capture the section after '@git.' or '@' (if it's not a git-attributed version) for a given dependency. | ||
# Ex. '@git.2024.02.11' -> '2024.02.11', '@access-esm1.5' -> 'access-esm1.5' | ||
DEP_VER=$(yq ".spack.packages.\"$DEP\".require[0] | match(\"^@(?:git.)?(.*)\").captures[0].string" spack.yaml) | ||
fi | ||
MODULE_VER=$(yq ".spack.modules.default.tcl.projections.\"$DEP\" | split(\"/\") | .[1]" spack.yaml) | ||
if [[ "$DEP_VER" != "$MODULE_VER" ]]; then | ||
echo "::error::Version of dependency and projection do not match ($DEP_VER != $MODULE_VER)" | ||
echo "::error::$DEP: Version of dependency and projection do not match ($DEP_VER != $MODULE_VER)" | ||
FAILED='true' | ||
fi | ||
done | ||
|