Skip to content

Commit 169b35a

Browse files
committed
add Containerfile based on CentOS Stream 9
1 parent 4b1afd9 commit 169b35a

File tree

2 files changed

+99
-0
lines changed

2 files changed

+99
-0
lines changed

.github/workflows/build.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,3 +240,42 @@ jobs:
240240
if: always()
241241
run: env -0 | sort -z | tr '\0' '\n'
242242
shell: bash
243+
244+
container:
245+
name: Container image
246+
runs-on: ubuntu-latest
247+
steps:
248+
249+
- uses: actions/checkout@v3
250+
251+
- name: Build Containerfile
252+
run: |
253+
docker build -f ./Containerfile -t local/qpid-cpp:local .
254+
255+
- name: Run qpidd --help
256+
run: |
257+
docker run --rm local/qpid-cpp:local /usr/sbin/qpidd --help
258+
259+
- name: Start qpidd
260+
run: |
261+
docker run --name qpidd -d --rm local/qpid-cpp:local /usr/sbin/qpidd
262+
263+
- name: Setup python 2.7
264+
id: python
265+
uses: actions/setup-python@v4
266+
with:
267+
python-version: 2.7
268+
architecture: x64
269+
270+
- name: Fetch qpid-python from git
271+
uses: actions/checkout@v3
272+
with:
273+
repository: apache/qpid-python
274+
ref: main
275+
path: qpid-python
276+
277+
- name: Run qpid-python tests against the container
278+
run: |
279+
${{ steps.python.outputs.python-path }} -m pip install qpid-tools qpid-qmf --no-deps
280+
${{ steps.python.outputs.python-path }} qpid-python-test -m qpid_tests
281+
working-directory: qpid-python

Containerfile

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
#
2+
# Licensed to the Apache Software Foundation (ASF) under one
3+
# or more contributor license agreements. See the NOTICE file
4+
# distributed with this work for additional information
5+
# regarding copyright ownership. The ASF licenses this file
6+
# to you under the Apache License, Version 2.0 (the
7+
# "License"); you may not use this file except in compliance
8+
# with the License. You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing,
13+
# software distributed under the License is distributed on an
14+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
# KIND, either express or implied. See the License for the
16+
# specific language governing permissions and limitations
17+
# under the License.
18+
#
19+
20+
FROM quay.io/centos/centos:stream9 as builder
21+
22+
RUN dnf -y install epel-release 'dnf-command(config-manager)'
23+
RUN dnf config-manager --set-enabled crb
24+
25+
# I am referring to the CentOS7 package (.spec file in the src.rpm) to look up dependencies
26+
# https://koji.fedoraproject.org/koji/buildinfo?buildID=1180279
27+
# TODO seemingly unavailable packages:
28+
# xqilla-devel
29+
30+
RUN dnf -y --setopt=install_weak_deps=0 --setopt=tsflags=nodocs install \
31+
rpm-build \
32+
gcc gcc-c++ make cmake \
33+
boost-devel boost-filesystem boost-program-options \
34+
xerces-c-devel \
35+
rdma-core-devel \
36+
libdb-devel libdb-cxx-devel libaio-devel \
37+
qpid-proton-c-devel \
38+
swig perl-devel python3-devel ruby-devel rubygem-rexml \
39+
libuuid-devel nss-devel nspr-devel nss-tools cyrus-sasl cyrus-sasl-lib cyrus-sasl-devel \
40+
wget tar patch findutils git pkgconfig
41+
42+
# Workaround for latest release of qpid-python being incompatible with python 3
43+
WORKDIR /build
44+
RUN git clone https://github.com/apache/qpid-python.git \
45+
&& cd qpid-python \
46+
&& python3 setup.py install
47+
48+
# git clone https://github.com/apache/qpid-cpp.git
49+
COPY . .
50+
RUN eval "$(rpmbuild --eval '%set_build_flags')" \
51+
&& cmake -S . -B cmake-build \
52+
-DBUILD_DOCS=OFF \
53+
-DBUILD_TESTING=OFF \
54+
-DCMAKE_INSTALL_PREFIX=/usr \
55+
-DPYTHON_EXECUTABLE=/usr/bin/python3 \
56+
&& cmake --build "cmake-build" --parallel "$(nproc)" --verbose \
57+
&& cmake --install "cmake-build"
58+
59+
EXPOSE 5672
60+
CMD ["/usr/sbin/qpidd"]

0 commit comments

Comments
 (0)