Skip to content

Commit 20ae34d

Browse files
authored
Merge pull request #68 from rest-for-physics/submodule-validation
Separating framework and detectorlib validation pipelines
2 parents 6e7e1cd + e14a649 commit 20ae34d

File tree

2 files changed

+48
-15
lines changed

2 files changed

+48
-15
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Framework Validation
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
branches: [ "master" ]
8+
release:
9+
10+
workflow_dispatch:
11+
12+
env:
13+
CMAKE_BUILD_TYPE: Release
14+
REST_PATH: /rest/detectorlib/install
15+
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
16+
17+
defaults:
18+
run:
19+
shell: bash
20+
21+
jobs:
22+
framework-validation:
23+
uses: rest-for-physics/framework/.github/workflows/validation.yml@submodule-validation

.github/workflows/validation.yml

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,49 @@
11
name: Validation
22

33
on:
4-
push:
5-
branches: [ "master" ]
6-
pull_request:
7-
branches: [ "master" ]
8-
release:
9-
104
workflow_dispatch:
5+
workflow_call:
116

127
env:
138
CMAKE_BUILD_TYPE: Release
149
REST_PATH: /rest/detectorlib/install
10+
DETECTOR_LIB_PATH: detectorlib
1511
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
1612

1713
defaults:
1814
run:
1915
shell: bash
2016

2117
jobs:
22-
framework-validation:
23-
uses: rest-for-physics/framework/.github/workflows/validation.yml@master
24-
2518
libCheck:
2619
name: Validate library
2720
runs-on: ubuntu-latest
2821
container:
2922
image: ghcr.io/lobis/root-geant4-garfield:rest-for-physics
3023
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
3347
3448
build-detectorlib:
3549
name: Build only detectorlib
@@ -43,10 +57,6 @@ jobs:
4357
with:
4458
cmake-flags: "-DCMAKE_INSTALL_PREFIX=${{ env.REST_PATH }} -DCMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }} -DREST_WELCOME=ON -DRESTLIB_DETECTOR=ON"
4559
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
5060
- name: Load REST libraries
5161
run: |
5262
source ${{ env.REST_PATH }}/thisREST.sh

0 commit comments

Comments
 (0)