2022-11-26 08:38:27 +13:00
|
|
|
name: 🐧 Linux GUI
|
2021-11-20 21:49:03 +13:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
pull_request:
|
|
|
|
schedule:
|
|
|
|
- cron: '0 0 * * 2'
|
2020-10-08 00:17:30 +13:00
|
|
|
|
|
|
|
env:
|
|
|
|
CARGO_TERM_COLOR: always
|
|
|
|
|
|
|
|
jobs:
|
2023-12-04 00:06:42 +13:00
|
|
|
linux-krokiet-gui:
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2024-02-11 23:57:41 +13:00
|
|
|
toolchain: [ stable, 1.74.0 ]
|
2023-12-04 00:06:42 +13:00
|
|
|
type: [ release ]
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Setup rust version
|
|
|
|
run: rustup default ${{ matrix.toolchain }}
|
|
|
|
|
2024-02-11 20:48:40 +13:00
|
|
|
- name: Enable LTO
|
|
|
|
run: sed -i 's/#lto = "fat"/lto = "fat"/g' Cargo.toml
|
|
|
|
if: ${{ matrix.toolchain == 'release' }}
|
|
|
|
|
2023-12-04 00:06:42 +13:00
|
|
|
- name: Build Release Krokiet
|
|
|
|
run: cargo build --release --bin krokiet
|
|
|
|
if: ${{ (matrix.type == 'release') }}
|
|
|
|
|
|
|
|
- name: Store Linux GUI Krokiet
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
name: krokiet-${{ runner.os }}-${{ matrix.toolchain }}
|
|
|
|
path: target/release/krokiet
|
|
|
|
if: ${{ matrix.type == 'release' }}
|
|
|
|
|
|
|
|
linux-krokiet-gui-heif:
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2024-02-11 23:57:41 +13:00
|
|
|
toolchain: [ stable, 1.74.0 ]
|
2023-12-04 00:06:42 +13:00
|
|
|
type: [ release ]
|
|
|
|
runs-on: ubuntu-22.04
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Install basic libraries
|
|
|
|
run: sudo apt update || true; sudo apt install libheif-dev libraw-dev -y
|
|
|
|
|
|
|
|
- name: Setup rust version
|
|
|
|
run: rustup default ${{ matrix.toolchain }}
|
|
|
|
|
2024-02-11 20:48:40 +13:00
|
|
|
- name: Enable LTO
|
|
|
|
run: sed -i 's/#lto = "fat"/lto = "fat"/g' Cargo.toml
|
|
|
|
if: ${{ matrix.toolchain == 'release' }}
|
|
|
|
|
2023-12-04 00:06:42 +13:00
|
|
|
- name: Build Release Krokiet heif
|
|
|
|
run: cargo build --release --bin krokiet --features "heif,libraw"
|
|
|
|
if: ${{ (matrix.type == 'release') }}
|
|
|
|
|
|
|
|
- name: Store Linux GUI Krokiet heif libraw
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
name: krokiet-${{ runner.os }}-${{ matrix.toolchain }}-heif-libraw
|
|
|
|
path: target/release/krokiet
|
|
|
|
if: ${{ matrix.type == 'release' }}
|
|
|
|
|
2022-11-26 08:38:27 +13:00
|
|
|
linux-gui:
|
2020-10-08 00:17:30 +13:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2024-02-11 23:57:41 +13:00
|
|
|
toolchain: [ stable, 1.74.0 ]
|
2020-10-08 00:17:30 +13:00
|
|
|
type: [ release ]
|
2022-05-22 20:59:09 +12:00
|
|
|
runs-on: ubuntu-22.04
|
2020-10-08 00:17:30 +13:00
|
|
|
steps:
|
2022-11-26 08:38:27 +13:00
|
|
|
- uses: actions/checkout@v3
|
2020-10-08 00:17:30 +13:00
|
|
|
|
|
|
|
- name: Install basic libraries
|
2023-12-04 00:06:42 +13:00
|
|
|
run: sudo apt update || true; sudo apt install libgtk-4-dev libheif-dev libraw-dev -y
|
2020-10-08 00:17:30 +13:00
|
|
|
|
2023-05-15 01:00:53 +12:00
|
|
|
- name: Setup rust version
|
|
|
|
run: rustup default ${{ matrix.toolchain }}
|
|
|
|
|
2024-02-11 20:48:40 +13:00
|
|
|
- name: Enable LTO
|
|
|
|
run: sed -i 's/#lto = "fat"/lto = "fat"/g' Cargo.toml
|
|
|
|
if: ${{ matrix.toolchain == 'release' }}
|
|
|
|
|
2023-12-04 00:06:42 +13:00
|
|
|
- name: Build Release Heif Libraw
|
|
|
|
run: cargo build --release --bin czkawka_gui --features "heif,libraw"
|
|
|
|
if: ${{ (matrix.type == 'release') }}
|
2022-07-30 05:26:28 +12:00
|
|
|
|
2023-12-04 00:06:42 +13:00
|
|
|
- name: Store Linux GUI Heif Libraw
|
2023-06-11 18:51:21 +12:00
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
2023-12-04 00:06:42 +13:00
|
|
|
name: czkawka_gui-${{ runner.os }}-${{ matrix.toolchain }}-heif-libraw
|
2023-06-11 18:51:21 +12:00
|
|
|
path: target/release/czkawka_gui
|
2023-12-04 00:06:42 +13:00
|
|
|
if: ${{ (matrix.type == 'release') && (matrix.toolchain == 'stable') }}
|
2023-06-11 18:51:21 +12:00
|
|
|
|
2022-08-28 07:46:08 +12:00
|
|
|
- name: Build Release
|
2023-12-04 00:06:42 +13:00
|
|
|
run: cargo build --release --bin czkawka_gui
|
|
|
|
if: ${{ (matrix.type == 'release') }}
|
2020-10-08 00:17:30 +13:00
|
|
|
|
2023-12-04 00:06:42 +13:00
|
|
|
# Only store stable toolchain
|
2022-07-30 05:26:28 +12:00
|
|
|
- name: Store Linux GUI
|
2022-11-26 08:38:27 +13:00
|
|
|
uses: actions/upload-artifact@v3
|
2022-07-30 05:26:28 +12:00
|
|
|
with:
|
|
|
|
name: czkawka_gui-${{ runner.os }}-${{ matrix.toolchain }}
|
|
|
|
path: target/release/czkawka_gui
|
2023-12-04 00:06:42 +13:00
|
|
|
if: ${{ (matrix.type == 'release') && (matrix.toolchain == 'stable') }}
|
2022-07-30 05:26:28 +12:00
|
|
|
|
|
|
|
linux-appimage-gui:
|
2020-10-08 00:17:30 +13:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2022-07-30 05:26:28 +12:00
|
|
|
toolchain: [ stable ]
|
2020-10-08 00:17:30 +13:00
|
|
|
type: [ release ]
|
2022-05-22 20:59:09 +12:00
|
|
|
runs-on: ubuntu-22.04
|
2020-10-08 00:17:30 +13:00
|
|
|
steps:
|
2022-11-26 08:38:27 +13:00
|
|
|
- uses: actions/checkout@v3
|
2020-10-08 00:17:30 +13:00
|
|
|
|
2022-07-30 05:26:28 +12:00
|
|
|
- name: Install Dependencies
|
2023-12-04 00:06:42 +13:00
|
|
|
run: sudo apt update || true; sudo apt install libgtk-4-dev libheif-dev librsvg2-dev wget fuse libfuse2 -y
|
2020-10-08 00:17:30 +13:00
|
|
|
|
2023-05-15 01:00:53 +12:00
|
|
|
- name: Setup rust version
|
|
|
|
run: rustup default ${{ matrix.toolchain }}
|
|
|
|
|
2024-02-11 20:48:40 +13:00
|
|
|
- name: Enable LTO
|
|
|
|
run: sed -i 's/#lto = "fat"/lto = "fat"/g' Cargo.toml
|
|
|
|
if: ${{ matrix.toolchain == 'release' }}
|
|
|
|
|
2022-07-30 05:26:28 +12:00
|
|
|
- name: Build Release
|
2023-12-04 00:06:42 +13:00
|
|
|
run: cargo build --release --bin czkawka_gui
|
2020-10-08 00:17:30 +13:00
|
|
|
|
2023-04-03 03:34:25 +12:00
|
|
|
- name: Download appimage dependencies
|
2022-07-30 05:26:28 +12:00
|
|
|
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"
|
|
|
|
chmod +x linuxdeploy-plugin-gtk.sh
|
|
|
|
chmod +x linuxdeploy-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 --output appimage --icon-file data/icons/com.github.qarmin.czkawka.svg --desktop-file data/com.github.qarmin.czkawka.desktop
|
2020-10-08 00:17:30 +13:00
|
|
|
|
2022-07-30 05:26:28 +12:00
|
|
|
- name: Store Linux Appimage GUI
|
2022-11-26 08:38:27 +13:00
|
|
|
uses: actions/upload-artifact@v3
|
2020-10-08 00:17:30 +13:00
|
|
|
with:
|
2022-07-30 05:26:28 +12:00
|
|
|
name: czkawka_gui-appimage-${{ runner.os }}-${{ matrix.toolchain }}
|
|
|
|
path: Czkawka*.AppImage
|
2020-10-08 00:17:30 +13:00
|
|
|
|
2021-05-17 04:39:40 +12:00
|
|
|
- name: Minimal AppImage
|
|
|
|
run: |
|
|
|
|
pwd
|
|
|
|
rm -rf czkawka_gui
|
|
|
|
cp target/release/czkawka_gui .
|
|
|
|
strip czkawka_gui
|
2023-10-05 19:06:47 +13:00
|
|
|
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
|
2021-05-17 04:39:40 +12:00
|
|
|
mv out/Czkawka*.AppImage out/czkawka_gui-minimal.AppImage
|
|
|
|
|
|
|
|
- name: Minimal Appimage Upload
|
2022-11-26 08:38:27 +13:00
|
|
|
uses: actions/upload-artifact@v3
|
2021-05-17 04:39:40 +12:00
|
|
|
with:
|
2021-05-21 01:52:21 +12:00
|
|
|
name: czkawka_gui-${{ matrix.toolchain }}_minimal_AppImage
|
2021-05-17 04:39:40 +12:00
|
|
|
path: out/*.AppImage
|
|
|
|
|
2022-07-30 05:26:28 +12:00
|
|
|
linux-tests:
|
2020-10-19 04:08:29 +13:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
toolchain: [ stable ]
|
2022-07-30 05:26:28 +12:00
|
|
|
type: [ debug ]
|
2022-05-22 20:59:09 +12:00
|
|
|
runs-on: ubuntu-22.04
|
2020-10-19 04:08:29 +13:00
|
|
|
steps:
|
2022-11-26 08:38:27 +13:00
|
|
|
- uses: actions/checkout@v3
|
2020-10-19 04:08:29 +13:00
|
|
|
|
2022-07-30 05:26:28 +12:00
|
|
|
- name: Install Dependencies
|
2023-12-04 00:06:42 +13:00
|
|
|
run: sudo apt update || true; sudo apt install libgtk-4-dev libheif-dev librsvg2-dev wget fuse libfuse2 -y xvfb
|
2020-10-19 04:08:29 +13:00
|
|
|
|
2023-05-15 01:00:53 +12:00
|
|
|
- name: Setup rust version
|
|
|
|
run: rustup default ${{ matrix.toolchain }}
|
|
|
|
|
2022-07-30 05:26:28 +12:00
|
|
|
- name: Test
|
|
|
|
run: xvfb-run cargo test
|