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
|
# SPDX-FileCopyrightText: 2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
#
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
# Builds the flutter frontend
name: Flutter-rel
on:
push:
branches:
- main
- 2.4
pull_request:
branches:
- main
- 2.4
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os:
- ubuntu-latest
- windows-latest
- macos-15
preset:
- name: release-flutter
include:
- os: ubuntu-latest
flutter_os: "linux"
- os: windows-latest
flutter_os: "windows"
- os: macos-15
flutter_os: "macos"
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install dependencies on Ubuntu
if: ${{ runner.os == 'Linux' }}
run: |
sudo apt update -qq
sudo apt install libgtk-3-dev libglib2.0-dev -y
- name: Install ninja (Windows / Linux)
if: ${{ runner.os != 'macOS' }}
uses: turtlesec-no/get-ninja@main
- name: Install ninja (macOS)
if: ${{ runner.os == 'macOS' }}
run: brew install ninja
- uses: subosito/flutter-action@v2
with:
flutter-version: "3.x"
channel: "stable"
- name: MSVC into PATH
if: ${{ runner.os == 'Windows' }}
uses: ilammy/msvc-dev-cmd@v1
- name: Configure project
run: cmake -S . -B ./build-${{ matrix.preset.name }} --preset ${{ matrix.preset.name }}
- name: Build Project ${{ matrix.preset.build_preset_arg }}
run: cmake --build ./build-${{ matrix.preset.name }}
- name: Build the example
run: |
cd examples/flutter
flutter build ${{ matrix.os.flutter_os }}
|