-
Notifications
You must be signed in to change notification settings - Fork 38
Log sha #1094
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
Log sha #1094
Changes from 5 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
d56e748
Add workflow to save commit sha for each commit on master
Qubitol 042985d
Log CUDACPP version and MadGraph minimal version when using CUDACPP
Qubitol a1b63a3
Modify CUDACPP_VERSION logging
Qubitol f78da84
Fix logging of CUDACPP by moving it to python
Qubitol ea7ac62
Log CUDACPP version also in gridpacks
Qubitol 3fcc4b0
Update version_master.yml
Qubitol 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
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,27 @@ | ||
| #!/bin/bash | ||
| # Copyright (C) 2020-2025 CERN and UCLouvain. | ||
| # Licensed under the GNU Lesser General Public License (version 3 or later). | ||
| # Created by: D. Massaro (2026) for the MG5aMC CUDACPP plugin. | ||
|
|
||
| # Generate the "non-release" form of CUDACPP_SA_OUTPUT/VERSION.txt for a normal | ||
| # commit/push on master (the release form is instead generated by archiver.sh). | ||
| # The file records the minimal supported MG5aMC version and the last commit block. | ||
| # It is committed back to the repository by version_master.yml, so at any time it | ||
| # stores the information about the most recent (non version-update) commit. | ||
|
|
||
| # Path to the top directory of madgraph4gpu | ||
| # In the CI this would be simply $(pwd), but allow the script to be run also outside the CI | ||
| echo "Executing $0 $*" | ||
| topdir=$(cd $(dirname $0)/../..; pwd) | ||
|
|
||
| # Create the VERSION.txt file directly inside the plugin source directory | ||
| cd ${topdir}/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT | ||
| outfile=VERSION.txt | ||
| dateformat='%Y-%m-%d_%H:%M:%S UTC' | ||
| rm -f ${outfile} # remove any pre-existing VERSION.txt before regenerating it | ||
| touch ${outfile} | ||
| echo "mg5_version_minimal = $(cat __init__.py | awk '/minimal_mg5amcnlo_version/{print $3}' | sed 's/(//' | sed 's/)//' | sed 's/,/./g')" >> ${outfile} | ||
| echo "" >> ${outfile} | ||
| TZ=UTC git --no-pager log -n1 --date=format-local:"${dateformat}" --pretty=format:'commit %h%nAuthor: %an%nAuthorDate: %ad%nCommitter: %cn%nCommitterDate: %cd%nMessage: "%s"%n' >> ${outfile} | ||
| python3 -c 'print("="*132)'; cat ${outfile}; python3 -c 'print("="*132)' | ||
| echo "VERSION.txt file available on $(pwd)/${outfile}" |
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,59 @@ | ||
| # Copyright (C) 2020-2025 CERN and UCLouvain. | ||
| # Licensed under the GNU Lesser General Public License (version 3 or later). | ||
| # Created by: D. Massaro (2026) for the MG5aMC CUDACPP plugin. | ||
|
|
||
| #---------------------------------------------------------------------------------------------------------------------------------- | ||
|
|
||
| name: Version (master) | ||
|
|
||
| #---------------------------------------------------------------------------------------------------------------------------------- | ||
|
|
||
| # On every push to master, (re)generate the non-release CUDACPP_SA_OUTPUT/VERSION.txt | ||
| # describing the last commit, and commit it back. The auto commit uses '[skip ci]' so | ||
| # that it does not re-trigger this workflow (which would otherwise loop forever): as a | ||
| # result VERSION.txt always tracks the latest genuine commit on master. | ||
| on: | ||
| push: | ||
| branches: | ||
| - master | ||
|
|
||
| #---------------------------------------------------------------------------------------------------------------------------------- | ||
|
|
||
| jobs: | ||
|
|
||
| version: | ||
|
|
||
| runs-on: ubuntu-latest | ||
|
|
||
| # TEMPORARY! this mirrors the repository guard used in archiver.yml | ||
| if: | | ||
| ( github.repository == 'madgraph5/madgraph4gpu' ) | ||
| || ( github.repository == 'valassi/madgraph4gpu' ) | ||
|
|
||
| steps: | ||
|
|
||
| - name: checkout | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| submodules: 'true' | ||
|
|
||
| - name: create_versiontxt | ||
| run: | | ||
| echo "Current directory is $(pwd)" | ||
| .github/workflows/version_master.sh | ||
|
|
||
| - name: commit_versiontxt | ||
| run: | | ||
| versiontxt=epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/VERSION.txt | ||
| git config user.name github-actions | ||
| git config user.email github-actions@github.com | ||
| if [ -z "$(git status --porcelain ${versiontxt})" ]; then | ||
| echo "No changes detected in ${versiontxt}: nothing to commit" | ||
| else | ||
| echo "Commit and push ${versiontxt}" | ||
| # '[skip ci]' prevents this push from re-triggering the workflow (avoid infinite loop) | ||
| git commit -m "Update VERSION.txt [skip ci]" ${versiontxt} | ||
| git push | ||
| fi | ||
|
|
||
| #---------------------------------------------------------------------------------------------------------------------------------- | ||
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
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.