-
Notifications
You must be signed in to change notification settings - Fork 3
77 lines (68 loc) · 1.93 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: build-test
on:
push:
paths-ignore:
- ".vscode/**"
- "**.md"
- "doc/**"
- "LICENSE"
pull_request:
paths-ignore:
- ".vscode/**"
- "**.md"
- "doc/**"
- "LICENSE"
workflow_dispatch:
concurrency:
# Cancels the workflow
# when another event in the same context happens.
# If it's a PR, context is the pull request number.
# Otherwise, it uses the Git reference(branch or tag name).
group: >
${{ github.workflow }}
${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build:
name: ${{ matrix.runner }} / ${{ matrix.target }}
runs-on: ${{ matrix.runner }}-latest
timeout-minutes: 30
strategy:
fail-fast: false # Important
matrix:
runner: [ubuntu, windows, macos]
target: [android] #For all platforms
include:
# Only for ios on macos
- runner: macos
target: ios
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Checkout submodules
run: git submodule update --init --recursive
- name: Setup Flutter toolchain
uses: subosito/flutter-action@v2
with:
channel: "stable"
cache: true
- name: Setup Java toolchain (Only Android target)
if: matrix.target == 'android'
uses: actions/setup-java@v4
with:
distribution: "zulu"
java-version: "11"
cache: "gradle"
- name: Fetch dependencies
working-directory: example/
run: flutter pub get
- name: Build Android example
if: matrix.target == 'android'
working-directory: example/
run: |
flutter build apk --verbose
flutter build appbundle --verbose
- name: Build iOS example
if: matrix.target == 'ios'
working-directory: example/
run: flutter build ios --no-codesign --verbose