-
Notifications
You must be signed in to change notification settings - Fork 170
84 lines (71 loc) · 2.43 KB
/
flutter-dev.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# SPDX-FileCopyrightText: 2023 Klarälvdalens Datakonsult AB, a KDAB Group company <[email protected]>
#
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
# Builds the flutter frontend
# Doesn't run tests yet though
name: Flutter-dev
on:
push:
branches:
- 2.1
- main
pull_request:
branches:
- 2.1
- main
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
preset:
- name: dev-flutter
isAOT: false
- name: dev-flutter-asan
isAOT: false
- name: dev-flutter-aot
isAOT: true
- name: dev-flutter-aot-asan
isAOT: true
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install dependencies on Ubuntu
run: |
sudo apt update -qq
sudo apt install libgtk-3-dev libglib2.0-dev ninja-build libspdlog-dev lld -y
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.13.6'
channel: 'stable'
# Chose engine from https://github.com/ardera/flutter-ci/releases
- name: Download flutter engine
run: |
wget --no-verbose https://github.com/ardera/flutter-ci/releases/download/engine%2Fa794cf2681c6c9fe7b260e0e84de96298dc9c18b/x64-generic.tar.xz
mkdir flutter_engine
tar xvf x64-generic.tar.xz -C flutter_engine
cd flutter_engine
mkdir dbg rel
cp libflutter_engine.so.debug dbg/libflutter_engine.so
cp libflutter_engine.so.release rel/libflutter_engine.so
- name: Configure project ${{ matrix.preset.name }}
run: cmake -S . -B ./build-${{ matrix.preset.name }} --preset ${{ matrix.preset.name }}
env:
FLUTTER_ENGINE_FOLDER: "${{ github.workspace }}/flutter_engine/"
- name: Build Project ${{ matrix.preset.name }}
run: cmake --build ./build-${{ matrix.preset.name }}
- name: Build test embedder .dart
if: ${{ matrix.preset.isAOT == false }}
run: |
cd tests/flutter_tests_embedder/
flutter build bundle --suppress-analytics
- name: Build test embedder .dart (AOT)
if: ${{ matrix.preset.isAOT }}
run: |
cd tests/flutter_tests_embedder/
flutter build linux --release --suppress-analytics
- name: Build the example
run: |
cd examples/flutter
flutter build linux