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 connectors pipelines in diferent workflows #24

Merged
merged 6 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/connectorslib/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
41 changes: 25 additions & 16 deletions .github/workflows/validation.yml
Original file line number Diff line number Diff line change
@@ -1,52 +1,61 @@
name: Validation

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

workflow_dispatch:
workflow_call:

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

build-connectorslib:
name: Build only connectorslib
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_CONNECTORS=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