-
Notifications
You must be signed in to change notification settings - Fork 70
78 lines (61 loc) · 2.09 KB
/
dart.yml
File metadata and controls
78 lines (61 loc) · 2.09 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
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Dart CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
channel: 'stable' # 'master', 'beta', 'dev' or 'stable'
# flutter-version: '3.29.3'
- uses: actions-rs/toolchain@v1
with:
toolchain: 'stable' # 'stable' or 'nightly'
override: true
components: rustfmt, clippy
# flutter build need ninja.
# https://github.com/subosito/flutter-action/issues/49
- name: Patch for linux build
run: |
flutter doctor
sudo apt-get update -y
sudo apt-get install -y ninja-build libgtk-3-dev
sudo apt-get install -y libsdl2-dev
sudo apt-get install -y libwebkit2gtk-4.1-dev
sudo apt-get install -y libopus-dev libogg-dev
sudo apt-get install -y libcurl4-openssl-dev
flutter doctor
- name: Install dependencies
run: flutter pub get
- name: Generator ENV
run: |
tee .env &>/dev/null << EOF
SENTRY_DSN=${{ secrets.SENTRY_DSN }}
EOF
- name: Verify formatting
run: dart format --set-exit-if-changed .
- name: Run Build Runner
run: dart run build_runner build --delete-conflicting-outputs
- name: Analyze project source
run: dart analyze --fatal-infos
- run: flutter config --enable-linux-desktop
# setup webcrypto for unit test
- run: dart run webcrypto:setup
# Your project will need to have tests in test/ and a dependency on
# package:test for this step to succeed. Note that Flutter projects will
# want to change this to 'flutter test'.
- name: Run tests
run: flutter test
- name: Build APP
run: flutter build linux