Skip to content

Commit

Permalink
Alternative frontend with Slint (#1102)
Browse files Browse the repository at this point in the history
  • Loading branch information
qarmin authored Dec 3, 2023
1 parent 8df5e99 commit c6b1eae
Show file tree
Hide file tree
Showing 88 changed files with 8,430 additions and 856 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/linux_cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,20 @@ jobs:
linux-cli:
strategy:
matrix:
toolchain: [ stable, 1.70.0 ]
toolchain: [ stable, 1.72.1 ]
type: [ release ]
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3

- name: Install basic libraries
run: sudo apt-get update; sudo apt install libheif-dev ffmpeg -y
run: sudo apt update || true; sudo apt install libheif-dev ffmpeg -y

- name: Setup rust version
run: rustup default ${{ matrix.toolchain }}

- name: Build Release
run: cargo build --release --bin czkawka_cli
env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-C debuginfo=0"
if: ${{ (matrix.type == 'release') }}

- name: Store Linux CLI
Expand Down
54 changes: 54 additions & 0 deletions .github/workflows/linux_cli_eyra.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: 🐧 Linux CLI Eyra
on:
push:
pull_request:
schedule:
- cron: '0 0 * * 2'

env:
CARGO_TERM_COLOR: always

jobs:
linux-cli:
strategy:
matrix:
toolchain: [ nightly ]
type: [ release ]
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3

- name: Install basic libraries
run: sudo apt update || true; sudo apt install -y ffmpeg

# New versions of nightly rust may call new unimplemented in eyra functions, so use const version
- name: Setup rust version
run: rustup default nightly-2023-11-29

- name: Add eyra
run: |
cd czkawka_cli
cargo add eyra --rename=std
echo 'fn main() { println!("cargo:rustc-link-arg=-nostartfiles"); }' > build.rs
cd ..
- name: Build Release
run: cargo build --release --bin czkawka_cli
if: ${{ (matrix.type == 'release') }}

- name: Store Linux CLI
uses: actions/upload-artifact@v3
with:
name: czkawka_cli-${{ runner.os }}-${{ matrix.toolchain }}
path: target/release/czkawka_cli
if: ${{ matrix.type == 'release' }}

- name: Linux Regression Test
run: |
wget https://github.com/qarmin/czkawka/releases/download/6.0.0/TestFiles.zip
cd ci_tester
cargo build --release
cd ..
ci_tester/target/release/ci_tester target/release/czkawka_cli
if: ${{ matrix.type == 'release' }}
90 changes: 64 additions & 26 deletions .github/workflows/linux_gui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,48 +9,92 @@ env:
CARGO_TERM_COLOR: always

jobs:
linux-krokiet-gui:
strategy:
matrix:
toolchain: [ stable, 1.72.1 ]
type: [ release ]
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3

- name: Setup rust version
run: rustup default ${{ matrix.toolchain }}

- 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:
toolchain: [ stable, 1.72.1 ]
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 }}

- 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' }}

linux-gui:
strategy:
matrix:
toolchain: [ stable, 1.70.0 ]
toolchain: [ stable, 1.72.1 ]
type: [ release ]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3

- name: Install basic libraries
run: sudo apt-get update; sudo apt install libgtk-4-dev libheif-dev -y
run: sudo apt update || true; sudo apt install libgtk-4-dev libheif-dev libraw-dev -y

- name: Setup rust version
run: rustup default ${{ matrix.toolchain }}

- name: Build Release Heif
run: cargo build --release --features heif
env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-C debuginfo=0"
if: ${{ (matrix.type == 'release') && (matrix.toolchain == '1.70.0') }}
- name: Build Release Heif Libraw
run: cargo build --release --bin czkawka_gui --features "heif,libraw"
if: ${{ (matrix.type == 'release') }}

- name: Store Linux GUI Heif
- name: Store Linux GUI Heif Libraw
uses: actions/upload-artifact@v3
with:
name: czkawka_gui-${{ runner.os }}-${{ matrix.toolchain }}-heif
name: czkawka_gui-${{ runner.os }}-${{ matrix.toolchain }}-heif-libraw
path: target/release/czkawka_gui
if: ${{ matrix.type == 'release' }}
if: ${{ (matrix.type == 'release') && (matrix.toolchain == 'stable') }}

