Skip to content

Commit

Permalink
Merge branch 'development' into issue_173_helicity_decoder
Browse files Browse the repository at this point in the history
  • Loading branch information
mholtrop authored Jan 24, 2024
2 parents fa4b9eb + 750a0bb commit 326700b
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
java-version: 11
distribution: zulu
- name: build
run: ./build-coatjava.sh --spotbugs --unittests --quiet
run: ./build-coatjava.sh --spotbugs --unittests --quiet -T4
- name: tar # tarball to preserve permissions
run: tar czvf coatjava.tar.gz coatjava
- uses: actions/upload-artifact@v3
Expand Down
34 changes: 33 additions & 1 deletion .github/workflows/validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,42 @@ concurrency:
cancel-in-progress: true

jobs:

get_gemc_tag:
runs-on: ubuntu-latest
name: Get highest GEMC tag
outputs:
tag: ${{ steps.tag.outputs.tag }}
steps:
- name: checkout clas12-validation
uses: actions/checkout@v4
with:
repository: JeffersonLab/clas12-validation
ref: main
path: clas12-validation
- name: checkout clas12Tags
uses: actions/checkout@v4
with:
repository: gemc/clas12Tags
ref: main
clean: false
fetch-tags: true
fetch-depth: 0
path: clas12Tags
- name: get highest tag
id: tag
working-directory: clas12Tags
run: |
tag=$(../clas12-validation/bin/get_highest_tag.rb)
echo "Highest \`clas12Tags\` (GEMC) tag: \`$tag\`" >> $GITHUB_STEP_SUMMARY
echo '- using this version for `clas12-validation` workflow run' >> $GITHUB_STEP_SUMMARY
echo tag=$tag >> $GITHUB_OUTPUT
validation:
needs: [ get_gemc_tag ]
uses: JeffersonLab/clas12-validation/.github/workflows/ci.yml@main
with:
git_upstream: >-
{
"clas12Tags": { "fork": "gemc/clas12Tags", "branch": "8f9956678b44386d3df85d8d8df9d5002333a82b" }
"clas12Tags": { "fork": "gemc/clas12Tags", "branch": "${{ needs.get_gemc_tag.outputs.tag }}" }
}
36 changes: 16 additions & 20 deletions build-coatjava.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,28 @@ set -e
set -u
set -o pipefail

usage='build-coatjava.sh [-h] [--quiet] [--spotbugs] [--nomaps] [--unittests]'
usage='''build-coatjava.sh [-h] [--help] [--quiet] [--spotbugs] [--nomaps] [--unittests]
- all other arguments will be passed to `mvn`, e.g., -T4 will build with 4 parallel threads'''

quiet="no"
runSpotBugs="no"
downloadMaps="yes"
runUnitTests="no"
mvnArgs=()
for xx in $@
do
if [ "$xx" == "--spotbugs" ]
then
runSpotBugs="yes"
elif [ "$xx" == "-n" ]
then
runSpotBugs="no"
elif [ "$xx" == "--nomaps" ]
then
downloadMaps="no"
elif [ "$xx" == "--unittests" ]
then
runUnitTests="yes"
elif [ "$xx" == "--quiet" ]
then
quiet="yes"
else
echo "$usage"
exit 2
fi
case $xx in
--spotbugs) runSpotBugs="yes" ;;
-n) runSpotBugs="no" ;;
--nomaps) downloadMaps="no" ;;
--unittests) runUnitTests="yes" ;;
--quiet) quiet="yes" ;;
-h|--help)
echo "$usage"
exit 2
;;
*) mvnArgs+=($xx) ;;
esac
done

top="$(cd "$(dirname "${BASH_SOURCE[0]}")" &> /dev/null && pwd)"
Expand All @@ -42,6 +37,7 @@ then
wget='wget --progress=dot:mega'
mvn="mvn -q -B --settings $top/maven-settings.xml"
fi
mvn+=" ${mvnArgs[*]}"

command_exists () {
type "$1" &> /dev/null
Expand Down

0 comments on commit 326700b

Please sign in to comment.