-
-
Notifications
You must be signed in to change notification settings - Fork 4
87 lines (87 loc) · 3.02 KB
/
test.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: linux
on:
pull_request:
push:
branches: master
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
INSTALL_PATH: /
LD_LIBRARY_PATH: /Package/install/lib64:$LD_LIBRARY_PATH
NUM_BUILD_CORES: 8
BUILDER: ninja -k0
CMAKE_BUILDER: -GNinja
#BUILDER: make -j$NUM_BUILD_CORES
CG_CI: 1
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- id: Fedora 37
CI_IMAGE: 'laufor/ci-images:cepgen-fedora37'
cmakeExec: cmake3
packageInstall: |
sudo dnf install -y /Package/build/*.rpm
- id: CC7
CI_IMAGE: 'laufor/ci-images:cepgen-cc7'
cmakeExec: cmake3
extraCommands: source scl_source enable devtoolset-8 || echo ignoring exit code so CI does not bomb when it should not > /dev/null
packageInstall: |
sudo yum install -y /Package/build/*.rpm
- id: Ubuntu 20.04
CI_IMAGE: 'laufor/ci-images:cepgen-ubuntu20'
cmakeExec: cmake
packageInstall: |
sudo apt-get install -y /Package/build/*.deb
container:
image: ${{ matrix.CI_IMAGE }}
#volumes:
#- /cvmfs:/cvmfs:shared
options: -v ${{ github.workspace }}:/Package
steps:
- uses: actions/checkout@v3
#- uses: cvmfs-contrib/github-action-cvmfs@v2
- name: CMake configuration
run: |
${{ matrix.extraCommands }}
cd /Package
echo "${{ env.INSTALL_PATH }}/bin" >> $GITHUB_PATH
mkdir -p build/ install/
cd build
${{ matrix.cmakeExec }} ${{ env.CMAKE_BUILDER }} -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_PATH }} -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DCMAKE_CXX_FLAGS=" -fdiagnostics-color=always" ..
- name: Install
run: |
${{ matrix.extraCommands }}
cd /Package/build
${{ env.BUILDER }} install
- name: Testing cepgen executable
run: |
${{ matrix.extraCommands }}
cd /Package/build
#valgrind --show-leak-kinds=all --leak-check=full bin/cepgen Cards/lpair_cfg.py
bin/cepgen Cards/lpair_cfg.py
- name: Generate cepgen package
run: |
${{ matrix.extraCommands }}
cd /Package
cd build
${{ env.BUILDER }} package
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: package
path: ${{ github.workspace }}/build/*.rpm
- name: Testing cepgen executable (packaged)
continue-on-error: ${{ matrix.CI_IMAGE == 'laufor/ci-images:cepgen-cc7' }}
run: |
${{ matrix.packageInstall }}
echo -e "Now running cepgen installed from rpm"
valgrind --show-leak-kinds=all --leak-check=full cepgen Cards/lpair_cfg.py
- name: Testing CI recipes
run: |
${{ matrix.extraCommands }}
cd /Package/build
${{ env.BUILDER }} && ctest --output-on-failure