Skip to content

Commit 82a779a

Browse files
authored
Merge pull request #53 from SparkiDev/qpdf
GitHub workflow: add qpdf
2 parents a858891 + 87091a5 commit 82a779a

1 file changed

Lines changed: 102 additions & 0 deletions

File tree

.github/workflows/qpdf.yml

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
name: qpdf Test
2+
3+
# START OF COMMON SECTION
4+
on:
5+
push:
6+
branches: [ 'master', 'main', 'release/**' ]
7+
pull_request:
8+
branches: [ '*' ]
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
# END OF COMMON SECTION
14+
15+
jobs:
16+
build_gnutls:
17+
name: Build wolfSSL, GnuTLS and provider
18+
timeout-minutes: 30
19+
strategy:
20+
matrix:
21+
os: [ ubuntu-latest ]
22+
qpdf_ref: [ 'main', 'v11.3.0', 'v12.2.0' ]
23+
fail-fast: false
24+
runs-on: ${{ matrix.os }}
25+
26+
steps:
27+
- name: Checkout gnutls-wolfssl repository
28+
uses: actions/checkout@v4
29+
30+
- name: Ensure make available (Ubuntu only)
31+
if: matrix.os == 'ubuntu-latest'
32+
run: |
33+
sudo apt-get update
34+
sudo apt-get install -y build-essential
35+
36+
- name: Install GnuTLS dependencies (Ubuntu only)
37+
if: matrix.os == 'ubuntu-latest'
38+
run: |
39+
sudo apt-get install -y gnulib autopoint gperf gtk-doc-tools nettle-dev clang libtasn1-bin libtasn1-6-dev libunistring-dev libp11-kit-dev libunbound-dev
40+
41+
- name: Install qpdf dependencies (Ubuntu only)
42+
if: matrix.os == 'ubuntu-latest'
43+
run: |
44+
sudo apt install -y \
45+
cmake zlib1g-dev libjpeg-dev
46+
47+
- name: Install build and test dependencies (Ubuntu only)
48+
if: matrix.os == 'ubuntu-latest'
49+
run: |
50+
sudo apt-get install -y autoconf libtool valgrind
51+
52+
- name: Build GnuTLS with wolfSSL provider using setup.sh script
53+
run: |
54+
echo "Running setup.sh..."
55+
BUILD_RESULT=0
56+
GNUTLS_INSTALL=/opt/gnutls WOLFSSL_INSTALL=/opt/wolfssl ./setup.sh
57+
if [ $? -ne 0 ]; then
58+
echo "Build failed"
59+
exit 1
60+
fi
61+
62+
- name: Check setup.sh output directories
63+
run: |
64+
echo "Check for wolfSSL installation..."
65+
if [ ! -d /opt/wolfssl ]; then
66+
echo "/opt/wolfssl not found after setup"
67+
exit 1
68+
fi
69+
echo "Check for GnuTLS installation..."
70+
if [ ! -d /opt/gnutls ]; then
71+
echo "/opt/gnutls not found after setup"
72+
exit 1
73+
fi
74+
echo "Check for wrapper installation..."
75+
if [ ! -d /opt/wolfssl-gnutls-wrapper/lib ]; then
76+
echo "/opt/wolfssl-gnutls-wrapper/lib not found after setup"
77+
exit 1
78+
fi
79+
80+
- name: Build qpdf at ${{ matrix.qpdf_ref }}
81+
run: |
82+
git clone https://github.com/qpdf/qpdf.git
83+
cd qpdf
84+
git checkout ${{ matrix.qpdf_ref }}
85+
86+
- name: Configure qpdf
87+
working-directory: qpdf
88+
run: |
89+
export PKG_CONFIG_PATH=/opt/gnutls/lib/pkgconfig
90+
cmake -S . -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo
91+
92+
- name: Make qpdf
93+
working-directory: qpdf
94+
run: |
95+
cmake --build build -j"$(nproc)"
96+
97+
- name: Test qpdf
98+
working-directory: qpdf
99+
run: |
100+
cd build
101+
WGW_LOGGING=0 ctest --verbose
102+

0 commit comments

Comments
 (0)