- name: Build Release
run: cargo build --release
env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-C debuginfo=0"
if: ${{ (matrix.type == 'release') && (matrix.toolchain == 'stable') }}
run: cargo build --release --bin czkawka_gui
if: ${{ (matrix.type == 'release') }}

# Only store stable toolchain
- name: Store Linux GUI
uses: actions/upload-artifact@v3
with:
name: czkawka_gui-${{ runner.os }}-${{ matrix.toolchain }}
path: target/release/czkawka_gui
if: ${{ matrix.type == 'release' }}
if: ${{ (matrix.type == 'release') && (matrix.toolchain == 'stable') }}

linux-appimage-gui:
strategy:
Expand All @@ -62,16 +106,13 @@ jobs:
- uses: actions/checkout@v3

- name: Install Dependencies
run: sudo apt-get update; sudo apt install libgtk-4-dev libheif-dev librsvg2-dev wget fuse libfuse2 -y
run: sudo apt update || true; sudo apt install libgtk-4-dev libheif-dev librsvg2-dev wget fuse libfuse2 -y

- name: Setup rust version
run: rustup default ${{ matrix.toolchain }}

- name: Build Release
run: cargo build --release
env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-C debuginfo=0"
run: cargo build --release --bin czkawka_gui

- name: Download appimage dependencies
run: |
Expand Down Expand Up @@ -118,13 +159,10 @@ jobs:
- uses: actions/checkout@v3

- name: Install Dependencies
run: sudo apt-get update; sudo apt install libgtk-4-dev libheif-dev librsvg2-dev wget fuse libfuse2 -y xvfb
run: sudo apt update || true; sudo apt install libgtk-4-dev libheif-dev librsvg2-dev wget fuse libfuse2 -y xvfb

- name: Setup rust version
run: rustup default ${{ matrix.toolchain }}

- name: Test
run: xvfb-run cargo test
env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-C debuginfo=0"
18 changes: 14 additions & 4 deletions .github/workflows/mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ jobs:

- name: Build Release
run: cargo build --release
env:
CARGO_INCREMENTAL: 0
if: ${{ matrix.type == 'release'}}

- name: Store MacOS CLI
Expand All @@ -50,10 +48,15 @@ jobs:
path: target/release/czkawka_gui
if: ${{ matrix.type == 'release' }}

- name: Store MacOS Krokiet
uses: actions/upload-artifact@v3
with:
name: krokiet-${{ runner.os }}-${{ matrix.toolchain }}
path: target/release/krokiet
if: ${{ matrix.type == 'release' }}

- name: Build Release Heif
run: cargo build --release --features heif
env:
CARGO_INCREMENTAL: 0
if: ${{ matrix.type == 'release'}}

- name: Store MacOS CLI Heif
Expand All @@ -68,4 +71,11 @@ jobs:
with:
name: czkawka_gui-${{ runner.os }}-${{ matrix.toolchain }}-heif
path: target/release/czkawka_gui
if: ${{ matrix.type == 'release' }}

- name: Store MacOS Krokiet Heif
uses: actions/upload-artifact@v3
with:
name: krokiet-${{ runner.os }}-${{ matrix.toolchain }}-heif
path: target/release/krokiet
if: ${{ matrix.type == 'release' }}
13 changes: 5 additions & 8 deletions .github/workflows/quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,13 @@ jobs:
- uses: actions/checkout@v3

- name: Install Gtk 4
run: sudo apt-get update; sudo apt install -y libgtk-4-dev libheif-dev -y
run: sudo apt update || true; sudo apt install -y libgtk-4-dev libraw-dev libheif-dev -y

- name: Check the format
run: cargo fmt --all -- --check

# type complexity must be ignored because we use huge templates for queries
- name: Run clippy
run: >
cargo clippy
--all-targets
--all-features
--
-D warnings
run: cargo clippy --all-targets --all-features -- -D warnings

- name: Run clippy
run: cargo clippy -- -D warnings
Loading

0 comments on commit c6b1eae

Please sign in to comment.