-
-
Notifications
You must be signed in to change notification settings - Fork 22
171 lines (171 loc) · 6.09 KB
/
build-all-ci.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
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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
name: Build Passy for all platforms
on:
workflow_dispatch:
pull_request:
types: [ opened, synchronize, reopened, review_requested ]
branches:
- main
- dev
jobs:
build_android:
name: Build Passy for Android
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install dependencies
shell: bash
run: |
sudo apt-get update
sudo apt-get -y install clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev binutils coreutils desktop-file-utils fakeroot fuse libgdk-pixbuf2.0-dev patchelf python3-pip python3-setuptools squashfs-tools strace util-linux zsync
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'adopt'
- name: Install flutter
shell: bash
run: |
git submodule init
git submodule update
echo "$PWD/submodules/flutter/bin" >> $GITHUB_PATH
- name: Configure flutter
shell: bash
run: flutter config --no-analytics
- name: Build Android
shell: bash
run: bash build_android.sh
- name: Prepare releases
shell: bash
run: |
cd ..
mkdir build
cp Passy/build/app/outputs/flutter-apk/app-release.apk build/Passy-Android.apk
- name: Upload Android build
uses: actions/upload-artifact@v4
with:
name: android
path: /home/runner/work/Passy/build/Passy-Android.apk
build_linux:
name: Build Passy for Linux
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install dependencies
shell: bash
run: |
sudo apt-get update
sudo apt-get -y install clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev binutils coreutils desktop-file-utils fakeroot fuse libgdk-pixbuf2.0-dev patchelf python3-pip python3-setuptools squashfs-tools strace util-linux zsync
- name: Install flutter
shell: bash
run: |
git submodule init
git submodule update
echo "$PWD/submodules/flutter/bin" >> $GITHUB_PATH
- name: Configure flutter
shell: bash
run: flutter config --no-analytics
- name: Build with updates popup
shell: bash
run: echo "echo 3;echo y;echo;" | bash | bash build_all.sh
- name: Prepare releases
shell: bash
run: |
cd ..
mkdir -p build/linux-bundle/Passy
cp -r Passy/build/linux/x64/release/bundle/. build/linux-bundle/Passy
cp Passy/build/appimage/Passy-Latest-x86_64.AppImage build
chmod +x build/linux-bundle/Passy/passy
chmod +x build/Passy-Latest-x86_64.AppImage
- name: Archive Linux bundle build
uses: thedoctor0/zip-release@0.7.1
with:
type: zip
directory: ../build/linux-bundle
filename: Passy-Linux-Bundle.zip
path: Passy
- name: Archive Linux AppImage build
uses: thedoctor0/zip-release@0.7.1
with:
type: zip
directory: ../build
filename: Passy-Linux-AppImage.zip
path: Passy-Latest-x86_64.AppImage
- name: Upload Linux bundle build
uses: actions/upload-artifact@v4
with:
name: linux-bundle
path: /home/runner/work/Passy/build/linux-bundle/Passy-Linux-Bundle.zip
- name: Upload Linux AppImage build
uses: actions/upload-artifact@v4
with:
name: linux-appimage
path: /home/runner/work/Passy/build/Passy-Linux-AppImage.zip
- name: Build without updates popup
shell: bash
run: echo "echo 3;echo n;echo;" | bash | bash build_all.sh
- name: Prepare releases
shell: bash
run: |
cd ..
rm -rf build/*
mkdir -p build/linux-bundle/Passy
cp -r Passy/build/linux/x64/release/bundle/. build/linux-bundle/Passy
cp Passy/build/appimage/Passy-Latest-x86_64.AppImage build
chmod +x build/linux-bundle/Passy/passy
chmod +x build/Passy-Latest-x86_64.AppImage
- name: Archive Linux bundle build
uses: thedoctor0/zip-release@0.7.1
with:
type: zip
directory: ../build/linux-bundle
filename: Passy-Linux-Bundle.zip
path: Passy
- name: Archive Linux AppImage build
uses: thedoctor0/zip-release@0.7.1
with:
type: zip
directory: ../build
filename: Passy-Linux-AppImage.zip
path: Passy-Latest-x86_64.AppImage
- name: Upload Linux bundle no updates popup build
uses: actions/upload-artifact@v4
with:
name: linux-bundle-no-updates-popup
path: /home/runner/work/Passy/build/linux-bundle/Passy-Linux-Bundle.zip
- name: Upload Linux AppImage no updates popup build
uses: actions/upload-artifact@v4
with:
name: linux-appimage-no-updates-popup
path: /home/runner/work/Passy/build/Passy-Linux-AppImage.zip
build_windows:
name: Build Passy for Windows
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install flutter
shell: bash
run: |
git submodule init
git submodule update
echo "$PWD/submodules/flutter/bin" >> $GITHUB_PATH
echo "$PWD/submodules/flutter/bin/cache/dart-sdk/bin" >> $GITHUB_PATH
- name: Configure flutter
shell: bash
run: flutter config --no-analytics
- name: Build Passy for Windows
shell: bash
run: flutter --no-version-check --suppress-analytics build windows
- name: Prepare releases
shell: bash
run: |
cd ..
mkdir -p build/windows-portable/Passy
cp -r Passy/build/windows/x64/runner/Release/. build/windows-portable/Passy
- name: Upload Windows portable build
uses: actions/upload-artifact@v4
with:
name: windows-portable
path: D:\a\Passy\build\windows-portable