Skip to content

Commit

Permalink
Githubactions: Update Linux OS's
Browse files Browse the repository at this point in the history
  • Loading branch information
aveenismail committed Dec 2, 2024
1 parent 8b03831 commit f4cc640
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 11 deletions.
20 changes: 14 additions & 6 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ jobs:
fail-fast: false
matrix:
include:
- environment: "ubuntu:24.04"
- environment: "ubuntu:24.10"
cc: "gcc"
upload_for_test: "false"
- environment: "ubuntu:24.04"
- environment: "ubuntu:24.10"
cc: "clang"
upload_for_test: "false"
- environment: "ubuntu:23.10"
- environment: "ubuntu:24.04"
cc: "gcc"
upload_for_test: "false"
- environment: "ubuntu:23.10"
- environment: "ubuntu:24.04"
cc: "clang"
upload_for_test: "false"
- environment: "ubuntu:22.04"
Expand Down Expand Up @@ -72,6 +72,7 @@ jobs:
help2man \
libcurl4-openssl-dev \
libedit-dev \
pcscd \
libpcsclite-dev \
libusb-1.0-0-dev \
libssl-dev \
Expand Down Expand Up @@ -102,6 +103,13 @@ jobs:
# append the following flags: -Wno-missing-braces -Wno-missing-field-initializers -Wno-implicit-function-declaration
sed -i 's/-Wall -Wextra -Werror/-Wall -Wextra -Werror -Wno-missing-braces -Wno-missing-field-initializers -Wno-implicit-function-declaration/' cmake/SecurityFlags.cmake
- name: apply environment specific changes to CMakeLists.txt 2
working-directory: yubihsm-shell
if: ${{ matrix.environment == 'ubuntu:24.10' }}
run: |
# ubuntu 24.10 comes with _FORTIFY_SOURCE already set
sed -i 's/add_definitions (-D_FORTIFY_SOURCE=2)/add_definitions (-D_FORTIFY_SOURCE=3)/' cmake/SecurityFlags.cmake
- name: do build
working-directory: yubihsm-shell
env:
Expand Down Expand Up @@ -172,10 +180,10 @@ jobs:
- environment: "fedora:40"
cc: "clang"
upload_for_test: "false"
- environment: "fedora:39"
- environment: "fedora:41"
cc: "gcc"
upload_for_test: "false"
- environment: "fedora:39"
- environment: "fedora:41"
cc: "clang"
upload_for_test: "false"

Expand Down
16 changes: 11 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ jobs:
fail-fast: false
matrix:
environment: [
"ubuntu:24.10",
"ubuntu:24.04",
"ubuntu:23.10",
"ubuntu:22.04",
"ubuntu:20.04",
# "ubuntu:18.04",
Expand Down Expand Up @@ -211,10 +211,13 @@ jobs:
- name: apply environment specific changes to CMakeLists.txt
working-directory: yubihsm-shell
if: ${{ matrix.environment == 'ubuntu:24.04' }}
env:
DOCKER_IMAGE: ${{ matrix.environment }}
run: |
# ubuntu 24.04 comes with _FORTIFY_SOURCE already set
sed -i 's/add_definitions (-D_FORTIFY_SOURCE=2)/add_definitions (-D_FORTIFY_SOURCE=3)/' cmake/SecurityFlags.cmake
if [ "$DOCKER_IMAGE" = "ubuntu:24.04" ] || [ "$DOCKER_IMAGE" = "ubuntu:24.10" ]; then
# ubuntu 24.04 comes with _FORTIFY_SOURCE already set
sed -i 's/add_definitions (-D_FORTIFY_SOURCE=2)/add_definitions (-D_FORTIFY_SOURCE=3)/' cmake/SecurityFlags.cmake
fi
- name: extract platform name
env:
Expand All @@ -232,6 +235,9 @@ jobs:
set -x
uname -a
ls /usr/include/PCSC
echo "C_INCLUDE_PATH: $C_INCLUDE_PATH"
# Create directory containing all output
OUTPUT=$GITHUB_WORKSPACE/$PLATFORM/yubihsm-shell
Expand Down Expand Up @@ -288,8 +294,8 @@ jobs:
fail-fast: false
matrix:
environment: [
"fedora:39",
"fedora:40",
"fedora:41",
]

name: build on ${{ matrix.environment }}
Expand Down
14 changes: 14 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ if(NOT BUILD_ONLY_LIB)
set(LIBPCSC_LDFLAGS "-Wl,-framework -Wl,PCSC")
endif()


add_subdirectory (ykhsmauth)
add_subdirectory (yubihsm-auth)

Expand Down Expand Up @@ -249,6 +250,19 @@ message(" CFLAGS: ${CMAKE_C_FLAGS}")
message(" CPPFLAGS: ${CMAKE_CXX_FLAGS}")
message(" Warnings: ${WARN_FLAGS}")
message(" Build type: ${CMAKE_BUILD_TYPE}")

message(" PCSC found: ${LIBPCSC_FOUND}")
message(" PCSC libraries: ${LIBPCSC_LIBRARIES}")
message(" PCSC link libraries: ${LIBPCSC_LINK_LIBRARIES}")
message(" PCSC LDFLAGS: ${LIBPCSC_LDFLAGS}")
message(" PCSC include: ${LIBPCSC_INCLUDEDIR}")
message(" PCSC INCLUDEDIR: ${LIBPCSC_INCLUDEDIR}")
message(" PCSC CFLAGS: ${LIBPCSC_CFLAGS}")

message(" CMAKE_INCLUDE_PATH: ${CMAKE_INCLUDE_PATH}")
message(" CMAKE_SYSTEM_INCLUDE_PATH: ${CMAKE_SYSTEM_INCLUDE_PATH}")
message(" CMAKE_<LANG>_STANDARD_INCLUDE_DIRECTORIES: ${CMAKE_C_STANDARD_INCLUDE_DIRECTORIES}")

message("")
message(" Install prefix: ${CMAKE_INSTALL_PREFIX}")
message(" Install targets")
Expand Down
10 changes: 10 additions & 0 deletions ykhsmauth/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,16 @@ include_directories (
${LIBPCSC_INCLUDEDIR}
)

message(" PCSC found: ${LIBPCSC_FOUND}")
message(" PCSC libraries: ${LIBPCSC_LIBRARIES}")
message(" PCSC link libraries: ${LIBPCSC_LINK_LIBRARIES}")
message(" PCSC LDFLAGS: ${LIBPCSC_LDFLAGS}")
message(" PCSC include: ${LIBPCSC_INCLUDEDIR}")
message(" PCSC INCLUDEDIR: ${LIBPCSC_INCLUDEDIR}")
message(" PCSC CFLAGS: ${LIBPCSC_CFLAGS}")
message(" CFLAGS: ${CMAKE_C_FLAGS}")
message(" CPPFLAGS: ${CMAKE_CXX_FLAGS}")

add_library (ykhsmauth SHARED ${SOURCE})

#add_definitions (-DVERSION="${yubihsm_shell_VERSION_MAJOR}.${yubihsm_shell_VERSION_MINOR}.${yubihsm_shell_VERSION_PATCH}")
Expand Down

0 comments on commit f4cc640

Please sign in to comment.