Skip to content

Commit 74078d6

Browse files
committed
ci: enhance Linux build configuration with architecture-specific dependencies
1 parent a5528c4 commit 74078d6

File tree

1 file changed

+60
-63
lines changed

1 file changed

+60
-63
lines changed

.github/workflows/ci.yml

Lines changed: 60 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -143,53 +143,24 @@ jobs:
143143
flutter test integration_test -d windows
144144
145145
linux:
146-
name: Test on Linux
147-
runs-on: ubuntu-24.04
146+
name: Build Flet Client for Linux ${{ matrix.title }}
147+
runs-on: ${{ matrix.runner }}
148+
strategy:
149+
fail-fast: false
150+
matrix:
151+
include:
152+
- arch: arm64
153+
runner: ubuntu-24.04-arm
154+
title: ARM64
155+
- arch: amd64
156+
runner: ubuntu-24.04
157+
title: AMD64
148158
steps:
149159
- name: Checkout repository
150160
uses: actions/checkout@v4
151161

152-
- name: Setup Flutter
153-
uses: kuhnroyal/flutter-fvm-config-action/setup@v3
154-
with:
155-
path: '.fvmrc'
156-
cache: true
157-
158-
- name: Install desktop deps
159-
run: |
160-
sudo apt-get update --allow-releaseinfo-change
161-
sudo apt-get install -y \
162-
xvfb \
163-
libgtk-3-dev \
164-
libgstreamer1.0-dev \
165-
libgstreamer-plugins-base1.0-dev \
166-
libgstreamer-plugins-bad1.0-dev \
167-
gstreamer1.0-plugins-base \
168-
gstreamer1.0-plugins-good \
169-
gstreamer1.0-plugins-bad \
170-
gstreamer1.0-plugins-ugly \
171-
gstreamer1.0-libav \
172-
gstreamer1.0-tools \
173-
gstreamer1.0-x \
174-
gstreamer1.0-alsa \
175-
gstreamer1.0-gl \
176-
gstreamer1.0-gtk3 \
177-
gstreamer1.0-qt5 \
178-
gstreamer1.0-pulseaudio
179-
180-
- name: Run tests
181-
shell: bash
182-
working-directory: "src/serious_python/example/flet_example"
183-
run: |
184-
dart run serious_python:main package app/src --platform Linux --requirements flet
185-
xvfb-run flutter test integration_test -d linux
186-
187-
linux-arm64:
188-
name: Test on Linux ARM64
189-
runs-on: ubuntu-24.04-arm
190-
steps:
191-
- name: Checkout repository
192-
uses: actions/checkout@v4
162+
- name: Setup uv
163+
uses: astral-sh/setup-uv@v6
193164

194165
- name: Get Flutter version from ".fvmrc"
195166
uses: kuhnroyal/flutter-fvm-config-action/config@v3
@@ -201,21 +172,45 @@ jobs:
201172
uses: subosito/flutter-action@v2
202173
with:
203174
flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }}
204-
channel: 'master' # https://github.com/subosito/flutter-action/issues/345#issuecomment-2657332687
175+
channel: ${{ matrix.arch == 'arm64' && 'master' || 'stable' }} # https://github.com/subosito/flutter-action/issues/345#issuecomment-2657332687
205176
cache: true
206177

207-
- name: Install deps
178+
- name: Install dependencies
208179
shell: bash
209180
run: |
210-
# sudo sed -i "/#\$nrconf{restart} = 'i';/s/.*/\$nrconf{restart} = 'a';/" /etc/needrestart/needrestart.conf
211-
sudo apt-get update -y --allow-releaseinfo-change
212-
sudo apt-get install -y clang ninja-build xvfb libgtk-3-dev gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav
181+
sudo apt-get update --allow-releaseinfo-change
182+
sudo apt-get install -y xvfb libgtk-3-dev
183+
184+
if [ "${{ matrix.arch }}" = "amd64" ]; then
185+
sudo apt-get install -y \
186+
libgstreamer1.0-dev \
187+
libgstreamer-plugins-base1.0-dev \
188+
libgstreamer-plugins-bad1.0-dev \
189+
gstreamer1.0-plugins-base \
190+
gstreamer1.0-plugins-good \
191+
gstreamer1.0-plugins-bad \
192+
gstreamer1.0-plugins-ugly \
193+
gstreamer1.0-libav \
194+
gstreamer1.0-tools \
195+
gstreamer1.0-x \
196+
gstreamer1.0-alsa \
197+
gstreamer1.0-gl \
198+
gstreamer1.0-gtk3 \
199+
gstreamer1.0-qt5 \
200+
gstreamer1.0-pulseaudio
201+
else
202+
sudo apt-get install -y \
203+
clang \
204+
ninja-build \
205+
gstreamer1.0-plugins-bad \
206+
gstreamer1.0-plugins-ugly \
207+
gstreamer1.0-libav
208+
fi
213209
214210
- name: Run tests
215211
shell: bash
216-
working-directory: "src/serious_python/example/flet_example"
212+
working-directory: src/serious_python/example/flet_example
217213
run: |
218-
flutter pub get
219214
dart run serious_python:main package app/src --platform Linux --requirements flet
220215
xvfb-run flutter test integration_test -d linux
221216
@@ -227,7 +222,6 @@ jobs:
227222
- android
228223
- windows
229224
- linux
230-
- linux-arm64
231225
runs-on: ubuntu-22.04
232226
# if: startsWith(github.ref, 'refs/tags/v')
233227
steps:
@@ -272,23 +266,26 @@ jobs:
272266
"serious_python_darwin" \
273267
"serious_python_windows" \
274268
"serious_python_linux"; do
269+
275270
uv run "$SCRIPTS/patch_pubspec.py" "$pkg/pubspec.yaml" "$PKG_VER"
271+
pushd "$pkg" >/dev/null
272+
dart pub publish --dry-run
273+
popd >/dev/null
276274
done
277275
278276
- name: Publish packages
279277
shell: bash
278+
working-directory: "src"
280279
run: |
281-
publish_pkg () {
282-
pushd "$1" >/dev/null
280+
for pkg in \
281+
"serious_python_platform_interface" \
282+
"serious_python_android" \
283+
"serious_python_darwin" \
284+
"serious_python_windows" \
285+
"serious_python_linux" \
286+
"serious_python"; do
287+
288+
pushd "$pkg" >/dev/null
283289
dart pub publish --dry-run
284290
popd >/dev/null
285-
}
286-
287-
publish_pkg src/serious_python_platform_interface
288-
sleep 600
289-
publish_pkg src/serious_python_android
290-
publish_pkg src/serious_python_darwin
291-
publish_pkg src/serious_python_windows
292-
publish_pkg src/serious_python_linux
293-
sleep 600
294-
publish_pkg src/serious_python
291+
done

0 commit comments

Comments
 (0)