-
Notifications
You must be signed in to change notification settings - Fork 15
112 lines (106 loc) 路 3.02 KB
/
Copy pathexample_runnable.yml
File metadata and controls
112 lines (106 loc) 路 3.02 KB
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
name: 'Example Runnable'
# Disable permissions for all of the available permissions
permissions: {}
on:
workflow_dispatch:
push:
branches:
- main
- dev
paths-ignore:
- '**.md'
pull_request:
branches:
- main
- dev
paths-ignore:
- '**.md'
defaults:
run:
working-directory: ./example
env:
FLUTTER_VERSION: '3.47.0'
jobs:
code-analysis:
name: 'Code Analysis'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 #v7.0.1
with:
persist-credentials: false
- uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2 #v2.23.0
with:
channel: stable
flutter-version: ${{ env.FLUTTER_VERSION }}
cache: true
pub-cache: false
- name: Prepare dependencies (example)
run: |
flutter --version
flutter pub get
- name: Check Dart code formatting
run: |
dart format . -o none --set-exit-if-changed
- name: Analyze Dart code
run: |
flutter analyze . --no-fatal-infos
test-build:
needs: [code-analysis]
strategy:
matrix:
include:
- os: macos-latest
build: iOS
- os: macos-latest
build: macOS
- os: windows-latest
build: Android
- os: windows-latest
build: Windows
- os: ubuntu-latest
build: Linux
- os: windows-latest
build: Web
name: 'Test Build :: ${{ matrix.os }} :: ${{ matrix.build }}'
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 #v7.0.1
with:
persist-credentials: false
- uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 #v5.7.0
if: matrix.build == 'Android'
with:
distribution: 'zulu'
java-version: '17'
- uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2 #v2.23.0
with:
channel: stable
flutter-version: ${{ env.FLUTTER_VERSION }}
cache: true
pub-cache: false
- name: Prepare dependencies
run: |
dart --version
flutter --version
flutter pub get
- name: Build iOS
if: matrix.build == 'iOS'
run: flutter build ios --no-codesign
- name: Build macOS
if: matrix.build == 'macOS'
run: flutter build macos --debug
- name: Build Android
if: matrix.build == 'Android'
run: flutter build apk --debug
- name: Build Windows
if: matrix.build == 'Windows'
run: flutter build windows --debug
- name: Build Linux
if: matrix.build == 'Linux'
run: |
sudo apt-get update -y
sudo apt-get install -y ninja-build libgtk-3-dev
flutter build linux --debug
- name: Build Web
if: matrix.build == 'Web'
run: flutter build web --wasm --release