Skip to content

Commit d349781

Browse files
committed
add Containerfile based on CentOS Stream 9
1 parent 62aaa4c commit d349781

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
@@ -269,3 +269,42 @@ jobs:
269269
if: always()
270270
run: env -0 | sort -z | tr '\0' '\n'
271271
shell: bash
272+
273+
container:
274+
name: Container image
275+
runs-on: ubuntu-latest
276+
steps:
277+
278+
- uses: actions/checkout@v3
279+
280+
- name: Build Containerfile
281+
run: |
282+
docker build -f ./Containerfile -t local/qpid-cpp:local .
283+
284+
- name: Run qpidd --help
285+
run: |
286+
docker run --rm local/qpid-cpp:local /usr/sbin/qpidd --help
287+
288+
- name: Start qpidd
289+
run: |
290+
docker run --name qpidd -d --rm -p 5672:5672 local/qpid-cpp:local /usr/sbin/qpidd
291+
292+
- name: Setup python 2.7
293+
id: python
294+
uses: actions/setup-python@v4
295+
with:
296+
python-version: 2.7
297+
architecture: x64
298+
299+
- name: Fetch qpid-python from git
300+
uses: actions/checkout@v3
301+
with:
302+
repository: apache/qpid-python
303+
ref: main
304+
path: qpid-python
305+
306+
- name: Run qpid-python tests against the container
307+
run: |
308+
${{ steps.python.outputs.python-path }} -m pip install qpid-tools qpid-qmf --no-deps
309+
${{ steps.python.outputs.python-path }} qpid-python-test -m qpid_tests
310+
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)