-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (47 loc) · 1.48 KB
/
linux.yml
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
name: linux
on:
push:
pull_request:
workflow_dispatch:
env:
flutter_version: '3.16.0'
jobs:
test-build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Flutter environment
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.flutter_version }}
- name: Install dependencies
run: flutter pub get
- name: Building generated source code
run: dart run build_runner build
- name: Analyze code
run: flutter analyze .
- name: Run tests
run: flutter test --no-pub -r expanded
- name: Install system libraries
run: |
sudo apt-get update
sudo apt-get install clang cmake ninja-build pkg-config libgtk-3-dev
- name: Configure Flutter for Linux
run: flutter config --enable-linux-desktop
- name: Build Linux application (debug)
run: flutter build linux --debug
- name: Archive debug build
if: github.ref_type == 'tag'
uses: actions/upload-artifact@v2
with:
name: linux-bundle-debug
path: build/linux/x64/debug/bundle/
- name: Build Linux application (release)
run: flutter build linux --release
- name: Archive release build
if: github.ref_type == 'tag'
uses: actions/upload-artifact@v2
with:
name: linux-bundle-release
path: build/linux/x64/release/bundle/