-
-
Notifications
You must be signed in to change notification settings - Fork 674
211 lines (173 loc) · 6.69 KB
/
linux_gui.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
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
name: 🐧 Linux GUI
on:
push:
pull_request:
schedule:
- cron: '0 0 * * 2'
env:
CARGO_TERM_COLOR: always
jobs:
linux-krokiet-gui:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Setup rust version
run: rustup default stable
- name: Enable LTO
run: sed -i 's/#lto = "thin"/lto = "thin"/g' Cargo.toml
- name: Build Release Krokiet
run: cargo build --release --bin krokiet
- name: Store Linux GUI Krokiet
uses: actions/upload-artifact@v4
with:
name: krokiet-${{ runner.os }}
path: target/release/krokiet
- name: Prepare files to release
run: |
mv target/release/krokiet linux_krokiet_gui
- name: Release
uses: softprops/action-gh-release@v2
if: ${{ github.ref == 'refs/heads/master' }}
with:
tag_name: "Nightly"
files: |
linux_krokiet_gui
token: ${{ secrets.PAT_REPOSITORY }}
linux-krokiet-gui-heif:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Install basic libraries
run: sudo apt update || true; sudo apt install libheif-dev libraw-dev -y
- name: Setup rust version
run: rustup default stable
- name: Enable LTO
run: sed -i 's/#lto = "thin"/lto = "thin"/g' Cargo.toml
- name: Build Release Krokiet heif
run: cargo build --release --bin krokiet --features "heif,libraw"
- name: Store Linux GUI Krokiet heif libraw
uses: actions/upload-artifact@v4
with:
name: krokiet-${{ runner.os }}-heif-libraw
path: target/release/krokiet
- name: Prepare files to release
run: |
mv target/release/krokiet linux_krokiet_heif_raw_gui
- name: Release
uses: softprops/action-gh-release@v2
if: ${{ github.ref == 'refs/heads/master' }}
with:
tag_name: "Nightly"
files: |
linux_krokiet_heif_raw_gui
token: ${{ secrets.PAT_REPOSITORY }}
linux-gui:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Install basic libraries
run: sudo apt update || true; sudo apt install libgtk-4-dev libheif-dev libraw-dev -y
- name: Setup rust version
run: rustup default stable
- name: Enable LTO
run: sed -i 's/#lto = "thin"/lto = "thin"/g' Cargo.toml
- name: Build Release Heif Libraw
run: cargo build --release --bin czkawka_gui --features "heif,libraw"
- name: Store Linux GUI Heif Libraw
uses: actions/upload-artifact@v4
with:
name: czkawka_gui-${{ runner.os }}-heif-libraw
path: target/release/czkawka_gui
- name: Build Release
run: cargo build --release --bin czkawka_gui
# Only store stable toolchain
- name: Store Linux GUI
uses: actions/upload-artifact@v4
with:
name: czkawka_gui-${{ runner.os }}
path: target/release/czkawka_gui
- name: Prepare files to release
run: |
mv target/release/czkawka_gui linux_czkawka_gui
- name: Release
uses: softprops/action-gh-release@v2
if: ${{ github.ref == 'refs/heads/master' }}
with:
tag_name: "Nightly"
files: |
linux_czkawka_gui
token: ${{ secrets.PAT_REPOSITORY }}
linux-appimage-gui:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Install Dependencies
run: sudo apt update || true; sudo apt install libgtk-4-dev libheif-dev libraw-dev librsvg2-dev wget fuse libfuse2 desktop-file-utils -y
- name: Setup rust version
run: rustup default stable
- name: Enable LTO
run: sed -i 's/#lto = "thin"/lto = "thin"/g' Cargo.toml
- name: Build Release
run: cargo build --release --bin czkawka_gui
- name: Download appimage dependencies
run: |
pwd
wget -c "https://raw.githubusercontent.com/linuxdeploy/linuxdeploy-plugin-gtk/master/linuxdeploy-plugin-gtk.sh"
wget -c "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage"
wget -c "https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage"
chmod +x linuxdeploy-plugin-gtk.sh
chmod +x linuxdeploy-x86_64.AppImage
chmod +x appimagetool-x86_64.AppImage
mkdir -p AppDir/usr/bin
pwd
cp target/release/czkawka_gui AppDir/usr/bin
./linuxdeploy-x86_64.AppImage --appdir AppDir --plugin gtk --icon-file data/icons/com.github.qarmin.czkawka.svg --desktop-file data/com.github.qarmin.czkawka.desktop
./appimagetool-x86_64.AppImage --comp zstd --mksquashfs-opt -Xcompression-level --mksquashfs-opt 20 \
-u "gh-releases-zsync|$GITHUB_REPOSITORY_OWNER|czkawka|latest|*.AppImage.zsync" \
./AppDir
- name: Store Linux Appimage GUI
uses: actions/upload-artifact@v4
with:
name: czkawka_gui-appimage-${{ runner.os }}
path: Czkawka*.AppImage
- name: Store Linux Appimage GUI Zsync
uses: actions/upload-artifact@v4
with:
name: czkawka_gui-appimage-${{ runner.os }}.zsync
path: Czkawka*.AppImage.zsync
- name: Minimal AppImage
run: |
pwd
rm -rf czkawka_gui
cp target/release/czkawka_gui .
strip czkawka_gui
wget https://github.com/AppImageCommunity/pkg2appimage/releases/download/continuous/pkg2appimage--x86_64.AppImage -O pkg2.appimage
chmod +x ./pkg2.appimage
./pkg2.appimage misc/czkawka-appimage-recipe.yml
mv out/Czkawka*.AppImage out/czkawka_gui-minimal.AppImage
- name: Minimal Appimage Upload
uses: actions/upload-artifact@v4
with:
name: czkawka_gui_minimal_AppImage
path: out/*.AppImage
- name: Prepare files to release
run: |
mv out/czkawka_gui-minimal.AppImage linux_czkawka_gui_minimal.AppImage
- name: Release
uses: softprops/action-gh-release@v2
if: ${{ github.ref == 'refs/heads/master' }}
with:
tag_name: "Nightly"
files: |
linux_czkawka_gui_minimal.AppImage
token: ${{ secrets.PAT_REPOSITORY }}
linux-tests:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Install Dependencies
run: sudo apt update || true; sudo apt install libgtk-4-dev libheif-dev libraw-dev librsvg2-dev wget fuse libfuse2 -y xvfb
- name: Setup rust version
run: rustup default stable
- name: Test
run: xvfb-run cargo test