basic example

This commit is contained in:
froejdh_e 2025-04-16 09:04:22 +02:00
parent 6b1d138e6f
commit 13a2ab854d
3 changed files with 42 additions and 0 deletions

27
.gitea/workflows/rh9.yml Normal file
View File

@ -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

6
CMakeLists.txt Normal file
View File

@ -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)

9
main.cpp Normal file
View File

@ -0,0 +1,9 @@
#include <iostream>
int main() {
std::cout << "Hello, World!" << std::endl;
return 0;
}