|
1 | | -name: 🐧 Linux GUI |
| 1 | +name: 🐧 Linux |
2 | 2 | on: |
3 | 3 | push: |
4 | 4 | pull_request: |
|
8 | 8 | env: |
9 | 9 | CARGO_TERM_COLOR: always |
10 | 10 |
|
| 11 | +# TODO - increase version to 22.04, to unify every job |
| 12 | +# TODO - remove appimage |
11 | 13 | jobs: |
12 | | - linux-krokiet-gui: |
| 14 | + linux-cli-krokiet: |
13 | 15 | runs-on: ubuntu-20.04 |
14 | 16 | steps: |
15 | 17 | - uses: actions/checkout@v4 |
16 | 18 |
|
| 19 | + - name: Install basic libraries |
| 20 | + run: sudo apt update || true; sudo apt install libheif-dev libraw-dev ffmpeg -y |
| 21 | + |
17 | 22 | - name: Setup rust version |
18 | 23 | run: rustup default 1.85.0 |
19 | 24 |
|
20 | | - - name: Enable LTO |
| 25 | + - name: Build Release |
21 | 26 | if: ${{ github.ref == 'refs/heads/master' }} |
22 | | - run: sed -i 's/#lto = "thin"/lto = "thin"/g' Cargo.toml |
| 27 | + run: |
| 28 | + sed -i 's/#lto = "thin"/lto = "thin"/g' Cargo.toml |
| 29 | + cargo build --release --bin czkawka_cli --bin krokiet |
23 | 30 |
|
24 | | - - name: Build Release Krokiet |
25 | | - run: cargo build --release --bin krokiet |
| 31 | + - name: Build Debug |
| 32 | + if: ${{ github.ref != 'refs/heads/master' }} |
| 33 | + run: | |
| 34 | + cargo build --bin czkawka_cli --bin krokiet |
26 | 35 |
|
27 | | - - name: Store Linux GUI Krokiet |
| 36 | + # Storing in actions |
| 37 | + - name: Store Linux CLI |
| 38 | + if: ${{ github.ref == 'refs/heads/master' }} |
28 | 39 | uses: actions/upload-artifact@v4 |
29 | 40 | with: |
30 | | - name: krokiet-${{ runner.os }} |
| 41 | + name: czkawka_cli-${{ runner.os }}-release |
| 42 | + path: target/release/czkawka_cli |
| 43 | + |
| 44 | + - name: Store Linux Krokiet |
| 45 | + if: ${{ github.ref == 'refs/heads/master' }} |
| 46 | + uses: actions/upload-artifact@v4 |
| 47 | + with: |
| 48 | + name: czkawka_cli-${{ runner.os }}-release |
31 | 49 | path: target/release/krokiet |
32 | 50 |
|
| 51 | + - name: Store Linux CLI Debug |
| 52 | + if: ${{ github.ref != 'refs/heads/master' }} |
| 53 | + uses: actions/upload-artifact@v4 |
| 54 | + with: |
| 55 | + name: czkawka_cli-${{ runner.os }}-debug |
| 56 | + path: target/debug/czkawka_cli |
| 57 | + |
| 58 | + - name: Store Linux Krokiet Debug |
| 59 | + if: ${{ github.ref != 'refs/heads/master' }} |
| 60 | + uses: actions/upload-artifact@v4 |
| 61 | + with: |
| 62 | + name: czkawka_cli-${{ runner.os }}-debug |
| 63 | + path: target/debug/krokiet |
| 64 | + |
| 65 | + # Storing in releases |
33 | 66 | - name: Prepare files to release |
| 67 | + if: ${{ github.ref == 'refs/heads/master' }} |
34 | 68 | run: | |
35 | | - mv target/release/krokiet linux_krokiet_gui |
| 69 | + mv target/release/czkawka_cli linux_czkawka_cli |
| 70 | + mv target/release/krokiet linux_krokiet |
| 71 | +
|
36 | 72 | - name: Release |
37 | 73 | uses: softprops/action-gh-release@v2 |
38 | 74 | if: ${{ github.ref == 'refs/heads/master' }} |
39 | 75 | with: |
40 | 76 | tag_name: "Nightly" |
41 | 77 | files: | |
42 | | - linux_krokiet_gui |
| 78 | + linux_czkawka_cli |
| 79 | + linux_krokiet |
43 | 80 | token: ${{ secrets.PAT_REPOSITORY }} |
44 | 81 |
|
| 82 | + |
45 | 83 | linux-krokiet-gui-heif: |
46 | 84 | runs-on: ubuntu-22.04 |
47 | 85 | steps: |
@@ -202,16 +240,89 @@ jobs: |
202 | 240 | linux_czkawka_gui_minimal.AppImage |
203 | 241 | token: ${{ secrets.PAT_REPOSITORY }} |
204 | 242 |
|
205 | | - linux-tests: |
| 243 | + linux-tests-on-minimal-rust-version: |
206 | 244 | runs-on: ubuntu-22.04 |
207 | 245 | steps: |
208 | 246 | - uses: actions/checkout@v4 |
209 | 247 |
|
210 | | - - name: Install Dependencies |
211 | | - run: sudo apt update || true; sudo apt install libgtk-4-dev libheif-dev libraw-dev librsvg2-dev wget fuse libfuse2 -y xvfb |
| 248 | + - name: Install basic libraries |
| 249 | + run: sudo apt update || true; sudo apt install libgtk-4-dev libheif-dev libraw-dev ffmpeg -y |
212 | 250 |
|
213 | 251 | - name: Setup rust version |
214 | 252 | run: rustup default 1.85.0 |
215 | 253 |
|
216 | 254 | - name: Test |
217 | | - run: xvfb-run cargo test |
| 255 | + run: | |
| 256 | + xvfb-run cargo test |
| 257 | +
|
| 258 | + - name: Build |
| 259 | + run: | |
| 260 | + cargo build |
| 261 | + cargo build --features "heif,libraw,libavif" |
| 262 | +
|
| 263 | + - name: Build test version |
| 264 | + run: cargo build --profile test --bin czkawka_cli |
| 265 | + |
| 266 | + - name: Linux Regression Test |
| 267 | + run: | |
| 268 | + wget https://github.com/qarmin/czkawka/releases/download/6.0.0/TestFiles.zip |
| 269 | + cd ci_tester |
| 270 | + cargo build --release |
| 271 | + cd .. |
| 272 | + |
| 273 | + ci_tester/target/release/ci_tester target/debug/czkawka_cli |
| 274 | +
|
| 275 | + linux-arm: |
| 276 | + runs-on: ubuntu-24.04-arm |
| 277 | + steps: |
| 278 | + - uses: actions/checkout@v4 |
| 279 | + |
| 280 | + - name: Install basic libraries |
| 281 | + run: sudo apt update || true; |
| 282 | + |
| 283 | + - name: Setup rust version |
| 284 | + run: rustup default 1.85.0 |
| 285 | + |
| 286 | + - name: Enable LTO |
| 287 | + if: ${{ github.ref == 'refs/heads/master' }} |
| 288 | + run: sed -i 's/#lto = "thin"/lto = "thin"/g' Cargo.toml |
| 289 | + |
| 290 | + - name: Build Release |
| 291 | + run: cargo build --release |
| 292 | + |
| 293 | + - name: Store cli |
| 294 | + uses: actions/upload-artifact@v4 |
| 295 | + with: |
| 296 | + name: czkawka_cli-${{ runner.os }} |
| 297 | + path: | |
| 298 | + target/release/czkawka_cli |
| 299 | +
|
| 300 | + - name: Store gui |
| 301 | + uses: actions/upload-artifact@v4 |
| 302 | + with: |
| 303 | + name: czkawka_gui-${{ runner.os }} |
| 304 | + path: | |
| 305 | + target/release/czkawka_gui |
| 306 | +
|
| 307 | + - name: Store krokiet |
| 308 | + uses: actions/upload-artifact@v4 |
| 309 | + with: |
| 310 | + name: krokiet-${{ runner.os }} |
| 311 | + path: | |
| 312 | + target/release/krokiet |
| 313 | + - name: Prepare files to release |
| 314 | + run: | |
| 315 | + mv target/release/czkawka_cli linux_czkawka_cli_arm |
| 316 | + mv target/release/czkawka_gui linux_czkawka_gui_arm |
| 317 | + mv target/release/krokiet linux_krokiet_arm |
| 318 | +
|
| 319 | + - name: Release |
| 320 | + uses: softprops/action-gh-release@v2 |
| 321 | + if: ${{ github.ref == 'refs/heads/master' }} |
| 322 | + with: |
| 323 | + tag_name: "Nightly" |
| 324 | + files: | |
| 325 | + linux_czkawka_cli_arm |
| 326 | + linux_czkawka_gui_arm |
| 327 | + linux_krokiet_arm |
| 328 | + token: ${{ secrets.PAT_REPOSITORY }} |
0 commit comments