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 tracklib pipelines in diferent workflows #28

Merged
merged 4 commits into from
Feb 14, 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/tracklib/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,52 +1,62 @@
name: Validation

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

workflow_dispatch:
workflow_call:

env:
CMAKE_BUILD_TYPE: Release
REST_PATH: /rest/tracklib/install
TRACK_LIB_PATH: tracklib
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/tracklib
path: ${{ env.TRACK_LIB_PATH }}
- run: python3 ${{ env.TRACK_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 tracklib
uses: rest-for-physics/framework/.github/actions/checkout@submodule-validation
with:
branch: ${{ env.BRANCH_NAME }}
repository: rest-for-physics/tracklib
path: ${{ env.TRACK_LIB_PATH }}
- name: Verify pre-commit config files match
run: |
cd ${{ env.TRACK_LIB_PATH }}
curl https://raw.githubusercontent.com/rest-for-physics/framework/master/scripts/validatePreCommitConfig.py | python

build-tracklib:
name: Build only tracklib
runs-on: ubuntu-latest
container:
image: ghcr.io/lobis/root-geant4-garfield:rest-for-physics
steps:
- uses: actions/checkout@v3
- name: Build and install
uses: rest-for-physics/framework/.github/actions/build@master
with:
cmake-flags: "-DCMAKE_INSTALL_PREFIX=${{ env.REST_PATH }} -DCMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }} -DREST_WELCOME=ON -DRESTLIB_TRACK=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