Skip to content

Commit

Permalink
ci: make the self-hosted runner bundle Qt to save time
Browse files Browse the repository at this point in the history
  • Loading branch information
iamsergio committed Jan 8, 2025
1 parent f284da7 commit 4956525
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 6 deletions.
25 changes: 24 additions & 1 deletion .github/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,27 @@ ENV TZ=Europe/Berlin
ENV LC_CTYPE=C.UTF-8
ENV PATH=/home/ubuntu/.local/bin:$PATH

ENV IS_SELFHOSTED=1
ENV CTEST_PARALLEL_LEVEL=12

RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

RUN apt update -qq && apt install build-essential software-properties-common lld git cmake ninja-build vim curl wget gdebi-core libdbus-glib-1-2 \
mesa-common-dev libglu1-mesa-dev libglib2.0-dev libfontconfig \
libxkbcommon-dev mesa-utils libgl1-mesa-dev libglu1-mesa-dev \
libxkbcommon-x11-0 libssl-dev openssl unzip clang libgtk-3-dev \
time xvfb python3-pip jq sudo -y
time xvfb python3-pip jq sudo libxml2-dev libxslt-dev \
libx11-xcb1 \
libxcb-glx0 \
libxcb-keysyms1 \
libxcb-image0 \
libxcb-shm0 \
libxcb-icccm4 \
libxcb-sync1 \
libxcb-xfixes0 \
libxcb-shape0 \
libxcb-render-util0 \
-y

RUN ln -s /usr/bin/python3 /usr/bin/python
RUN rm /usr/lib/python3.12/EXTERNALLY-MANAGED
Expand All @@ -48,6 +62,15 @@ RUN usermod -aG sudo ubuntu
RUN echo 'ubuntu ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/ubuntu
RUN chmod 0440 /etc/sudoers.d/ubuntu


# Install Qt

RUN pip install --no-cache-dir aqtinstall
RUN aqt install-qt linux desktop 6.6.0 gcc_64 --outputdir /opt/qt
RUN aqt install-qt linux desktop 5.15.2 gcc_64 --outputdir /opt/qt
ENV PATH=/opt/qt/5.15.2/gcc_64/bin/:/opt/qt/6.6.0/gcc_64/bin/:$PATH


USER ubuntu
WORKDIR /home/ubuntu

Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,13 @@ jobs:

steps:
- name: Install Qt ${{ matrix.preset.qt_version }} with options and default aqtversion
if: env.IS_SELFHOSTED == null || env.IS_SELFHOSTED == ''
uses: jurplel/install-qt-action@v4
with:
version: ${{ matrix.preset.qt_version }}
cache: true


- name: Set Qt env (workaround for self-hosted runners)
run: |
echo "${RUNNER_WORKSPACE}/Qt/${{ matrix.preset.qt_version }}/gcc_64/bin/" >> $GITHUB_PATH
echo $PATH
- name: Install dependencies on Ubuntu (${{ join(matrix.preset.apt_pgks, ' ') }})
if: ${{ runner.os == 'Linux' && matrix.preset.apt_pgks }}
run: |
Expand Down

0 comments on commit 4956525

Please sign in to comment.