Skip to content

Commit 1751475

Browse files
authored
Merge pull request #28 from rest-for-physics/submodule-validation
Separating framework and tracklib pipelines in diferent workflows
2 parents e4dd425 + 0f67cd2 commit 1751475

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/tracklib/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,52 +1,62 @@
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/tracklib/install
10+
TRACK_LIB_PATH: tracklib
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
2418

2519
libCheck:
2620
name: Validate library
2721
runs-on: ubuntu-latest
2822
container:
2923
image: ghcr.io/lobis/root-geant4-garfield:rest-for-physics
3024
steps:
31-
- uses: actions/checkout@v3
32-
- run: python3 pipeline/validateLibrary.py .
25+
- uses: rest-for-physics/framework/.github/actions/checkout@submodule-validation
26+
with:
27+
branch: ${{ env.BRANCH_NAME }}
28+
repository: rest-for-physics/tracklib
29+
path: ${{ env.TRACK_LIB_PATH }}
30+
- run: python3 ${{ env.TRACK_LIB_PATH }}/pipeline/validateLibrary.py .
31+
32+
precommit-config:
33+
name: Validate pre-commit config
34+
runs-on: ubuntu-latest
35+
container:
36+
image: ghcr.io/lobis/root-geant4-garfield:rest-for-physics
37+
steps:
38+
- name: Checkout tracklib
39+
uses: rest-for-physics/framework/.github/actions/checkout@submodule-validation
40+
with:
41+
branch: ${{ env.BRANCH_NAME }}
42+
repository: rest-for-physics/tracklib
43+
path: ${{ env.TRACK_LIB_PATH }}
44+
- name: Verify pre-commit config files match
45+
run: |
46+
cd ${{ env.TRACK_LIB_PATH }}
47+
curl https://raw.githubusercontent.com/rest-for-physics/framework/master/scripts/validatePreCommitConfig.py | python
3348
3449
build-tracklib:
3550
name: Build only tracklib
3651
runs-on: ubuntu-latest
3752
container:
3853
image: ghcr.io/lobis/root-geant4-garfield:rest-for-physics
3954
steps:
40-
- uses: actions/checkout@v3
4155
- name: Build and install
4256
uses: rest-for-physics/framework/.github/actions/build@master
4357
with:
4458
cmake-flags: "-DCMAKE_INSTALL_PREFIX=${{ env.REST_PATH }} -DCMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }} -DREST_WELCOME=ON -DRESTLIB_TRACK=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)