-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: use highest
clas12Tags
tag and only build GEMC if triggered by …
…`clas12Tags` caller (#69)
- Loading branch information
Showing
5 changed files
with
126 additions
and
92 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
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/bash | ||
# build GEMC wrapper | ||
|
||
set -e | ||
set -u | ||
|
||
sourceDir=$1 | ||
|
||
### source environment | ||
set +u | ||
source /app/localSetup.sh | ||
set -u | ||
|
||
### show available modules | ||
echo "==============================" | ||
echo "MODULE AVAIL" | ||
echo "==============================" | ||
module avail --no-pager | ||
echo "==============================" | ||
|
||
### compile GEMC in $sourceDir | ||
pushd $sourceDir | ||
scons -j$(nproc) OPT=1 | ||
popd |
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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/bash | ||
# run GEMC wrapper | ||
|
||
set -e | ||
set -u | ||
|
||
gemcExe=$1 | ||
gemcTag=$2 | ||
gemcConfigFile=$3 | ||
evgenFile=$4 | ||
simFile=$5 | ||
|
||
### source environment | ||
set +u | ||
source /app/localSetup.sh | ||
set -u | ||
|
||
### show available modules | ||
echo "==============================" | ||
echo "MODULE AVAIL" | ||
echo "==============================" | ||
module avail --no-pager | ||
echo "==============================" | ||
|
||
### switch to the gemc module | ||
### - if we do not have a custom build, this activates the appropriate gemc version | ||
### - if we do have a custom build, this just makes sure the dependencies are resolved correctly | ||
module switch gemc/$gemcTag | ||
|
||
### run a simulation | ||
$gemcExe \ | ||
$gemcConfigFile \ | ||
-INPUT_GEN_FILE="LUND, $evgenFile" \ | ||
-USE_GUI=0 \ | ||
-OUTPUT="hipo, $simFile" |
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/usr/bin/ruby | ||
# check if a given tag is available in a repo; exit 0 if yes, 1 if no | ||
|
||
unless ARGV.length == 2 | ||
$stderr.puts "USAGE: #{$0} [tag] [repo owner]/[repo name]" | ||
exit 2 | ||
end | ||
check_tag, repo = ARGV | ||
|
||
api_args = [ | ||
'--silent', | ||
'-L', | ||
'-H "Accept: application/vnd.github+json"', | ||
'-H "X-GitHub-Api-Version: 2022-11-28"', | ||
"https://api.github.com/repos/#{repo}/tags", | ||
] | ||
tag_list = `curl #{api_args.join ' '} | jq -r '.[].name'` | ||
unless $?.success? | ||
$stderr.puts "ERROR: failed to get list of tags from #{repo}" | ||
exit 1 | ||
end | ||
|
||
exit 1 unless tag_list.include? check_tag |