-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Add Dockerfile for self-hosted GitHub runner
Building the flutter image is too much for GH CI.
- Loading branch information
Showing
2 changed files
with
34 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,9 +8,14 @@ | |
# Docker container for building the engine and testing qt-flutter-embedder | ||
# in CI | ||
|
||
# docker build --build-arg GITHUB_RUNNER_TOKEN=$GITHUB_RUNNER_TOKEN -t qt-flutter-embedder . | ||
# docker run -it qt-flutter-embedder /home/ubuntu/actions-runner/run.sh | ||
|
||
FROM ubuntu:24.10 | ||
MAINTAINER Sergio Martins ([email protected]) | ||
|
||
ARG GITHUB_RUNNER_TOKEN | ||
|
||
ENV TZ=Europe/Berlin | ||
ENV LC_CTYPE=C.UTF-8 | ||
# ENV LD_LIBRARY_PATH=/Qt5/lib/:/Qt6/lib/ | ||
|
@@ -45,3 +50,28 @@ git fetch sergio && \ | |
git checkout sergio/main && gclient sync -D | ||
|
||
RUN cd $FLUTTER_ENGINE_FOLDER && ./build.sh && cp ./shell/platform/embedder/embedder.h ./shell/platform/embedder/flutter_embedder.h | ||
|
||
# Install GitHub Actions runner | ||
|
||
RUN mkdir actions-runner && cd actions-runner && \ | ||
curl -o actions-runner-linux-x64-2.320.0.tar.gz -L https://github.com/actions/runner/releases/download/v2.320.0/actions-runner-linux-x64-2.320.0.tar.gz && \ | ||
echo "93ac1b7ce743ee85b5d386f5c1787385ef07b3d7c728ff66ce0d3813d5f46900 actions-runner-linux-x64-2.320.0.tar.gz" | shasum -a 256 -c && \ | ||
tar xzf ./actions-runner-linux-x64-2.320.0.tar.gz && \ | ||
./config.sh --url https://github.com/KDABLabs/qt-flutter-embedder --token $GITHUB_RUNNER_TOKEN | ||
|
||
# More dependencies, TODO: move up! | ||
USER root | ||
RUN apt install xvfb -y | ||
|
||
# Install GitHub command-line interface (gh) | ||
# Instructions copied from https://github.com/cli/cli/blob/trunk/docs/install_linux.md | ||
RUN mkdir -p -m 755 /etc/apt/keyrings \ | ||
&& curl -s https://cli.github.com/packages/githubcli-archive-keyring.gpg | tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null \ | ||
&& chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg \ | ||
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null \ | ||
&& apt-get update \ | ||
&& apt-get install gh -y \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
USER ubuntu |