Skip to content

Commit 11bcff6

Browse files
committed
Set up CI builds for different gcc versions
1 parent fb16d6e commit 11bcff6

File tree

2 files changed

+69
-0
lines changed

2 files changed

+69
-0
lines changed

.github/workflows/Dockerfile_gcc

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
FROM gcc:#GCC#
2+
3+
ARG github_repo=MeVisLab/pythonqt
4+
ARG github_branch=main
5+
6+
RUN apt-get update && apt-get install -y --force-yes \
7+
unzip \
8+
wget \
9+
python3 \
10+
python3-dev \
11+
libpython3-dev \
12+
qtbase5-dev \
13+
qtbase5-private-dev \
14+
qtchooser \
15+
qt5-qmake \
16+
qtbase5-dev-tools \
17+
qttools5-dev \
18+
qtdeclarative5-dev \
19+
libqt5svg5* \
20+
libqt5xmlpatterns5* \
21+
libqt5multimedia5* \
22+
libqt5multimediawidgets5* \
23+
libqt5qml5* \
24+
libqt5quickwidgets5* \
25+
qtmultimedia5-dev
26+
RUN apt-get clean
27+
28+
RUN useradd -u 1000 pythonqt
29+
30+
RUN mkdir -p work \
31+
&& wget https://github.com/$github_repo/archive/$github_branch.zip -O archive.zip \
32+
&& unzip archive.zip -d work
33+
RUN WORK_DIR=`ls -d work/*`; mv $WORK_DIR work/pythonqt
34+
RUN chown -R pythonqt:pythonqt work/pythonqt
35+
WORKDIR work/pythonqt
36+
37+
USER pythonqt
38+
39+
ARG QT_SELECT=qt5
40+
RUN uname -a; gcc --version | grep "gcc"; python3 --version; qmake --version
41+
42+
RUN qmake -r PythonQt.pro \
43+
PYTHON_VERSION=$(python3 --version | cut -d " " -f 2 | cut -d "." -f1,2) \
44+
PYTHON_DIR=$(which python3 | xargs dirname | xargs dirname)
45+
46+
CMD ["make"]

.github/workflows/build.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Build
2+
3+
on:
4+
[push, pull_request]
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
runs-on: [ubuntu-latest]
13+
gcc: [7, 9, 11]
14+
15+
steps:
16+
- uses: actions/checkout@v3
17+
- name: Setup docker container
18+
shell: bash
19+
run: |
20+
cat $GITHUB_WORKSPACE/.github/workflows/Dockerfile_gcc | sed 's/#GCC#/${{ matrix.gcc }}/' > ./Dockerfile
21+
docker build -t pythonqt -f ./Dockerfile . --build-arg github_repo=$GITHUB_REPOSITORY --build-arg github_branch=$GITHUB_REF_NAME
22+
- name: Run docker
23+
run: docker run -t pythonqt

0 commit comments

Comments
 (0)