-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (46 loc) · 1.56 KB
/
validation.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Validation
on:
workflow_dispatch:
workflow_call:
env:
CMAKE_BUILD_TYPE: Release
REST_PATH: /rest/wimplib/install
WIMP_LIB_PATH: wimplib
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
defaults:
run:
shell: bash
jobs:
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 wimplib
uses: rest-for-physics/framework/.github/actions/checkout@master
with:
branch: ${{ env.BRANCH_NAME }}
repository: rest-for-physics/wimplib
path: ${{ env.WIMP_LIB_PATH }}
- name: Verify pre-commit config files match
run: |
cd ${{ env.WIMP_LIB_PATH }}
curl https://raw.githubusercontent.com/rest-for-physics/framework/master/scripts/validatePreCommitConfig.py | python
build-wimplib:
name: Build only wimplib
runs-on: ubuntu-latest
container:
image: ghcr.io/lobis/root-geant4-garfield:rest-for-physics
steps:
- 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_WIMP=ON"
branch: ${{ env.BRANCH_NAME }}
- name: Cache framework installation
id: wimplib-install-cache
uses: actions/cache@v3
with:
key: ${{ env.BRANCH_NAME }}-${{ github.sha }}
path: ${{ env.REST_PATH }}