Skip to content

Commit c9d9333

Browse files
committed
wip
1 parent f848f3f commit c9d9333

File tree

2 files changed

+40
-39
lines changed

2 files changed

+40
-39
lines changed

.github/workflows/build.yml

Lines changed: 10 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
fail-fast: true
1515
matrix:
1616
os:
17-
- ubuntu-latest
17+
- self-hosted
1818
# - windows-latest
1919
# - macos-latest
2020

@@ -23,12 +23,6 @@ jobs:
2323
with:
2424
fetch-depth: 0
2525

26-
- name: Install Qt
27-
uses: jurplel/install-qt-action@v3
28-
with:
29-
version: 6.7.3
30-
cache: true
31-
3226
- name: Install ninja-build tool (must be after Qt due PATH changes)
3327
if: ${{ runner.os == 'Windows' }}
3428
uses: turtlesec-no/get-ninja@main
@@ -37,46 +31,23 @@ jobs:
3731
if: ${{ runner.os == 'Windows' }}
3832
uses: ilammy/msvc-dev-cmd@v1
3933

40-
- name: Install dependencies on Ubuntu
41-
if: ${{ runner.os == 'Linux' }}
42-
run: |
43-
sudo apt update -qq
44-
sudo apt install libgtk-3-dev libglib2.0-dev ninja-build lld xvfb -y
45-
46-
- uses: subosito/flutter-action@v2
47-
with:
48-
flutter-version: '3.24.0'
49-
channel: 'stable'
50-
5134
- name: Checkout qt-embedder
5235
uses: actions/checkout@v4
5336

5437
- name: Create folder structure
5538
run: |
5639
mkdir -p 3rdparty/out/host_debug_unopt/
5740
58-
- name: Checkout flutter engine
59-
uses: actions/checkout@v4
60-
with:
61-
repository: iamsergio/engine.git
62-
ref: wip/multiwindow
63-
path: 3rdparty/flutter/
64-
6541
- name: debug
6642
run: |
6743
flutter --version
44+
dart --version
6845
which flutter
6946
which dart
70-
71-
- name: Fix embedder header
72-
run: cp 3rdparty/flutter/shell/platform/embedder/embedder.h 3rdparty/flutter/shell/platform/embedder/flutter_embedder.h
73-
74-
- name: Download engine binary
75-
run: |
76-
./download_engine.sh
77-
cp libflutter_engine.so 3rdparty/out/host_debug_unopt/
47+
ls $FLUTTER_ENGINE_FOLDER
48+
echo "WORKSPACE: ${{ github.workspace }}"
7849
env:
79-
GH_TOKEN: ${{ github.token }}
50+
FLUTTER_ENGINE_FOLDER: ${{ github.workspace }}/3rdparty/flutter/
8051

8152
- name: Configure project
8253
run: cmake -S . -B ./build-dev --preset dev
@@ -88,8 +59,8 @@ jobs:
8859
env:
8960
FLUTTER_ENGINE_FOLDER: ${{ github.workspace }}/3rdparty/flutter/
9061

91-
# - name: Build example
92-
# run: |
93-
# ./build_example.sh
94-
# env:
95-
# FLUTTER_ENGINE_FOLDER: ${{ github.workspace }}/3rdparty/flutter/
62+
- name: Build example
63+
run: |
64+
./build_example.sh
65+
env:
66+
FLUTTER_ENGINE_FOLDER: ${{ github.workspace }}/3rdparty/flutter/

docker/Dockerfile

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,14 @@
88
# Docker container for building the engine and testing qt-flutter-embedder
99
# in CI
1010

11+
# docker build --build-arg GITHUB_RUNNER_TOKEN=$GITHUB_RUNNER_TOKEN -t qt-flutter-embedder .
12+
# docker run -it qt-flutter-embedder /home/ubuntu/actions-runner/run.sh
13+
1114
FROM ubuntu:24.10
1215
MAINTAINER Sergio Martins (sergio.martins@kdab.com)
1316

17+
ARG GITHUB_RUNNER_TOKEN
18+
1419
ENV TZ=Europe/Berlin
1520
ENV LC_CTYPE=C.UTF-8
1621
# ENV LD_LIBRARY_PATH=/Qt5/lib/:/Qt6/lib/
@@ -45,3 +50,28 @@ git fetch sergio && \
4550
git checkout sergio/main && gclient sync -D
4651

4752
RUN cd $FLUTTER_ENGINE_FOLDER && ./build.sh && cp ./shell/platform/embedder/embedder.h ./shell/platform/embedder/flutter_embedder.h
53+
54+
# Install GitHub Actions runner
55+
56+
RUN mkdir actions-runner && cd actions-runner && \
57+
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 && \
58+
echo "93ac1b7ce743ee85b5d386f5c1787385ef07b3d7c728ff66ce0d3813d5f46900 actions-runner-linux-x64-2.320.0.tar.gz" | shasum -a 256 -c && \
59+
tar xzf ./actions-runner-linux-x64-2.320.0.tar.gz && \
60+
./config.sh --url https://github.com/KDABLabs/qt-flutter-embedder --token $GITHUB_RUNNER_TOKEN
61+
62+
# More dependencies, TODO: move up!
63+
USER root
64+
RUN apt install xvfb -y
65+
66+
# Install GitHub command-line interface (gh)
67+
# Instructions copied from https://github.com/cli/cli/blob/trunk/docs/install_linux.md
68+
RUN mkdir -p -m 755 /etc/apt/keyrings \
69+
&& curl -s https://cli.github.com/packages/githubcli-archive-keyring.gpg | tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null \
70+
&& chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg \
71+
&& 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 \
72+
&& apt-get update \
73+
&& apt-get install gh -y \
74+
&& apt-get clean \
75+
&& rm -rf /var/lib/apt/lists/*
76+
77+
USER ubuntu

0 commit comments

Comments
 (0)