-
Notifications
You must be signed in to change notification settings - Fork 5
rework CI workflow for missing installations to only check whether eb_hooks.py
is up-to-date
#1
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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,58 @@ | ||
# documentation: https://help.github.com/en/articles/workflow-syntax-for-github-actions | ||
name: Check whether eb_hooks.py script is up-to-date | ||
on: | ||
push: | ||
pull_request: | ||
workflow_dispatch: | ||
permissions: | ||
contents: read # to fetch code (actions/checkout) | ||
env: | ||
EESSI_VERSION: '2023.06' | ||
jobs: | ||
check_eb_hooks: | ||
runs-on: ubuntu-24.04 | ||
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: Show host system info | ||
run: | | ||
echo "/proc/cpuinfo:" | ||
cat /proc/cpuinfo | ||
echo | ||
echo "lscpu:" | ||
lscpu | ||
|
||
- name: Mount EESSI CernVM-FS pilot repository | ||
uses: cvmfs-contrib/github-action-cvmfs@55899ca74cf78ab874bdf47f5a804e47c198743c # v4.0 | ||
with: | ||
cvmfs_config_package: https://github.com/EESSI/filesystem-layer/releases/download/latest/cvmfs-config-eessi_latest_all.deb | ||
cvmfs_http_proxy: DIRECT | ||
cvmfs_repositories: software.eessi.io | ||
|
||
- name: Check that EasyBuild hook is up to date | ||
if: ${{ github.event_name == 'pull_request' }} | ||
run: | | ||
FILE="eb_hooks.py" | ||
TEMP_FILE="$(mktemp)" | ||
|
||
# Fetch base branch | ||
git fetch origin ${{ github.base_ref }} | ||
|
||
# Check if the hooks has changed in the PR | ||
if git diff --name-only origin/${{ github.base_ref }}...HEAD | grep -q "^$FILE$"; then | ||
echo "Hooks changed in PR. Using PR version." | ||
cp "$FILE" "$TEMP_FILE" | ||
else | ||
echo "File not changed in PR. Using default branch version." | ||
git show origin/${{ github.base_ref }}:$FILE > "$TEMP_FILE" | ||
fi | ||
|
||
# Compare the hooks to what is shipped in the repository | ||
# (it is overkill, but harmless, to do this for every architecture) | ||
export EESSI_SOFTWARE_SUBDIR_OVERRIDE=${{matrix.EESSI_SOFTWARE_SUBDIR_OVERRIDE}} | ||
ocaisa marked this conversation as resolved.
Show resolved
Hide resolved
|
||
source /cvmfs/software.eessi.io/versions/${EESSI_VERSION}/init/bash | ||
module load EESSI-extend | ||
diff "$TEMP_FILE" "$EASYBUILD_HOOKS" |
This file was deleted.
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.
Uh oh!
There was an error while loading. Please reload this page.