From 13a2ab854d2c6e61c203143166f78acd7fd395dd Mon Sep 17 00:00:00 2001 From: froejdh_e Date: Wed, 16 Apr 2025 09:04:22 +0200 Subject: [PATCH] basic example --- .gitea/workflows/rh9.yml | 27 +++++++++++++++++++++++++++ CMakeLists.txt | 6 ++++++ main.cpp | 9 +++++++++ 3 files changed, 42 insertions(+) create mode 100644 .gitea/workflows/rh9.yml create mode 100644 CMakeLists.txt create mode 100644 main.cpp diff --git a/.gitea/workflows/rh9.yml b/.gitea/workflows/rh9.yml new file mode 100644 index 0000000..47c14bd --- /dev/null +++ b/.gitea/workflows/rh9.yml @@ -0,0 +1,27 @@ +name: Build on RHEL9 + +on: + push: + workflow_dispatch: + +permissions: + contents: read + +jobs: + build: + runs-on: "ubuntu-latest" + container: + image: gitea.psi.ch/detectors-int/rhel9-detectors-dev + steps: + - uses: actions/checkout@v4 + + + - name: Build library + run: | + mkdir build && cd build + cmake .. + make -j 2 + + - name: C++ unit tests + working-directory: ${{gitea.workspace}}/build + run: ctest \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..1f926de --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,6 @@ +project(ci-example) +cmake_minimum_required(VERSION 3.15) +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +add_executable(ci-example main.cpp) \ No newline at end of file diff --git a/main.cpp b/main.cpp new file mode 100644 index 0000000..a92b4a8 --- /dev/null +++ b/main.cpp @@ -0,0 +1,9 @@ + + + +#include + +int main() { + std::cout << "Hello, World!" << std::endl; + return 0; +} \ No newline at end of file