forked from krille-chan/fluffychat
-
Notifications
You must be signed in to change notification settings - Fork 1
122 lines (111 loc) · 4.02 KB
/
integrate.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
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
113
114
115
116
117
118
119
120
121
122
name: Pull Request Workflow
on:
pull_request:
merge_group:
jobs:
code_tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: cat .github/workflows/versions.env >> $GITHUB_ENV
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
cache: true
- run: flutter pub get
- run: flutter gen-l10n
- name: Check formatting
run: dart format lib/ test/ --set-exit-if-changed
- name: Check import formatting
run: dart run import_sorter:main --no-comments --exit-if-changed
- name: Check license compliance
run: dart run license_checker check-licenses -c licenses.yaml --problematic
- run: flutter analyze
- name: Apply google services patch
run: git apply ./scripts/enable-android-google-services.patch
- run: flutter analyze
- run: flutter test
build_debug_apk:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: cat .github/workflows/versions.env >> $GITHUB_ENV
- uses: actions/setup-java@v4
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: "zulu"
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
cache: true
- run: flutter pub get
- run: flutter build apk --debug
build_debug_web:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: cat .github/workflows/versions.env >> $GITHUB_ENV
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
cache: true
- run: flutter pub get
- name: Prepare web
run: ./scripts/prepare-web.sh
- run: flutter build web
build_debug_linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: cat .github/workflows/versions.env >> $GITHUB_ENV
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
cache: true
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install curl clang cmake ninja-build pkg-config libgtk-3-dev libblkid-dev liblzma-dev libjsoncpp-dev cmake-data libsecret-1-dev libsecret-1-0 librhash0 libssl-dev -y
- run: flutter pub get
- run: flutter build linux --target-platform linux-x64
build_debug_ios:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- run: cat .github/workflows/versions.env >> $GITHUB_ENV
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
cache: true
- name: Setup Xcode version
uses: maxim-lobanov/[email protected]
with:
xcode-version: latest
- run: brew install sqlcipher
- run: flutter pub get
- run: flutter build ios --no-codesign
build_debug_windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
# Check source code from GitHub repository
- run: cat .github/workflows/versions.env >> $GITHUB_ENV
# Load Flutter version-specific environment variables from versions.env
- name: Prepare Windows environment
run: ./scripts/prepare-windows.ps1
shell: pwsh
# Run PowerShell script to prepare Windows environment if necessary
- name: Build OLM library for Windows
run: ./scripts/build-olm-windows.sh
shell: bash
# Run the Olm compiler script for cryptography if the application uses Matrix
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
cache: true
# Installing Flutter in the construction environment
- run: flutter pub get
- name: Build Windows Debug Version
run: flutter build windows --debug
- name: Post-build Windows operations
run: ./scripts/build-windows.ps1
shell: pwsh
# Run the post-compilation script to finalize the build