Skip to content

Commit f8eb068

Browse files
Add CentOS7 docker image to CI (commontk#84)
- uses gcc 4.8.5, Python 3.6.8 and Qt 5.9.7 - also remove gcc 9 build (keep gcc 7 and 11)
1 parent d13f424 commit f8eb068

File tree

4 files changed

+77
-8
lines changed

4 files changed

+77
-8
lines changed

.github/workflows/build.yml

+7-5
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,24 @@ on:
66
- master
77
pull_request:
88

9-
9+
defaults:
10+
run:
11+
shell: bash
12+
1013
jobs:
1114
build:
1215
runs-on: ubuntu-latest
1316
strategy:
1417
fail-fast: false
1518
matrix:
1619
runs-on: [ubuntu-latest]
17-
gcc: [7, 9, 11]
20+
docker-image: [gcc7, gcc11, centos7]
1821

1922
steps:
2023
- uses: actions/checkout@v3
2124
- name: Setup docker container
22-
shell: bash
2325
run: |
24-
cat $GITHUB_WORKSPACE/.github/workflows/Dockerfile_gcc | sed 's/#GCC#/${{ matrix.gcc }}/' > ./Dockerfile
25-
docker build -t pythonqt -f ./Dockerfile .
26+
docker build -t pythonqt -f $GITHUB_WORKSPACE/.github/workflows/dockerfiles/Dockerfile_${{ matrix.docker-image }} .
27+
2628
- name: Run docker
2729
run: docker run -t pythonqt
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
FROM centos:7
2+
3+
RUN yum update -y
4+
RUN yum groupinstall "Development Tools" -y
5+
RUN yum install -y \
6+
which \
7+
python3 \
8+
python3-debug \
9+
qt5-qtbase-* \
10+
qt5-qttools* \
11+
qt5-qtsvg \
12+
qt5-qtsvg-devel \
13+
qt5-qtxmlpatterns \
14+
qt5-qtxmlpatterns-devel \
15+
qt5-qtmultimedia \
16+
qt5-qtmultimedia-devel \
17+
qt5-qt3d \
18+
qt5-qt3d-devel
19+
20+
RUN mkdir -p work
21+
22+
COPY . work/
23+
24+
WORKDIR work
25+
26+
ARG QT_SELECT=qt5
27+
RUN uname -a; gcc --version | grep "gcc"; python3 --version; qmake-qt5 --version
28+
29+
RUN qmake-qt5 -r PythonQt.pro \
30+
PYTHON_VERSION=$(python3 --version | cut -d " " -f 2 | cut -d "." -f1,2) \
31+
PYTHON_DIR=$(which python3 | xargs dirname | xargs dirname)
32+
33+
CMD ["make"]

.github/workflows/Dockerfile_gcc .github/workflows/dockerfiles/Dockerfile_gcc11

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
FROM gcc:#GCC#
1+
FROM gcc:11
22

33
RUN apt-get update && apt-get install -y --force-yes \
4-
unzip \
5-
wget \
64
python3 \
75
python3-dev \
86
libpython3-dev \
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
FROM gcc:7
2+
3+
RUN apt-get update && apt-get install -y --force-yes \
4+
python3 \
5+
python3-dev \
6+
libpython3-dev \
7+
qtbase5-dev \
8+
qtbase5-private-dev \
9+
qtchooser \
10+
qt5-qmake \
11+
qtbase5-dev-tools \
12+
qttools5-dev \
13+
qtdeclarative5-dev \
14+
libqt5svg5* \
15+
libqt5xmlpatterns5* \
16+
libqt5multimedia5* \
17+
libqt5multimediawidgets5* \
18+
libqt5qml5* \
19+
libqt5quickwidgets5* \
20+
qtmultimedia5-dev
21+
RUN apt-get clean
22+
23+
RUN mkdir -p work
24+
25+
COPY . work/
26+
27+
WORKDIR work
28+
29+
ARG QT_SELECT=qt5
30+
RUN uname -a; gcc --version | grep "gcc"; python3 --version; qmake --version
31+
32+
RUN qmake -r PythonQt.pro \
33+
PYTHON_VERSION=$(python3 --version | cut -d " " -f 2 | cut -d "." -f1,2) \
34+
PYTHON_DIR=$(which python3 | xargs dirname | xargs dirname)
35+
36+
CMD ["make"]

0 commit comments

Comments
 (0)