Repository navigation
Move supported toplevel toolchains from eb_hooks.py into a separate TOML for easier define-once-and-reuse #312
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
casparvl
wants to merge
5
commits into
EESSI:main
Choose a base branch
from
casparvl:separate-supported-toolchains
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
e670b6f
Move supported toplevel toolchains from eb_hooks.py into a separate J…
986d210
Address review comments on supported toolchains JSON
fe8f182
Test toolchain loader with dummy JSON files instead of the shipped one
242a8a4
Convert to using TOML instead, so that we can use comments in the file
754ae62
Add comment on how to convert to json, if needed
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| # documentation: https://help.github.com/en/articles/workflow-syntax-for-github-actions | ||
| name: Unit tests for supported toolchains in EasyBuild hooks | ||
| on: | ||
| push: | ||
| paths: | ||
| - eb_hooks.py | ||
| - eessi_supported_toolchains.toml | ||
| - tests/eb_hooks/** | ||
| - .github/workflows/test-eb-hooks-toolchains.yml | ||
| pull_request: | ||
| paths: | ||
| - eb_hooks.py | ||
| - eessi_supported_toolchains.toml | ||
| - tests/eb_hooks/** | ||
| - .github/workflows/test-eb-hooks-toolchains.yml | ||
| workflow_dispatch: | ||
| permissions: | ||
| contents: read # to fetch code (actions/checkout) | ||
| jobs: | ||
| test_supported_toolchains: | ||
| runs-on: ubuntu-24.04 | ||
| steps: | ||
| - name: Check out software-layer repository | ||
| uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
|
|
||
| - name: Install EasyBuild and pytest | ||
| run: | | ||
| python3 -m venv "$RUNNER_TEMP/venv" | ||
| "$RUNNER_TEMP/venv/bin/pip" install easybuild pytest | ||
|
|
||
| - name: Run unit tests | ||
| run: | | ||
| "$RUNNER_TEMP/venv/bin/python" -m pytest -v tests/eb_hooks |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| # Top-level toolchains that are supported for installations in each EESSI version. | ||
| # This file is read by eb_hooks.py (see load_supported_top_level_toolchains()), and has to be installed next to it. | ||
| # | ||
| # Each key is an EESSI version, with a list of toolchains ('name' and 'version'). | ||
| # An optional 'min_easybuild_version' can be used for toolchains that are only supported when | ||
| # a sufficiently recent EasyBuild version is used (e.g. because older versions don't know the toolchain). | ||
|
|
||
| # If you need to use this from a shell and don't have yq available, you can convert it to json on the fly using | ||
| # python -c "import tomllib, json; print(json.dumps(tomllib.load(open('input.toml','rb')), indent=2))" > output.json | ||
|
|
||
| "2023.06" = [ | ||
| { name = "foss", version = "2022b" }, | ||
| { name = "foss", version = "2023a" }, | ||
| { name = "foss", version = "2023b" }, | ||
| ] | ||
|
|
||
| "2025.06" = [ | ||
| { name = "foss", version = "2024a" }, | ||
| { name = "foss", version = "2025a" }, | ||
| { name = "foss", version = "2025b" }, | ||
| { name = "lfoss", version = "2025b", min_easybuild_version = "5.2.0" }, | ||
| { name = "rompi", version = "2025a", min_easybuild_version = "5.3.1" }, | ||
| ] | ||
|
|
||
| "2026.06" = [ | ||
| { name = "foss", version = "2026.1" }, | ||
| { name = "lfoss", version = "2026.1" }, | ||
| ] |
This file contains hidden or 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 | ||||
|---|---|---|---|---|---|---|
|
|
@@ -222,11 +222,12 @@ if [[ -d ${host_injections_easystacks_dir} ]]; then | |||||
| copy_files_by_list ${host_injections_easystacks_dir} ${INSTALL_PREFIX}/scripts/gpu_support/nvidia/easystacks "${host_injections_easystacks[@]}" | ||||||
| fi | ||||||
|
|
||||||
| # Copy over EasyBuild hooks file used for installations | ||||||
| hook_files=( | ||||||
| # Copy over EasyBuild hooks file used for installations (and the files it needs, which have to be located next to it) | ||||||
| easybuild_init_files=( | ||||||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
You're right, it could lead to confusion. Actually, come to think about this: I think the list of supported toolchains doesn't belong in |
||||||
| eb_hooks.py | ||||||
| eessi_supported_toolchains.toml | ||||||
| ) | ||||||
| copy_files_by_list ${TOPDIR} ${INSTALL_PREFIX}/init/easybuild "${hook_files[@]}" | ||||||
| copy_files_by_list ${TOPDIR} ${INSTALL_PREFIX}/init/easybuild "${easybuild_init_files[@]}" | ||||||
|
|
||||||
| # replace version placeholders in scripts; | ||||||
| # note: the commands below are always run, regardless of whether the scripts were changed, | ||||||
|
|
||||||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't love this name, could lead to confusion.
eessi_eb_hook_files?