Skip to content
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

Adding submodule validation inside framework #371

Merged
merged 11 commits into from
Feb 14, 2023
36 changes: 36 additions & 0 deletions .github/actions/checkout/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: "Checkout submodule"
description: "Checkout specific repository and branch otherwise, it checkout master"
inputs:
branch:
description: "Branch to checkout"
required: true
repository:
description: "Repository"
required: true
path:
description: "Path"
required: true

runs:
using: "composite"
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
repository: ${{ inputs.repository }}
path: ${{ inputs.path }}
- name: Checkout repository branch
id: repositoryBranch
run: |
cd ${{ inputs.path }}
var=$(git ls-remote --heads origin ${{ inputs.branch }})
if [[ -z $var ]]; then
echo "Branch "${{ inputs.branch }}" not found in " ${{ inputs.repository }}
echo "exist=false" >> $GITHUB_OUTPUT
else
echo "Branch "${{ inputs.branch }}" found in " ${{ inputs.repository }}
git fetch
git checkout ${{ inputs.branch }}
git pull
fi
shell: bash
24 changes: 24 additions & 0 deletions .github/workflows/validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -634,3 +634,27 @@ jobs:
name: AlphaTrack
path: ${{ env.REST_PATH }}/examples/restG4/08.Alphas/data/Run_5MeV_1um.root
retention-days: 1

rawlib-validation:
uses: rest-for-physics/rawlib/.github/workflows/validation.yml@submodule-validation

geant4lib-validation:
uses: rest-for-physics/geant4lib/.github/workflows/validation.yml@submodule-validation

detectorlib-validation:
uses: rest-for-physics/detectorlib/.github/workflows/validation.yml@submodule-validation

connectorslib-validation:
uses: rest-for-physics/connectorslib/.github/workflows/validation.yml@submodule-validation

tracklib-validation:
uses: rest-for-physics/tracklib/.github/workflows/validation.yml@submodule-validation

legacylib-validation:
uses: rest-for-physics/legacylib/.github/workflows/validation.yml@submodule-validation

axionlib-validation:
uses: rest-for-physics/axionlib/.github/workflows/validation.yml@submodule-validation

wimplib-validation:
uses: rest-for-physics/wimplib/.github/workflows/validation.yml@submodule-validation