Skip to content

Commit 077cf14

Browse files
committed
Add wrapper generation to CI builds
1 parent f6e8ea7 commit 077cf14

File tree

3 files changed

+40
-5
lines changed

3 files changed

+40
-5
lines changed

.github/workflows/dockerfiles/Dockerfile_centos7

+14-1
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,21 @@ WORKDIR work
2525
ARG QT_SELECT=qt5
2626
RUN uname -a; gcc --version | grep "gcc"; python --version; qmake-qt5 --version
2727

28+
CMD ["make"]
29+
30+
# 1. build PythonQt and the generator
31+
2832
RUN qmake-qt5 -r PythonQt.pro \
2933
PYTHON_VERSION=$(python --version | cut -d " " -f 2 | cut -d "." -f1,2) \
3034
PYTHON_DIR=$(which python | xargs dirname | xargs dirname)
35+
RUN make
3136

32-
CMD ["make"]
37+
# 2. generate wrappers using the built generator
38+
39+
# workaround to allow to find the Qt include dirs for installed standard qt packages
40+
RUN mkdir /usr/include/qt5ln; ln -s /usr/include/qt5 /usr/include/qt5ln/include
41+
42+
RUN echo "export QTDIR=/usr/include/qt5ln" > generate.sh
43+
RUN echo "cd generator; ./pythonqt_generator" >> generate.sh
44+
45+
CMD ["bash", "generate.sh"]

.github/workflows/dockerfiles/Dockerfile_gcc11

+13-2
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,19 @@ WORKDIR work
2929
ARG QT_SELECT=qt5
3030
RUN uname -a; gcc --version | grep "gcc"; python3 --version; qmake --version
3131

32+
# 1. build PythonQt and the generator
33+
3234
RUN qmake -r PythonQt.pro \
3335
PYTHON_VERSION=$(python3 --version | cut -d " " -f 2 | cut -d "." -f1,2) \
34-
PYTHON_DIR=$(which python3 | xargs dirname | xargs dirname)
36+
PYTHON_DIR=$(which python3 | xargs dirname | xargs dirname)
37+
RUN make
38+
39+
# 2. generate wrappers using the built generator
40+
41+
# workaround to allow to find the Qt include dirs for installed standard qt packages
42+
RUN mkdir /usr/include/qt5; ln -s /usr/include/x86_64-linux-gnu/qt5 /usr/include/qt5/include
43+
44+
RUN echo "export QTDIR=/usr/include/qt5" > generate.sh
45+
RUN echo "cd generator; ./pythonqt_generator" >> generate.sh
3546

36-
CMD ["make"]
47+
CMD ["bash", "generate.sh"]

.github/workflows/dockerfiles/Dockerfile_gcc7

+13-2
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,19 @@ WORKDIR work
2929
ARG QT_SELECT=qt5
3030
RUN uname -a; gcc --version | grep "gcc"; python3 --version; qmake --version
3131

32+
# 1. build PythonQt and the generator
33+
3234
RUN qmake -r PythonQt.pro \
3335
PYTHON_VERSION=$(python3 --version | cut -d " " -f 2 | cut -d "." -f1,2) \
34-
PYTHON_DIR=$(which python3 | xargs dirname | xargs dirname)
36+
PYTHON_DIR=$(which python3 | xargs dirname | xargs dirname)
37+
RUN make
38+
39+
# 2. generate wrappers using the built generator
40+
41+
# workaround to allow to find the Qt include dirs for installed standard qt packages
42+
RUN mkdir /usr/include/qt5; ln -s /usr/include/x86_64-linux-gnu/qt5 /usr/include/qt5/include
43+
44+
RUN echo "export QTDIR=/usr/include/qt5" > generate.sh
45+
RUN echo "cd generator; ./pythonqt_generator" >> generate.sh
3546

36-
CMD ["make"]
47+
CMD ["bash", "generate.sh"]

0 commit comments

Comments
 (0)