|
1 | 1 | name: Validation |
2 | 2 |
|
3 | 3 | on: |
4 | | - push: |
5 | | - branches: [ "master" ] |
6 | | - pull_request: |
7 | | - branches: [ "master" ] |
8 | | - release: |
9 | | - |
10 | 4 | workflow_dispatch: |
| 5 | + workflow_call: |
11 | 6 |
|
12 | 7 | env: |
13 | 8 | CMAKE_BUILD_TYPE: Release |
14 | 9 | REST_PATH: /rest/detectorlib/install |
| 10 | + DETECTOR_LIB_PATH: detectorlib |
15 | 11 | BRANCH_NAME: ${{ github.head_ref || github.ref_name }} |
16 | 12 |
|
17 | 13 | defaults: |
18 | 14 | run: |
19 | 15 | shell: bash |
20 | 16 |
|
21 | 17 | jobs: |
22 | | - framework-validation: |
23 | | - uses: rest-for-physics/framework/.github/workflows/validation.yml@master |
24 | | - |
25 | 18 | libCheck: |
26 | 19 | name: Validate library |
27 | 20 | runs-on: ubuntu-latest |
28 | 21 | container: |
29 | 22 | image: ghcr.io/lobis/root-geant4-garfield:rest-for-physics |
30 | 23 | steps: |
31 | | - - uses: actions/checkout@v3 |
32 | | - - run: python3 pipeline/validateLibrary.py . |
| 24 | + - uses: rest-for-physics/framework/.github/actions/checkout@submodule-validation |
| 25 | + with: |
| 26 | + branch: ${{ env.BRANCH_NAME }} |
| 27 | + repository: rest-for-physics/detectorlib |
| 28 | + path: ${{ env.DETECTOR_LIB_PATH }} |
| 29 | + - run: python3 ${{ env.DETECTOR_LIB_PATH }}/pipeline/validateLibrary.py . |
| 30 | + |
| 31 | + precommit-config: |
| 32 | + name: Validate pre-commit config |
| 33 | + runs-on: ubuntu-latest |
| 34 | + container: |
| 35 | + image: ghcr.io/lobis/root-geant4-garfield:rest-for-physics |
| 36 | + steps: |
| 37 | + - name: Checkout detectorlib |
| 38 | + uses: rest-for-physics/framework/.github/actions/checkout@submodule-validation |
| 39 | + with: |
| 40 | + branch: ${{ env.BRANCH_NAME }} |
| 41 | + repository: rest-for-physics/detectorlib |
| 42 | + path: ${{ env.DETECTOR_LIB_PATH }} |
| 43 | + - name: Verify pre-commit config files match |
| 44 | + run: | |
| 45 | + cd ${{ env.DETECTOR_LIB_PATH }} |
| 46 | + curl https://raw.githubusercontent.com/rest-for-physics/framework/master/scripts/validatePreCommitConfig.py | python |
33 | 47 |
|
34 | 48 | build-detectorlib: |
35 | 49 | name: Build only detectorlib |
|
43 | 57 | with: |
44 | 58 | cmake-flags: "-DCMAKE_INSTALL_PREFIX=${{ env.REST_PATH }} -DCMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }} -DREST_WELCOME=ON -DRESTLIB_DETECTOR=ON" |
45 | 59 | branch: ${{ env.BRANCH_NAME }} |
46 | | - - name: Verify pre-commit config files match |
47 | | - run: | |
48 | | - cd $GITHUB_WORKSPACE |
49 | | - curl https://raw.githubusercontent.com/rest-for-physics/framework/master/scripts/validatePreCommitConfig.py | python |
50 | 60 | - name: Load REST libraries |
51 | 61 | run: | |
52 | 62 | source ${{ env.REST_PATH }}/thisREST.sh |
|
0 commit comments