Skip to content

Commit 6b16b82

Browse files
committed
Added CI test
1 parent 02e9bfc commit 6b16b82

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/test_framework.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Test the framework with a CepGen installation
2+
3+
on:
4+
push:
5+
workflow_dispatch:
6+
env:
7+
CEPGEN_PATH: /Package
8+
PROCESS_NAME: MyProcessName
9+
10+
jobs:
11+
build:
12+
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
13+
# You can convert this to a matrix build if you need cross-platform coverage.
14+
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
15+
runs-on: ubuntu-latest
16+
container:
17+
image: 'laufor/ci-images:cepgen-fedora39'
18+
options: -v ${{ github.workspace }}:/Example
19+
steps:
20+
- uses: actions/checkout@v4
21+
- name: 'Download CepGen artifact'
22+
uses: dawidd6/action-download-artifact@v3
23+
with:
24+
workflow: build.yml
25+
workflow_conclusion: success
26+
name: build-env
27+
repo: cepgen/cepgen
28+
- name: 'CepGen uncompress'
29+
run: |
30+
tar xvfz environment.tar.gz -C /
31+
- name: 'Configure the build'
32+
run: |
33+
git config --global --add safe.directory '*'
34+
cmake -GNinja -B /Example/build -DPROCESS_NAME=${{ env.PROCESS_NAME }}
35+
- name: Build
36+
run: cmake --build /Example/build
37+
- name: Test
38+
working-directory: /Example/build
39+
run: |
40+
${{ env.CEPGEN_PATH }}/bin/cepgen -a lib${{ env.PROCESS_NAME }}.so -i cards/dummy_collfactor_cfg.py
41+
${{ env.CEPGEN_PATH }}/bin/cepgen -a lib${{ env.PROCESS_NAME }}.so -i cards/dummy_ktfactor_cfg.py
42+

0 commit comments

Comments
 (0)