Skip to content

Commit 21e24c2

Browse files
committed
Workflows to check for compatibility with modern root and c++ standards
Workflows executed on push and PR to master
1 parent 9c75599 commit 21e24c2

2 files changed

Lines changed: 180 additions & 0 deletions

File tree

.github/workflows/c++standards.yml

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
name: C++ Standards Checks
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
pull_request:
9+
branches:
10+
- master
11+
12+
jobs:
13+
builds-matrix:
14+
name: "${{matrix.os-version }} ${{ matrix.compiler }} ROOT ${{ matrix.root-version.name }} ${{ matrix.root-version.std }} CMake ${{ matrix.cmake-version }}"
15+
runs-on: ${{ matrix.os-version }}
16+
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
os-version: [ ubuntu-latest ]
21+
build_type: [ Release ]
22+
compiler: [ gcc-latest, clang-latest ]
23+
cmake-version: [ latest ]
24+
root-version:
25+
- name: 6.24.08
26+
std: 11
27+
- name: 6.26.06
28+
std: 14
29+
- name: 6.28.04
30+
std: 17
31+
- name: 6.28.04
32+
std: 20
33+
34+
steps:
35+
- name: Print env
36+
run: |
37+
echo github.event.action: ${{ github.event.action }}
38+
echo github.event_name: ${{ github.event_name }}
39+
40+
- name: Setup gcc compiler
41+
id: setup_cc
42+
uses: rlalik/setup-cpp-compiler@v1.1
43+
with:
44+
compiler: ${{ matrix.compiler }}
45+
46+
- name: Install common dependencies
47+
run: |
48+
sudo apt update
49+
sudo apt install wget -y
50+
sudo apt install python3-numpy libtbb-dev libxxhash0 -y
51+
cmake --version
52+
wget http://gccb.if.uj.edu.pl/code/root-cpp${{ matrix.root-version.std }}_${{ matrix.root-version.name }}_amd64.deb
53+
sudo dpkg -i root-cpp${{ matrix.root-version.std }}_${{ matrix.root-version.name }}_amd64.deb
54+
55+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
56+
- name: Checkout repository
57+
uses: actions/checkout@v1
58+
with:
59+
submodules: recursive
60+
61+
- name: Setup CMake
62+
uses: jwlawson/actions-setup-cmake@v1.14.0
63+
with:
64+
cmake-version: ${{ matrix.cmake-version }}
65+
66+
- name: Configure
67+
env:
68+
CC: ${{ steps.setup_cc.outputs.cc }}
69+
CXX: ${{ steps.setup_cc.outputs.cxx }}
70+
shell: bash
71+
run: |
72+
. /etc/profile
73+
root-config --version
74+
root-config --cflags
75+
root-config --features
76+
mkdir build
77+
cd build
78+
cmake .. \
79+
-DCMAKE_CXX_STANDARD=${{ matrix.root-version.std }} \
80+
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
81+
-DCMAKE_INSTALL_PREFIX:PATH=instdir
82+
83+
- name: Build
84+
shell: bash
85+
run: |
86+
cd build
87+
make
88+
89+
- name: Test
90+
shell: bash
91+
run: |
92+
cd build
93+
make test

.github/workflows/sys_checks.yml

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
name: Compiler Checks
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
pull_request:
9+
branches:
10+
- master
11+
12+
jobs:
13+
builds-matrix:
14+
name: "${{matrix.os-version }} ${{ matrix.compiler }} ROOT ${{ matrix.root-version.name }} 17 CMake ${{ matrix.cmake-version }}"
15+
runs-on: ${{ matrix.os-version }}
16+
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
os-version: [ ubuntu-latest ]
21+
build_type: [ Release ]
22+
compiler: [ gcc-9, gcc-10, gcc-11, gcc-12, gcc-13, clang-11, clang-12, clang-13, clang-14, clang-15 ]
23+
cmake-version: [ 3.14, latest ]
24+
root-version:
25+
- name: 6.28.04
26+
std: 17
27+
28+
steps:
29+
- name: Print env
30+
run: |
31+
echo github.event.action: ${{ github.event.action }}
32+
echo github.event_name: ${{ github.event_name }}
33+
34+
- name: Setup gcc compiler
35+
id: setup_cc
36+
uses: rlalik/setup-cpp-compiler@v1.1
37+
with:
38+
compiler: ${{ matrix.compiler }}
39+
40+
- name: Install common dependencies
41+
run: |
42+
sudo apt update
43+
sudo apt install wget -y
44+
sudo apt install python3-numpy libtbb-dev libxxhash0 -y
45+
cmake --version
46+
wget http://gccb.if.uj.edu.pl/code/root-cpp17_${{ matrix.root-version.name }}_amd64.deb
47+
sudo dpkg -i root-cpp17_${{ matrix.root-version.name }}_amd64.deb
48+
49+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
50+
- name: Checkout repository
51+
uses: actions/checkout@v1
52+
with:
53+
submodules: recursive
54+
55+
- name: Setup CMake
56+
uses: jwlawson/actions-setup-cmake@v1.14.0
57+
with:
58+
cmake-version: ${{ matrix.cmake-version }}
59+
60+
- name: Configure
61+
env:
62+
CC: ${{ steps.setup_cc.outputs.cc }}
63+
CXX: ${{ steps.setup_cc.outputs.cxx }}
64+
shell: bash
65+
run: |
66+
. /etc/profile
67+
root-config --version
68+
root-config --cflags
69+
root-config --features
70+
mkdir build
71+
cd build
72+
cmake .. \
73+
-DCMAKE_CXX_STANDARD=${{ matrix.root-version.std }} \
74+
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
75+
-DCMAKE_INSTALL_PREFIX:PATH=instdir
76+
77+
- name: Build
78+
shell: bash
79+
run: |
80+
cd build
81+
make
82+
83+
- name: Test
84+
shell: bash
85+
run: |
86+
cd build
87+
make test

0 commit comments

Comments
 (0)