Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: OpenSSL compatibility check and macOS #67

Merged
merged 2 commits into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 69 additions & 0 deletions .github/workflows/OpenSSL_versions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# GitHub Actions for genCMPClient
# SPDX-License-Identifier: Apache-2.0
# Copyright (c) Siemens AG, 2021-2024

name: OpenSSL compatibility

on: push

jobs:
version:
strategy:
fail-fast: false
matrix:
branch: [openssl-3.0, openssl-3.1, openssl-3.2, openssl-3.3, openssl-3.4]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: set cache env
run: |
echo "cache-name=`git ls-remote https://github.com/openssl/openssl.git ${{matrix.branch}} | awk '{print $1}'`" >> "$GITHUB_ENV"
echo "OPENSSL_DIR=`pwd`/${{ matrix.branch }}" >> $GITHUB_ENV

- id: cache-openssl
name: cache openssl
uses: actions/cache@v3
with:
path: ${{ env.OPENSSL_DIR }}
key: openssl-${{ env.cache-name }}-${{ runner.os }}-${{ runner.arch }}

- if: ${{ steps.cache-openssl.outputs.cache-hit != 'true' }}
name: build openssl
run: |
git clone https://github.com/openssl/openssl.git --branch ${{ matrix.branch }} --depth 1
cd openssl
./config --banner=Configured --debug --strict-warnings --prefix=${{ env.OPENSSL_DIR }} shared zlib
make -s -j4
sudo make install_sw install_ssldirs
cd ..

- name: set OpenSSL env
run: |
echo "OPENSSL_LIB=${{ env.OPENSSL_DIR }}/lib64" >> $GITHUB_ENV
echo "${{ env.OPENSSL_DIR }}/bin" >> "$GITHUB_PATH"
echo "LD_LIBRARY_PATH=${{ env.OPENSSL_DIR }}/lib64:$LD_LIBRARY_PATH" >> "$GITHUB_ENV"
DDvO marked this conversation as resolved.
Show resolved Hide resolved
- name: cmake
run: |
cmake .
make
./cmpClient -help

mkdir build-with-libcmp
cd build-with-libcmp
USE_LIBCMP=1 cmake -S .. -B .
make clean build
DESTDIR=tmp make install uninstall
make deb
DDvO marked this conversation as resolved.
Show resolved Hide resolved
- name: make
run: |
make -f Makefile_v1
./cmpClient -help
# make -f Makefile_v1 test_Mock # TODO add after solving issue #76
make -f Makefile_v1 clean_all

USE_LIBCMP=1 STATIC_LIBCMP=1 make -f Makefile_v1
./cmpClient -help
make -f Makefile_v1 clean


37 changes: 37 additions & 0 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# GitHub Actions for genCMPClient
# SPDX-License-Identifier: Apache-2.0
# Copyright (c) Siemens AG, 2021-2024

name: macOS

on: push

jobs:
cmake:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: make
run: |
make -f Makefile_v1
./cmpClient -help
# make -f Makefile_v1 test_Mock # TODO add after solving issue with CMP HTTP server hanging on startup
DDvO marked this conversation as resolved.
Show resolved Hide resolved
make -f Makefile_v1 clean_all
- name: cmake
run: |
mkdir build
cd build
cmake -S .. -B .
cmake --build .
cmake -DCMAKE_BUILD_TYPE=Release ..
make
./cmpClient -help
cd ..

mkdir build-with-libcmp
cd build-with-libcmp
USE_LIBCMP=1 cmake -S .. -B .
make
./cmpClient -help
DESTDIR=tmp make install uninstall # implies "make build"
make clean_all
Loading