diff --git a/.gitea/workflows/action.yaml b/.gitea/workflows/action.yaml new file mode 100644 index 0000000..1889e9c --- /dev/null +++ b/.gitea/workflows/action.yaml @@ -0,0 +1,23 @@ +name: CI + +on: + push: + branches: [ "main" ] + +jobs: + build-and-test: + runs-on: linmidas + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Configure project + run: | + mkdir -p build + cmake -B build + - name: Build + run: | + cmake --build build + - name: Run tests + run: | + ctest --output-on-failure --test-dir build diff --git a/CMakeLists.txt b/CMakeLists.txt index b8c64e1..aaf979e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,13 +10,16 @@ add_compile_options( -Wno-unused-function ) -# Check if the required environment variables MIDASSYS and EPICSSYS are available +# Check if the required environment variables MIDASSYS, EPICSSYS and EPICS_HOST_ARCH are available if (NOT DEFINED ENV{MIDASSYS}) message(SEND_ERROR "MIDASSYS environment variable not defined.") endif() if (NOT DEFINED ENV{EPICSSYS}) message(SEND_ERROR "EPICSSYS environment variable not defined.") endif() +if (NOT DEFINED ENV{EPICS_HOST_ARCH}) + message(SEND_ERROR "EPICS_HOST_ARCH environment variable not defined.") +endif() set(CMAKE_CXX_STANDARD 17) set(MIDASSYS $ENV{MIDASSYS})