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

Update CI Ubuntu versions #492

Merged
merged 11 commits into from
Apr 2, 2025
8 changes: 3 additions & 5 deletions .github/workflows/abi-compatibility.yml
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@ on: [push, pull_request]
jobs:
job:
name: abi-check
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
timeout-minutes: 38
strategy:
fail-fast: false
@@ -40,16 +40,14 @@ jobs:
- name: 'Configure Dependencies - Ubuntu'
run: |
sudo apt-get update
sudo apt-get install -y libapr1-dev libaprutil1-dev elfutils vtable-dumper universal-ctags
# note: sqlext.h exists on github VM, purge for now as we don't link correctly...
sudo apt-get purge unixodbc-dev
sudo apt-get install -y g++-11 libapr1-dev libaprutil1-dev elfutils vtable-dumper universal-ctags
- name: 'run CMake'
run: |
cd main
mkdir build
cd build
cmake -DCMAKE_CXX_COMPILER=g++ -DCMAKE_C_COMPILER=gcc -DLOG4CXX_ABI_CHECK=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="-Og" -DBUILD_TESTING=off ..
cmake -DCMAKE_CXX_COMPILER=g++-11 -DLOG4CXX_ABI_CHECK=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="-g -Og -fno-eliminate-unused-debug-types" -DBUILD_TESTING=off ..
cmake --build .
- name: 'copy compat report'
4 changes: 2 additions & 2 deletions .github/workflows/log4cxx-cpp11.yml
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ on: [push, pull_request]
jobs:
job:
name: log4cxx-cpp11
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
timeout-minutes: 38
steps:
- uses: actions/checkout@v4
@@ -30,7 +30,7 @@ jobs:
- name: 'Configure Dependencies - Ubuntu'
run: |
sudo apt-get update
sudo apt-get install -y libapr1-dev libaprutil1-dev libboost-filesystem-dev libboost-thread-dev libesmtp-dev
sudo apt-get install -y libapr1-dev libaprutil1-dev libesmtp-dev
- name: 'run cmake - *nix'
run: |
18 changes: 9 additions & 9 deletions .github/workflows/log4cxx-ubuntu.yml
Original file line number Diff line number Diff line change
@@ -24,10 +24,10 @@ jobs:
strategy:
fail-fast: false
matrix:
name: [ubuntu20-gcc, ubuntu20-clang, ubuntu22-gcc, ubuntu22-clang]
name: [ubuntu22-gcc, ubuntu22-clang, ubuntu24-gcc, ubuntu24-clang]
include:
- name: ubuntu20-gcc
os: ubuntu-20.04
- name: ubuntu22-gcc
os: ubuntu-22.04
cxx: g++
fmt: OFF
qt: ON
@@ -38,8 +38,8 @@ jobs:
exitevents: OFF
fuzzers: OFF
logchar: utf-8
- name: ubuntu20-clang
os: ubuntu-20.04
- name: ubuntu22-clang
os: ubuntu-22.04
cxx: clang++
fmt: ON
qt: OFF
@@ -50,8 +50,8 @@ jobs:
exitevents: OFF
fuzzers: ON
logchar: utf-8
- name: ubuntu22-gcc
os: ubuntu-22.04
- name: ubuntu24-gcc
os: ubuntu-24.04
cxx: g++
fmt: OFF
qt: ON
@@ -62,8 +62,8 @@ jobs:
exitevents: ON
fuzzers: OFF
logchar: utf-8
- name: ubuntu22-clang
os: ubuntu-22.04
- name: ubuntu24-clang
os: ubuntu-24.04
cxx: clang++
fmt: ON
qt: OFF
8 changes: 8 additions & 0 deletions src/main/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -39,3 +39,11 @@ if(LOG4CXX_QT_SUPPORT)
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
)
endif(LOG4CXX_QT_SUPPORT)

option(LOG4CXX_ABI_CHECK "Check for ABI changes" OFF)
if(LOG4CXX_ABI_CHECK)
if(NOT "log4cxx" STREQUAL "${LOG4CXX_NS}")
message(FATAL_ERROR "ABI compatability can only be checked if LOG4CXX_NS=log4cxx, but LOG4CXX_NS=${LOG4CXX_NS}.")
endif()
add_subdirectory(abi-symbols)
endif(LOG4CXX_ABI_CHECK)
54 changes: 54 additions & 0 deletions src/main/abi-symbols/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

message("Getting dependencies for ABI compatability check...")
# Get the latest version of abi-dumper and abi-compliance-checker
include(FetchContent)
FetchContent_Declare(abi-dumper
GIT_REPOSITORY https://github.com/lvc/abi-dumper.git
GIT_TAG 1.4
)
FetchContent_GetProperties(abi-dumper)
if(NOT abi-dumper_POPULATED)
FetchContent_Populate(abi-dumper)
endif()

FetchContent_Declare(abi-compliance-checker
GIT_REPOSITORY https://github.com/lvc/abi-compliance-checker.git
GIT_TAG f60ce442c33f1d5cda1cec7cfddee24af1777572
)
FetchContent_GetProperties(abi-compliance-checker)
if(NOT abi-compliance-checker_POPULATED)
FetchContent_Populate(abi-compliance-checker)
endif()

# The local script is patched to exclude register assignments to parameters
#set(abi-dumper-script ${abi-dumper_SOURCE_DIR}/abi-dumper.pl)
set(abi-dumper-script ${CMAKE_CURRENT_SOURCE_DIR}/abi-dumper.pl)
set(abi-compliance-script ${abi-compliance-checker_SOURCE_DIR}/abi-compliance-checker.pl)

add_custom_target(dump-abi ALL
COMMAND perl ${abi-dumper-script} -public-headers public_header_files.txt -o new-abi.dump -skip-cxx -vnum ${log4cxx_VER} $<TARGET_FILE:log4cxx>
DEPENDS log4cxx
COMMENT "Dumping ABI symbols"
)

add_custom_target(compare-abi ALL
COMMAND perl ${abi-compliance-script} -skip-internal-symbols "\\d\\(fmt\\)" -skip-internal-types "\\(fmt\\)::" -l log4cxx -old ${CMAKE_CURRENT_SOURCE_DIR}/abi.dump -new new-abi.dump
DEPENDS dump-abi
COMMENT "Comparing ABI symbols"
)
Loading