Skip to content

Commit

Permalink
Create test_framework.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
forthommel authored Jul 29, 2024
1 parent a8bade2 commit 43898e9
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/test_framework.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Test the framework with a CepGen installation

on:
push:
workflow_dispatch:
env:
CEPGEN_PATH: /Package
PROCESS_NAME: MyProcessName

jobs:
build:
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
# You can convert this to a matrix build if you need cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ubuntu-latest
container:
image: 'laufor/ci-images:cepgen-fedora39'
options: -v ${{ github.workspace }}:/Documentation
steps:
- uses: actions/checkout@v4
- name: 'Download CepGen artifact'
uses: dawidd6/action-download-artifact@v3
with:
github_token: ${{ secrets.GH_API_TOKEN }}
workflow: build.yml
workflow_conclusion: success
name: build-env
repo: cepgen/cepgen
- name: 'CepGen uncompress'
run: |
tar xvfz environment.tar.gz -C /
- name: 'Configure the build'
run: |
git config --global --add safe.directory '*'
cmake -GNinja -B ${{ github.workspace }}/build -DPROCESS_NAME=${{ env.PROCESS_NAME }} -DGH_API_TOKEN=${{ secrets.GH_API_TOKEN }}
- name: Build
run: cmake --build ${{ github.workspace }}/build

- name: Test
working-directory: ${{ github.workspace }}/build
run: |
${{ env.CEPGEN_PATH }}/bin/cepgen -a lib${{ env.PROCESS_NAME }}.so -i cards/dummy_collfactor_cfg.py
${{ env.CEPGEN_PATH }}/bin/cepgen -a lib${{ env.PROCESS_NAME }}.so -i cards/dummy_ktfactor_cfg.py

0 comments on commit 43898e9

Please sign in to comment.