Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separating framework and detectorlib validation pipelines #68

Merged
merged 3 commits into from
Feb 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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