mirror of
https://github.com/qpdf/qpdf.git
synced 2024-12-22 19:08:59 +00:00
commit
1d05390585
16
.github/workflows/main.yml
vendored
16
.github/workflows/main.yml
vendored
@ -118,6 +118,14 @@ jobs:
|
|||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: 'pikepdf'
|
- name: 'pikepdf'
|
||||||
run: build-scripts/test-pikepdf
|
run: build-scripts/test-pikepdf
|
||||||
|
pikepdf-future:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
# Run after pikepdf to save concurrent runners
|
||||||
|
needs: pikepdf
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- name: 'qpdf + pikepdf with FUTURE'
|
||||||
|
run: build-scripts/test-pikepdf future
|
||||||
Fuzzers:
|
Fuzzers:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: Prebuild
|
needs: Prebuild
|
||||||
@ -139,3 +147,11 @@ jobs:
|
|||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: 'Unsigned Char Tests'
|
- name: 'Unsigned Char Tests'
|
||||||
run: build-scripts/test-unsigned-char
|
run: build-scripts/test-unsigned-char
|
||||||
|
CxxNext:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
# Build after Fuzzers to save concurrent runners
|
||||||
|
needs: Fuzzers
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- name: 'Build with Next C++ standard'
|
||||||
|
run: build-scripts/test-c++-next
|
||||||
|
@ -3,7 +3,8 @@ cmake_minimum_required(VERSION 3.16)
|
|||||||
|
|
||||||
# make_dist expects the version line to be on a line by itself after
|
# make_dist expects the version line to be on a line by itself after
|
||||||
# the project line. When updating the version, check make_dist for all
|
# the project line. When updating the version, check make_dist for all
|
||||||
# the places it has to be updated.
|
# the places it has to be updated. The doc configuration and CI build
|
||||||
|
# also find the version number here.
|
||||||
project(qpdf
|
project(qpdf
|
||||||
VERSION 11.7.0
|
VERSION 11.7.0
|
||||||
LANGUAGES C CXX)
|
LANGUAGES C CXX)
|
||||||
@ -105,6 +106,7 @@ option(INSTALL_CMAKE_PACKAGE "Install cmake package files" ON)
|
|||||||
option(INSTALL_EXAMPLES "Install example files" ON)
|
option(INSTALL_EXAMPLES "Install example files" ON)
|
||||||
|
|
||||||
option(FUTURE "Include ABI-breaking changes CONSIDERED for the next major release" OFF)
|
option(FUTURE "Include ABI-breaking changes CONSIDERED for the next major release" OFF)
|
||||||
|
option(CXX_NEXT "Build with next C++ standard version" OFF)
|
||||||
|
|
||||||
# *** END OPTIONS ***
|
# *** END OPTIONS ***
|
||||||
|
|
||||||
@ -147,8 +149,14 @@ endif()
|
|||||||
# increment SOVERSION every time we increment the project major
|
# increment SOVERSION every time we increment the project major
|
||||||
# version. This works because qpdf uses semantic versioning. qpdf 10.x
|
# version. This works because qpdf uses semantic versioning. qpdf 10.x
|
||||||
# was libqpdf28, so start from there.
|
# was libqpdf28, so start from there.
|
||||||
math(EXPR qpdf_SOVERSION "${PROJECT_VERSION_MAJOR} + 18")
|
|
||||||
set(qpdf_LIBVERSION ${qpdf_SOVERSION}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH})
|
if(FUTURE)
|
||||||
|
math(EXPR qpdf_SOVERSION 0)
|
||||||
|
set(qpdf_LIBVERSION 0)
|
||||||
|
else()
|
||||||
|
math(EXPR qpdf_SOVERSION "${PROJECT_VERSION_MAJOR} + 18")
|
||||||
|
set(qpdf_LIBVERSION ${qpdf_SOVERSION}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH})
|
||||||
|
endif()
|
||||||
|
|
||||||
if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
|
if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
|
||||||
message(FATAL_ERROR "
|
message(FATAL_ERROR "
|
||||||
@ -159,7 +167,11 @@ Please build with cmake in a subdirectory, e.g.
|
|||||||
Please remove CMakeCache.txt and the CMakeFiles directories.")
|
Please remove CMakeCache.txt and the CMakeFiles directories.")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(CMAKE_CXX_STANDARD 17)
|
if(CXX_NEXT)
|
||||||
|
set(CMAKE_CXX_STANDARD 20)
|
||||||
|
else()
|
||||||
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
|
endif()
|
||||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
set(CMAKE_C_VISIBILITY_PRESET hidden)
|
set(CMAKE_C_VISIBILITY_PRESET hidden)
|
||||||
|
@ -10,7 +10,7 @@ pip3 install sphinx sphinx_rtd_theme
|
|||||||
cmake -S . -B build -DBUILD_DOC=1
|
cmake -S . -B build -DBUILD_DOC=1
|
||||||
cmake --build build --verbose --target doc_dist
|
cmake --build build --verbose --target doc_dist
|
||||||
zip -r doc.zip build/manual/doc-dist
|
zip -r doc.zip build/manual/doc-dist
|
||||||
version=$(grep -E '^release' manual/conf.py | cut -d"'" -f 2)
|
version=$(grep -E '^ +VERSION [1-9]' CMakeLists.txt | awk '{print $2}')
|
||||||
mv build/manual/doc-dist qpdf-${version}-doc
|
mv build/manual/doc-dist qpdf-${version}-doc
|
||||||
mkdir distribution
|
mkdir distribution
|
||||||
zip -r distribution/qpdf-${version}-doc-ci.zip qpdf-${version}-doc
|
zip -r distribution/qpdf-${version}-doc-ci.zip qpdf-${version}-doc
|
||||||
|
14
build-scripts/test-c++-next
Executable file
14
build-scripts/test-c++-next
Executable file
@ -0,0 +1,14 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get -y install \
|
||||||
|
build-essential cmake \
|
||||||
|
zlib1g-dev libjpeg-dev libgnutls28-dev libssl-dev
|
||||||
|
cmake -S . -B build \
|
||||||
|
-DCXX_NEXT=ON \
|
||||||
|
-DCI_MODE=1 -DBUILD_STATIC_LIBS=0 -DCMAKE_BUILD_TYPE=Release \
|
||||||
|
-DREQUIRE_CRYPTO_OPENSSL=1 -DREQUIRE_CRYPTO_GNUTLS=1 \
|
||||||
|
-DENABLE_QTC=1
|
||||||
|
cmake --build build --verbose -j$(nproc) -- -k
|
||||||
|
cd build
|
||||||
|
ctest --verbose
|
@ -1,10 +1,20 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -ex
|
set -ex
|
||||||
|
cmake_extra=
|
||||||
|
future=0
|
||||||
|
if [ "$1" = "future" ]; then
|
||||||
|
future=1
|
||||||
|
cmake_extra=-DFUTURE=ON
|
||||||
|
fi
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get -y install \
|
sudo apt-get -y install \
|
||||||
build-essential cmake zlib1g-dev libjpeg-dev libgnutls28-dev
|
build-essential cmake zlib1g-dev libjpeg-dev libgnutls28-dev
|
||||||
cmake -S . -B build -DBUILD_STATIC_LIBS=0 -DCMAKE_BUILD_TYPE=RelWithDebInfo
|
cmake -S . -B build -DBUILD_STATIC_LIBS=0 -DCMAKE_BUILD_TYPE=RelWithDebInfo $cmake_extra
|
||||||
cmake --build build --verbose -j$(nproc) --target libqpdf -- -k
|
cmake --build build --verbose -j$(nproc) --target libqpdf -- -k
|
||||||
|
if [ "$future" = "1" ]; then
|
||||||
|
# Run qpdf's test suite in FUTURE mode as well
|
||||||
|
ctest --verbose
|
||||||
|
fi
|
||||||
export QPDF_SOURCE_TREE=$PWD
|
export QPDF_SOURCE_TREE=$PWD
|
||||||
export QPDF_BUILD_LIBDIR=$QPDF_SOURCE_TREE/build/libqpdf
|
export QPDF_BUILD_LIBDIR=$QPDF_SOURCE_TREE/build/libqpdf
|
||||||
export LD_LIBRARY_PATH=$QPDF_BUILD_LIBDIR
|
export LD_LIBRARY_PATH=$QPDF_BUILD_LIBDIR
|
||||||
|
@ -27,7 +27,12 @@
|
|||||||
#define QPDF_MAJOR_VERSION 11
|
#define QPDF_MAJOR_VERSION 11
|
||||||
#define QPDF_MINOR_VERSION 7
|
#define QPDF_MINOR_VERSION 7
|
||||||
#define QPDF_PATCH_VERSION 0
|
#define QPDF_PATCH_VERSION 0
|
||||||
#define QPDF_VERSION "11.7.0"
|
|
||||||
|
#ifdef QPDF_FUTURE
|
||||||
|
# define QPDF_VERSION "11.7.0+future"
|
||||||
|
#else
|
||||||
|
# define QPDF_VERSION "11.7.0"
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This file defines symbols that control the which functions,
|
* This file defines symbols that control the which functions,
|
||||||
|
22
make_dist
22
make_dist
@ -59,7 +59,6 @@ cd($tmpdir);
|
|||||||
# Check versions
|
# Check versions
|
||||||
my $cmakeversion = get_version_from_cmake();
|
my $cmakeversion = get_version_from_cmake();
|
||||||
my $code_version = get_version_from_source();
|
my $code_version = get_version_from_source();
|
||||||
my $doc_version = get_version_from_manual();
|
|
||||||
|
|
||||||
my $version_error = 0;
|
my $version_error = 0;
|
||||||
if ($version ne $cmakeversion)
|
if ($version ne $cmakeversion)
|
||||||
@ -72,11 +71,6 @@ if ($version ne $code_version)
|
|||||||
print "$whoami: QPDF.cc version = $code_version\n";
|
print "$whoami: QPDF.cc version = $code_version\n";
|
||||||
$version_error = 1;
|
$version_error = 1;
|
||||||
}
|
}
|
||||||
if ($version ne $doc_version)
|
|
||||||
{
|
|
||||||
print "$whoami: doc version = $doc_version\n";
|
|
||||||
$version_error = 1;
|
|
||||||
}
|
|
||||||
if ($version_error)
|
if ($version_error)
|
||||||
{
|
{
|
||||||
die "$whoami: version numbers are not consistent\n";
|
die "$whoami: version numbers are not consistent\n";
|
||||||
@ -157,22 +151,6 @@ sub get_version_from_source
|
|||||||
$code_version;
|
$code_version;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub get_version_from_manual
|
|
||||||
{
|
|
||||||
my $fh = safe_open("manual/conf.py");
|
|
||||||
my $doc_version = 'unknown';
|
|
||||||
while (<$fh>)
|
|
||||||
{
|
|
||||||
if (m/release = '([^\']+)\'/)
|
|
||||||
{
|
|
||||||
$doc_version = $1;
|
|
||||||
last;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$fh->close();
|
|
||||||
$doc_version;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub safe_open
|
sub safe_open
|
||||||
{
|
{
|
||||||
my $file = shift;
|
my $file = shift;
|
||||||
|
@ -15,8 +15,12 @@ sys.path.append(os.path.abspath("./_ext"))
|
|||||||
project = 'QPDF'
|
project = 'QPDF'
|
||||||
copyright = '2005-2023, Jay Berkenbilt'
|
copyright = '2005-2023, Jay Berkenbilt'
|
||||||
author = 'Jay Berkenbilt'
|
author = 'Jay Berkenbilt'
|
||||||
# make_dist and the CI build lexically find the release version from this file.
|
here = os.path.dirname(os.path.realpath(__file__))
|
||||||
release = '11.7.0'
|
with open(f'{here}/../CMakeLists.txt') as f:
|
||||||
|
for line in f.readlines():
|
||||||
|
if line.strip().startswith('VERSION '):
|
||||||
|
release = line.replace('VERSION', '').strip()
|
||||||
|
break
|
||||||
version = release
|
version = release
|
||||||
extensions = [
|
extensions = [
|
||||||
'sphinx_rtd_theme',
|
'sphinx_rtd_theme',
|
||||||
|
Loading…
Reference in New Issue
Block a user