Skip to content

Fix compilation wrt min/max macros #141

Fix compilation wrt min/max macros

Fix compilation wrt min/max macros #141

Workflow file for this run

# 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
args: []
- name: dev-flutter-asan
isAOT: false
args: ["--asan"]
- name: dev-flutter-aot
isAOT: true
args: ["--aot"]
- name: dev-flutter-aot-asan
isAOT: true
args: ["--aot", "--asan"]
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 xvfb -y
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.24.0'
channel: 'stable'
# Chose engine from https://github.com/ardera/flutter-ci/releases
- name: Download flutter engine
run: |
mkdir flutter_engine
cd flutter_engine
mkdir dbg rel
cd dbg
wget --no-verbose https://github.com/ardera/flutter-ci/releases/download/engine%2Fb8800d88be4866db1b15f8b954ab2573bba9960f/engine-x64-generic-debug.tar.xz
tar xvf engine-x64-generic-debug.tar.xz
cd ../rel
wget --no-verbose https://github.com/ardera/flutter-ci/releases/download/engine%2Fb8800d88be4866db1b15f8b954ab2573bba9960f/engine-x64-generic-release.tar.xz
tar xvf engine-x64-generic-release.tar.xz
cd ..
wget https://raw.githubusercontent.com/flutter/engine/main/shell/platform/embedder/embedder.h -O flutter_embedder.h
- 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
- name: Run tests
run: xvfb-run dart run_flutter_tests.dart ${{ join(matrix.preset.args, ' ') }}