mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2025-06-06 12:50:40 +02:00
Activated RH8 build on PSI gitea (#155)
This commit is contained in:
parent
8b0eee1e66
commit
6e4db45b57
@ -1,18 +1,24 @@
|
|||||||
name: Build on RHEL8
|
name: Build on RHEL8
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
push:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
buildh:
|
build:
|
||||||
runs-on: "ubuntu-latest"
|
runs-on: "ubuntu-latest"
|
||||||
container:
|
container:
|
||||||
image: gitea.psi.ch/images/rhel8-developer-gitea-actions
|
image: gitea.psi.ch/images/rhel8-developer-gitea-actions
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
# workaround until actions/checkout@v4 is available for RH8
|
||||||
|
# - uses: actions/checkout@v4
|
||||||
|
- name: Clone repository
|
||||||
|
run: |
|
||||||
|
echo Cloning ${{ github.ref_name }}
|
||||||
|
git clone https://${{secrets.GITHUB_TOKEN}}@gitea.psi.ch/${{ github.repository }}.git --branch=${{ github.ref_name }} .
|
||||||
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
@ -22,7 +28,7 @@ jobs:
|
|||||||
- name: Build library
|
- name: Build library
|
||||||
run: |
|
run: |
|
||||||
mkdir build && cd build
|
mkdir build && cd build
|
||||||
cmake .. -DAARE_PYTHON_BINDINGS=ON -DAARE_TESTS=ON
|
cmake .. -DAARE_PYTHON_BINDINGS=ON -DAARE_TESTS=ON -DPython_FIND_VIRTUALENV=FIRST
|
||||||
make -j 2
|
make -j 2
|
||||||
|
|
||||||
- name: C++ unit tests
|
- name: C++ unit tests
|
||||||
|
@ -8,7 +8,7 @@ permissions:
|
|||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
buildh:
|
build:
|
||||||
runs-on: "ubuntu-latest"
|
runs-on: "ubuntu-latest"
|
||||||
container:
|
container:
|
||||||
image: gitea.psi.ch/images/rhel9-developer-gitea-actions
|
image: gitea.psi.ch/images/rhel9-developer-gitea-actions
|
||||||
|
@ -11,6 +11,14 @@ set(CMAKE_CXX_STANDARD 17)
|
|||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||||
|
|
||||||
|
execute_process(
|
||||||
|
COMMAND git log -1 --format=%h
|
||||||
|
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
|
||||||
|
OUTPUT_VARIABLE GIT_HASH
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
|
)
|
||||||
|
message(STATUS "Building from git hash: ${GIT_HASH}")
|
||||||
|
|
||||||
if (${CMAKE_VERSION} VERSION_GREATER "3.24")
|
if (${CMAKE_VERSION} VERSION_GREATER "3.24")
|
||||||
cmake_policy(SET CMP0135 NEW) #Fetch content download timestamp
|
cmake_policy(SET CMP0135 NEW) #Fetch content download timestamp
|
||||||
endif()
|
endif()
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
|
|
||||||
find_package (Python 3.10 COMPONENTS Interpreter Development REQUIRED)
|
find_package (Python 3.10 COMPONENTS Interpreter Development REQUIRED)
|
||||||
|
set(PYBIND11_FINDPYTHON ON) # Needed for RH8
|
||||||
|
|
||||||
# Download or find pybind11 depending on configuration
|
# Download or find pybind11 depending on configuration
|
||||||
if(AARE_FETCH_PYBIND11)
|
if(AARE_FETCH_PYBIND11)
|
||||||
FetchContent_Declare(
|
FetchContent_Declare(
|
||||||
pybind11
|
pybind11
|
||||||
GIT_REPOSITORY https://github.com/pybind/pybind11
|
GIT_REPOSITORY https://github.com/pybind/pybind11
|
||||||
GIT_TAG v2.13.0
|
GIT_TAG v2.13.6
|
||||||
)
|
)
|
||||||
FetchContent_MakeAvailable(pybind11)
|
FetchContent_MakeAvailable(pybind11)
|
||||||
else()
|
else()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user