Skip to content

Commit 5091a03

Browse files
authored
Merge pull request #6 from rest-for-physics/submodule-validation
Separating framework and wimplib pipelines in diferent workflows
2 parents ee12b17 + 2f701c3 commit 5091a03

File tree

2 files changed

+41
-13
lines changed

2 files changed

+41
-13
lines changed
+23
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/wimplib/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

+18-13
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,48 @@
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/wimplib/install
10+
WIMP_LIB_PATH: wimplib
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
18+
precommit-config:
19+
name: Validate pre-commit config
20+
runs-on: ubuntu-latest
21+
container:
22+
image: ghcr.io/lobis/root-geant4-garfield:rest-for-physics
23+
steps:
24+
- name: Checkout wimplib
25+
uses: rest-for-physics/framework/.github/actions/checkout@submodule-validation
26+
with:
27+
branch: ${{ env.BRANCH_NAME }}
28+
repository: rest-for-physics/wimplib
29+
path: ${{ env.WIMP_LIB_PATH }}
30+
- name: Verify pre-commit config files match
31+
run: |
32+
cd ${{ env.WIMP_LIB_PATH }}
33+
curl https://raw.githubusercontent.com/rest-for-physics/framework/master/scripts/validatePreCommitConfig.py | python
2434
2535
build-wimplib:
2636
name: Build only wimplib
2737
runs-on: ubuntu-latest
2838
container:
2939
image: ghcr.io/lobis/root-geant4-garfield:rest-for-physics
3040
steps:
31-
- uses: actions/checkout@v3
3241
- name: Build and install
3342
uses: rest-for-physics/framework/.github/actions/build@master
3443
with:
3544
cmake-flags: "-DCMAKE_INSTALL_PREFIX=${{ env.REST_PATH }} -DCMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }} -DREST_WELCOME=ON -DRESTLIB_WIMP=ON"
3645
branch: ${{ env.BRANCH_NAME }}
37-
- name: Verify pre-commit config files match
38-
run: |
39-
cd $GITHUB_WORKSPACE
40-
curl https://raw.githubusercontent.com/rest-for-physics/framework/master/scripts/validatePreCommitConfig.py | python
4146
- name: Cache framework installation
4247
id: wimplib-install-cache
4348
uses: actions/cache@v3

0 commit comments

Comments
 (0)