Skip to content

Commit

Permalink
Add RHEL9 builds to CI/CD
Browse files Browse the repository at this point in the history
  • Loading branch information
neilstephens committed Nov 23, 2024
1 parent 5f43c45 commit 3ed5a8c
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 335 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/opendatacon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,18 @@ jobs:
build-type: Debug
docker-args:

- name: Redhat Enterprise Linux 9 Release
run-os: ubuntu-latest
docker-file: RHEL9
build-type: Release
docker-args:

- name: Redhat Enterprise Linux 9 Debug
run-os: ubuntu-latest
docker-file: RHEL9
build-type: Debug
docker-args:

runs-on: ${{ matrix.run-os }}

steps:
Expand Down
193 changes: 0 additions & 193 deletions .travis.yml

This file was deleted.

12 changes: 11 additions & 1 deletion Code/Libs/ODC/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,19 @@ endif()

if(ODC_ASIO_SSL)
message("OpenSSL root dir: ${OPENSSL_ROOT_DIR}")

# First try with static libs
set(OPENSSL_USE_STATIC_LIBS TRUE)
set(OPENSSL_MSVC_STATIC_RT TRUE)
find_package(OpenSSL 1.1.1 REQUIRED)
find_package(OpenSSL 1.1.1 QUIET)

if(NOT OpenSSL_FOUND)
message(STATUS "Static OpenSSL libraries not found, falling back to dynamic...")
set(OPENSSL_USE_STATIC_LIBS FALSE)
set(OPENSSL_MSVC_STATIC_RT FALSE)
find_package(OpenSSL 1.1.1 REQUIRED)
endif()

add_definitions(-DODC_ASIO_SSL)
message("OpenSSL include dir: ${OPENSSL_INCLUDE_DIR}")
message("OpenSSL libraries: ${OPENSSL_LIBRARIES}")
Expand Down
2 changes: 1 addition & 1 deletion Code/Ports/DNP3Port/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ if(USE_DNP3_SUBMODULE)
DNP3_CMAKE_OPTS
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DDNP3_STATIC_LIBS=ON
-DOPENSSL_USE_STATIC_LIBS=TRUE
-DOPENSSL_USE_STATIC_LIBS=${OPENSSL_USE_STATIC_LIBS}
"-DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS} -fPIC"
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
-DCMAKE_INSTALL_PREFIX=${DNP3_HOME}/
Expand Down
23 changes: 23 additions & 0 deletions DockerFiles/RHEL9
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# syntax=docker/dockerfile:1.2

FROM redhat/ubi9 as builder

RUN dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
RUN yum install -y socat g++ libstdc++-static cmake git openssl-devel python3-devel file libmodbus libmodbus-devel

RUN git clone --recurse-submodules https://github.com/neilstephens/opendatacon.git
ARG BUILD_COMMIT=develop
RUN git -C opendatacon checkout $BUILD_COMMIT

ARG BUILD_TYPE=Release
RUN mkdir opendatacon-build

RUN cmake -DFULL=ON -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_SYSTEM_VERSION=rhel9 \
-DOPENSSL_ROOT_DIR=/usr/ -S opendatacon -B opendatacon-build

RUN cmake --build opendatacon-build --parallel 8
RUN cmake --build opendatacon-build --target install
RUN cmake --build opendatacon-build --target package

FROM scratch AS export-stage
COPY --from=builder opendatacon-build/opendatacon*.sh /
Loading

0 comments on commit 3ed5a8c

Please sign in to comment.