Skip to content

Commit 6df8583

Browse files
committed
feat(github):Added ubuntu26.04 for CI tests
Minor change Exclude other combinations Update cmake version Exclude more combinations Changed gtest options Update gtest Update CIs Minor change Print gtest info New print Minor change again
1 parent c7f1d78 commit 6df8583

4 files changed

Lines changed: 67 additions & 8 deletions

File tree

.github/actions/r3bbuild-steps-wfr/action.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,16 @@ runs:
3737
echo "cacheSHA=$([[ ${{github.event_name}} = 'push' ]] && git rev-parse --short HEAD || git rev-parse --short HEAD^)" >> $GITHUB_ENV
3838
git submodule update --init --recursive
3939
git clone https://github.com/R3BRootGroup/macros.git
40-
if [[ "${{ matrix.os }}" == "fedora42" || "${{ matrix.os }}" == "ubuntu2504" ]]; then
40+
if [[ "${{ matrix.os }}" == "fedora42" || "${{ matrix.os }}" == "ubuntu2504" || "${{ matrix.os }}" == "ubuntu2604" ]]; then
4141
unset UCESB_DIR
4242
echo "UCESB_DIR=" >> $GITHUB_ENV
4343
fi
44-
cmake --preset ${{ matrix.preset }} . -C "$GITHUB_WORKSPACE/cmake/CI_CD/configure_options.cmake" -DCMAKE_CXX_STANDARD=${{ matrix.cpp }}
44+
45+
if [[ "${{ matrix.os }}" == "ubuntu2404" || "${{ matrix.os }}" == "ubuntu2504" ]]; then
46+
cmake --preset ${{ matrix.preset }} . -C "$GITHUB_WORKSPACE/cmake/CI_CD/configure_options.cmake" -DCMAKE_CXX_STANDARD=${{ matrix.cpp }} -DFETCH_GTEST=OFF
47+
else
48+
cmake --preset ${{ matrix.preset }} . -C "$GITHUB_WORKSPACE/cmake/CI_CD/configure_options.cmake" -DCMAKE_CXX_STANDARD=${{ matrix.cpp }} -DFETCH_GTEST=ON
49+
fi
4550
shell: bash
4651

4752
- name: Build

.github/workflows/main_other_os.yml

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,44 @@ jobs:
5858
# Here are the groups of repositories that need to be downloaded inside
5959
# r3broot. Each group is used by only one job.
6060
repos: [ r3broot, glad-tpc, sofia-frs-asy ] # exclude r3broot-conan
61-
os: [ ubuntu2404, ubuntu2504] # fedora42 is with C++23
61+
os: [ ubuntu2404, ubuntu2504 , ubuntu2604 ]
6262
cpp: [ 17 ]
63-
fsv: [ jan24p5 ]
64-
frv: [ v18.8.2 ]
63+
fsv: [ jan24p5, jan24p6 ]
64+
frv: [ v18.8.2, v19.0.1 ]
65+
exclude:
66+
- os: ubuntu2404
67+
fsv: jan24p6
68+
frv: v19.0.1
69+
- os: ubuntu2404
70+
fsv: jan24p5
71+
frv: v19.0.1
72+
- os: ubuntu2404
73+
fsv: jan24p6
74+
frv: v18.8.2
75+
- os: ubuntu2404
76+
fsv: jan24p5
77+
frv: v19.0.1
78+
- os: ubuntu2504
79+
fsv: jan24p6
80+
frv: v19.0.1
81+
- os: ubuntu2504
82+
fsv: jan24p6
83+
frv: v18.8.2
84+
- os: ubuntu2504
85+
fsv: jan24p5
86+
frv: v19.0.1
87+
- os: ubuntu2404
88+
fsv: jan24p5
89+
frv: v19.0.1
90+
- os: ubuntu2604
91+
fsv: jan24p5
92+
frv: v18.8.2
93+
- os: ubuntu2604
94+
fsv: jan24p6
95+
frv: v18.8.2
96+
- os: ubuntu2604
97+
fsv: jan24p5
98+
frv: v19.0.1
6599

66100
# The list under "include" defines some properties for each group:
67101
#

CMakeLists.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ endif()
2424
cmake_minimum_required(VERSION 3.27 FATAL_ERROR)
2525

2626
# set cmake policies
27-
cmake_policy(VERSION 3.27...4.2)
27+
cmake_policy(VERSION 3.27...4.3)
2828

2929
# Set name of our project to "R3BROOT". Has to be done after check of cmake version
3030
project(R3BROOT LANGUAGES C CXX Fortran)
@@ -285,7 +285,12 @@ if(CONAN_ENABLED)
285285
CACHE BOOL "disable implicit conversion of JSON" FORCE)
286286
endif()
287287

288-
find_package2(PRIVATE GTest)
288+
include(cmake/modules/FetchAllContents.cmake)
289+
290+
if(NOT FETCH_GTEST)
291+
find_package2(PRIVATE GTest)
292+
endif()
293+
289294
find_package2(PUBLIC Pythia6)
290295
find_package2(PUBLIC Pythia8)
291296
find_package2(PUBLIC Protobuf)

cmake/modules/FetchAllContents.cmake

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,22 @@ include(FetchContent)
33
if(FETCH_GTEST)
44
fetchcontent_declare(
55
googletest
6-
URL https://github.com/google/googletest/archive/03597a01ee50ed33e9dfd640b249b4be3799d395.zip
6+
URL https://github.com/google/googletest/archive/refs/tags/v1.15.0.zip
77
)
88
fetchcontent_makeavailable(googletest)
9+
10+
message(STATUS "googletest_SOURCE_DIR = ${googletest_SOURCE_DIR}")
11+
12+
if(EXISTS "${googletest_SOURCE_DIR}/CMakeLists.txt")
13+
file(STRINGS
14+
"${googletest_SOURCE_DIR}/CMakeLists.txt"
15+
GOOGLETEST_VERSION_LINE
16+
REGEX "set\\(GOOGLETEST_VERSION")
17+
18+
message(STATUS "GOOGLETEST_VERSION line = ${GOOGLETEST_VERSION_LINE}")
19+
endif()
20+
21+
if(TARGET gtest)
22+
message(STATUS "Target gtest FOUND")
23+
endif()
924
endif()

0 commit comments

Comments
 (0)