Skip to content

Commit

Permalink
Merge pull request #68 from rest-for-physics/submodule-validation
Browse files Browse the repository at this point in the history
Separating framework and detectorlib validation pipelines
  • Loading branch information
juanangp authored Feb 15, 2023
2 parents 6e7e1cd + e14a649 commit 20ae34d
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 15 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/frameworkValidation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Framework Validation

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
release:

workflow_dispatch:

env:
CMAKE_BUILD_TYPE: Release
REST_PATH: /rest/detectorlib/install
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}

defaults:
run:
shell: bash

jobs:
framework-validation:
uses: rest-for-physics/framework/.github/workflows/validation.yml@submodule-validation
40 changes: 25 additions & 15 deletions .github/workflows/validation.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,49 @@
name: Validation

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
release:

workflow_dispatch:
workflow_call:

env:
CMAKE_BUILD_TYPE: Release
REST_PATH: /rest/detectorlib/install
DETECTOR_LIB_PATH: detectorlib
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}

defaults:
run:
shell: bash

jobs:
framework-validation:
uses: rest-for-physics/framework/.github/workflows/validation.yml@master

libCheck:
name: Validate library
runs-on: ubuntu-latest
container:
image: ghcr.io/lobis/root-geant4-garfield:rest-for-physics
steps:
- uses: actions/checkout@v3
- run: python3 pipeline/validateLibrary.py .
- uses: rest-for-physics/framework/.github/actions/checkout@submodule-validation
with:
branch: ${{ env.BRANCH_NAME }}
repository: rest-for-physics/detectorlib
path: ${{ env.DETECTOR_LIB_PATH }}
- run: python3 ${{ env.DETECTOR_LIB_PATH }}/pipeline/validateLibrary.py .

precommit-config:
name: Validate pre-commit config
runs-on: ubuntu-latest
container:
image: ghcr.io/lobis/root-geant4-garfield:rest-for-physics
steps:
- name: Checkout detectorlib
uses: rest-for-physics/framework/.github/actions/checkout@submodule-validation
with:
branch: ${{ env.BRANCH_NAME }}
repository: rest-for-physics/detectorlib
path: ${{ env.DETECTOR_LIB_PATH }}
- name: Verify pre-commit config files match
run: |
cd ${{ env.DETECTOR_LIB_PATH }}
curl https://raw.githubusercontent.com/rest-for-physics/framework/master/scripts/validatePreCommitConfig.py | python
build-detectorlib:
name: Build only detectorlib
Expand All @@ -43,10 +57,6 @@ jobs:
with:
cmake-flags: "-DCMAKE_INSTALL_PREFIX=${{ env.REST_PATH }} -DCMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }} -DREST_WELCOME=ON -DRESTLIB_DETECTOR=ON"
branch: ${{ env.BRANCH_NAME }}
- name: Verify pre-commit config files match
run: |
cd $GITHUB_WORKSPACE
curl https://raw.githubusercontent.com/rest-for-physics/framework/master/scripts/validatePreCommitConfig.py | python
- name: Load REST libraries
run: |
source ${{ env.REST_PATH }}/thisREST.sh
Expand Down

0 comments on commit 20ae34d

Please sign in to comment.