-
Notifications
You must be signed in to change notification settings - Fork 18
57 lines (54 loc) · 1.8 KB
/
ci.yaml
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
name: CI
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macOS-latest, windows-2019, ubuntu-latest]
version: ["3.10.x", "3.19.x", "3.22.x", "3.24.x"]
include:
- os: macOS-latest
TARGET: macos
- os: ubuntu-latest
TARGET: linux
- os: windows-2019
TARGET: windows
# Disable fail-fast; we want results from all OSes even if one fails.
fail-fast: false
steps:
- uses: actions/checkout@v4
with:
path: flutter_platform_alert
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ matrix.version }}
channel: "stable" # optional, default to: 'stable'
- name: Install Linux dependencies
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libx11-dev pkg-config cmake ninja-build libblkid-dev liblzma-dev
- name: Enable desktop support
run: |
flutter config --enable-linux-desktop
flutter config --enable-macos-desktop
flutter config --enable-windows-desktop
- name: Doctor
# Run doctor, for ease of debugging any issues.
run: flutter doctor -v
- name: Install dependencies
run: flutter packages get
working-directory: example
- name: Build macOS
if: startsWith(matrix.os, 'macOS')
run: flutter build macos
working-directory: example
- name: Build Linux
if: startsWith(matrix.os, 'ubuntu')
run: flutter build linux
working-directory: example
- name: Build Windows
if: startsWith(matrix.os, 'windows')
run: flutter build windows
working-directory: example