Change Github CI (#973)
* Change Github CI * Windows CI * Fix sorting * Windows
This commit is contained in:
parent
582e5417ac
commit
04a91aeca7
16
.github/workflows/linux_cli.yml
vendored
16
.github/workflows/linux_cli.yml
vendored
|
@ -18,22 +18,12 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
toolchain: ${{ matrix.toolchain }}
|
|
||||||
override: true
|
|
||||||
|
|
||||||
- uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
target
|
|
||||||
key: linux-default-${{github.ref}}-${{github.sha}}
|
|
||||||
restore-keys: |
|
|
||||||
linux-default-${{github.ref}}-${{github.sha}}
|
|
||||||
|
|
||||||
- name: Install basic libraries
|
- name: Install basic libraries
|
||||||
run: sudo apt-get update; sudo apt install libheif-dev -y
|
run: sudo apt-get update; sudo apt install libheif-dev -y
|
||||||
|
|
||||||
|
- name: Setup rust version
|
||||||
|
run: rustup default ${{ matrix.toolchain }}
|
||||||
|
|
||||||
- name: Build Release
|
- name: Build Release
|
||||||
run: cargo build --release --bin czkawka_cli
|
run: cargo build --release --bin czkawka_cli
|
||||||
env:
|
env:
|
||||||
|
|
40
.github/workflows/linux_gui.yml
vendored
40
.github/workflows/linux_gui.yml
vendored
|
@ -18,22 +18,12 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
toolchain: ${{ matrix.toolchain }}
|
|
||||||
override: true
|
|
||||||
|
|
||||||
- uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
target
|
|
||||||
key: linux-default-${{github.ref}}-${{github.sha}}
|
|
||||||
restore-keys: |
|
|
||||||
linux-default-${{github.ref}}-${{github.sha}}
|
|
||||||
|
|
||||||
- name: Install basic libraries
|
- name: Install basic libraries
|
||||||
run: sudo apt-get update; sudo apt install libgtk-4-dev libheif-dev -y
|
run: sudo apt-get update; sudo apt install libgtk-4-dev libheif-dev -y
|
||||||
|
|
||||||
|
- name: Setup rust version
|
||||||
|
run: rustup default ${{ matrix.toolchain }}
|
||||||
|
|
||||||
- name: Build Release Heif
|
- name: Build Release Heif
|
||||||
run: cargo build --release --features heif
|
run: cargo build --release --features heif
|
||||||
env:
|
env:
|
||||||
|
@ -64,22 +54,12 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
toolchain: ${{ matrix.toolchain }}
|
|
||||||
override: true
|
|
||||||
|
|
||||||
- uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
target
|
|
||||||
key: linux-appimage-gui-${{github.ref}}-${{github.sha}}
|
|
||||||
restore-keys: |
|
|
||||||
linux-appimage-gui-${{github.ref}}-${{github.sha}}
|
|
||||||
|
|
||||||
- name: Install Dependencies
|
- 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-get update; 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
|
- name: Build Release
|
||||||
run: cargo build --release
|
run: cargo build --release
|
||||||
env:
|
env:
|
||||||
|
@ -130,14 +110,12 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
toolchain: ${{ matrix.toolchain }}
|
|
||||||
override: true
|
|
||||||
|
|
||||||
- name: Install Dependencies
|
- 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-get update; 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
|
- name: Test
|
||||||
run: xvfb-run cargo test
|
run: xvfb-run cargo test
|
||||||
env:
|
env:
|
||||||
|
|
16
.github/workflows/mac.yml
vendored
16
.github/workflows/mac.yml
vendored
|
@ -18,19 +18,6 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
toolchain: ${{ matrix.toolchain }}
|
|
||||||
override: true
|
|
||||||
|
|
||||||
- uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
target
|
|
||||||
key: mac-${{github.ref}}-${{github.sha}}
|
|
||||||
restore-keys: |
|
|
||||||
mac-${{github.ref}}-${{github.sha}}
|
|
||||||
|
|
||||||
- name: Install Homebrew
|
- name: Install Homebrew
|
||||||
run: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
run: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||||
|
|
||||||
|
@ -40,6 +27,9 @@ jobs:
|
||||||
brew install rust gtk4 libheif || true
|
brew install rust gtk4 libheif || true
|
||||||
brew link --overwrite python@3.11
|
brew link --overwrite python@3.11
|
||||||
|
|
||||||
|
- name: Setup rust version
|
||||||
|
run: rustup default ${{ matrix.toolchain }}
|
||||||
|
|
||||||
- name: Build Release
|
- name: Build Release
|
||||||
run: cargo build --release
|
run: cargo build --release
|
||||||
env:
|
env:
|
||||||
|
|
14
.github/workflows/quality.yml
vendored
14
.github/workflows/quality.yml
vendored
|
@ -14,20 +14,6 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
target
|
|
||||||
key: quality-${{github.ref}}-${{github.sha}}
|
|
||||||
restore-keys: |
|
|
||||||
quality-cli-${{github.ref}}-${{github.sha}}
|
|
||||||
|
|
||||||
- uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
toolchain: stable
|
|
||||||
components: rustfmt, clippy
|
|
||||||
override: true
|
|
||||||
|
|
||||||
- name: Install Gtk 4
|
- name: Install Gtk 4
|
||||||
run: sudo apt-get update; sudo apt install -y libgtk-4-dev libheif-dev -y
|
run: sudo apt-get update; sudo apt install -y libgtk-4-dev libheif-dev -y
|
||||||
|
|
||||||
|
|
2
.github/workflows/windows.yml
vendored
2
.github/workflows/windows.yml
vendored
|
@ -73,7 +73,7 @@ jobs:
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
# Provide option to log things to windows CLI
|
# Provide option to log things to windows CLI
|
||||||
container_cli:
|
container_console_window:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
container:
|
container:
|
||||||
image: ghcr.io/piegamesde/gtk4-cross:gtk-4.8
|
image: ghcr.io/piegamesde/gtk4-cross:gtk-4.8
|
||||||
|
|
|
@ -8,13 +8,13 @@ use crate::help_functions::*;
|
||||||
pub fn create_tree_view_included_directories(tree_view: &TreeView) {
|
pub fn create_tree_view_included_directories(tree_view: &TreeView) {
|
||||||
let model = get_list_store(tree_view);
|
let model = get_list_store(tree_view);
|
||||||
|
|
||||||
create_default_column(tree_view, ColumnsIncludedDirectory::Path as i32, None, None);
|
create_default_column(tree_view, ColumnsIncludedDirectory::Path as i32, Some(None), None);
|
||||||
create_default_selection_button_column(tree_view, ColumnsIncludedDirectory::ReferenceButton as i32, model, None);
|
create_default_selection_button_column(tree_view, ColumnsIncludedDirectory::ReferenceButton as i32, model, None);
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn create_tree_view_excluded_directories(tree_view: &TreeView) {
|
pub fn create_tree_view_excluded_directories(tree_view: &TreeView) {
|
||||||
tree_view.set_headers_visible(false);
|
tree_view.set_headers_visible(false);
|
||||||
create_default_column(tree_view, ColumnsExcludedDirectory::Path as i32, None, None);
|
create_default_column(tree_view, ColumnsExcludedDirectory::Path as i32, Some(None), None);
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn create_tree_view_duplicates(tree_view: &TreeView) {
|
pub fn create_tree_view_duplicates(tree_view: &TreeView) {
|
||||||
|
@ -39,12 +39,12 @@ pub fn create_tree_view_empty_folders(tree_view: &TreeView) {
|
||||||
|
|
||||||
create_default_selection_button_column(tree_view, ColumnsEmptyFolders::SelectionButton as i32, model, None);
|
create_default_selection_button_column(tree_view, ColumnsEmptyFolders::SelectionButton as i32, model, None);
|
||||||
|
|
||||||
create_default_column(tree_view, ColumnsEmptyFolders::Name as i32, None, None);
|
create_default_column(tree_view, ColumnsEmptyFolders::Name as i32, Some(None), None);
|
||||||
create_default_column(tree_view, ColumnsEmptyFolders::Path as i32, None, None);
|
create_default_column(tree_view, ColumnsEmptyFolders::Path as i32, Some(None), None);
|
||||||
create_default_column(
|
create_default_column(
|
||||||
tree_view,
|
tree_view,
|
||||||
ColumnsEmptyFolders::Modification as i32,
|
ColumnsEmptyFolders::Modification as i32,
|
||||||
Some(ColumnsEmptyFolders::ModificationAsSecs as i32),
|
Some(Some(ColumnsEmptyFolders::ModificationAsSecs as i32)),
|
||||||
None,
|
None,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -56,10 +56,15 @@ pub fn create_tree_view_big_files(tree_view: &TreeView) {
|
||||||
|
|
||||||
create_default_selection_button_column(tree_view, ColumnsBigFiles::SelectionButton as i32, model, None);
|
create_default_selection_button_column(tree_view, ColumnsBigFiles::SelectionButton as i32, model, None);
|
||||||
|
|
||||||
create_default_column(tree_view, ColumnsBigFiles::Size as i32, None, None);
|
create_default_column(tree_view, ColumnsBigFiles::Size as i32, Some(None), None);
|
||||||
create_default_column(tree_view, ColumnsBigFiles::Name as i32, None, None);
|
create_default_column(tree_view, ColumnsBigFiles::Name as i32, Some(None), None);
|
||||||
create_default_column(tree_view, ColumnsBigFiles::Path as i32, None, None);
|
create_default_column(tree_view, ColumnsBigFiles::Path as i32, Some(None), None);
|
||||||
create_default_column(tree_view, ColumnsBigFiles::Modification as i32, Some(ColumnsBigFiles::ModificationAsSecs as i32), None);
|
create_default_column(
|
||||||
|
tree_view,
|
||||||
|
ColumnsBigFiles::Modification as i32,
|
||||||
|
Some(Some(ColumnsBigFiles::ModificationAsSecs as i32)),
|
||||||
|
None,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn create_tree_view_temporary_files(tree_view: &TreeView) {
|
pub fn create_tree_view_temporary_files(tree_view: &TreeView) {
|
||||||
|
@ -69,12 +74,12 @@ pub fn create_tree_view_temporary_files(tree_view: &TreeView) {
|
||||||
|
|
||||||
create_default_selection_button_column(tree_view, ColumnsTemporaryFiles::SelectionButton as i32, model, None);
|
create_default_selection_button_column(tree_view, ColumnsTemporaryFiles::SelectionButton as i32, model, None);
|
||||||
|
|
||||||
create_default_column(tree_view, ColumnsTemporaryFiles::Name as i32, None, None);
|
create_default_column(tree_view, ColumnsTemporaryFiles::Name as i32, Some(None), None);
|
||||||
create_default_column(tree_view, ColumnsTemporaryFiles::Path as i32, None, None);
|
create_default_column(tree_view, ColumnsTemporaryFiles::Path as i32, Some(None), None);
|
||||||
create_default_column(
|
create_default_column(
|
||||||
tree_view,
|
tree_view,
|
||||||
ColumnsTemporaryFiles::Modification as i32,
|
ColumnsTemporaryFiles::Modification as i32,
|
||||||
Some(ColumnsTemporaryFiles::ModificationAsSecs as i32),
|
Some(Some(ColumnsTemporaryFiles::ModificationAsSecs as i32)),
|
||||||
None,
|
None,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -86,9 +91,14 @@ pub fn create_tree_view_empty_files(tree_view: &TreeView) {
|
||||||
|
|
||||||
create_default_selection_button_column(tree_view, ColumnsEmptyFiles::SelectionButton as i32, model, None);
|
create_default_selection_button_column(tree_view, ColumnsEmptyFiles::SelectionButton as i32, model, None);
|
||||||
|
|
||||||
create_default_column(tree_view, ColumnsEmptyFiles::Name as i32, None, None);
|
create_default_column(tree_view, ColumnsEmptyFiles::Name as i32, Some(None), None);
|
||||||
create_default_column(tree_view, ColumnsEmptyFiles::Path as i32, None, None);
|
create_default_column(tree_view, ColumnsEmptyFiles::Path as i32, Some(None), None);
|
||||||
create_default_column(tree_view, ColumnsEmptyFiles::Modification as i32, Some(ColumnsEmptyFiles::ModificationAsSecs as i32), None);
|
create_default_column(
|
||||||
|
tree_view,
|
||||||
|
ColumnsEmptyFiles::Modification as i32,
|
||||||
|
Some(Some(ColumnsEmptyFiles::ModificationAsSecs as i32)),
|
||||||
|
None,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn create_tree_view_similar_images(tree_view: &TreeView) {
|
pub fn create_tree_view_similar_images(tree_view: &TreeView) {
|
||||||
|
@ -151,14 +161,14 @@ pub fn create_tree_view_invalid_symlinks(tree_view: &TreeView) {
|
||||||
|
|
||||||
create_default_selection_button_column(tree_view, ColumnsInvalidSymlinks::SelectionButton as i32, model, None);
|
create_default_selection_button_column(tree_view, ColumnsInvalidSymlinks::SelectionButton as i32, model, None);
|
||||||
|
|
||||||
create_default_column(tree_view, ColumnsInvalidSymlinks::Name as i32, None, None);
|
create_default_column(tree_view, ColumnsInvalidSymlinks::Name as i32, Some(None), None);
|
||||||
create_default_column(tree_view, ColumnsInvalidSymlinks::Path as i32, None, None);
|
create_default_column(tree_view, ColumnsInvalidSymlinks::Path as i32, Some(None), None);
|
||||||
create_default_column(tree_view, ColumnsInvalidSymlinks::DestinationPath as i32, None, None);
|
create_default_column(tree_view, ColumnsInvalidSymlinks::DestinationPath as i32, Some(None), None);
|
||||||
create_default_column(tree_view, ColumnsInvalidSymlinks::TypeOfError as i32, None, None);
|
create_default_column(tree_view, ColumnsInvalidSymlinks::TypeOfError as i32, Some(None), None);
|
||||||
create_default_column(
|
create_default_column(
|
||||||
tree_view,
|
tree_view,
|
||||||
ColumnsInvalidSymlinks::Modification as i32,
|
ColumnsInvalidSymlinks::Modification as i32,
|
||||||
Some(ColumnsInvalidSymlinks::ModificationAsSecs as i32),
|
Some(Some(ColumnsInvalidSymlinks::ModificationAsSecs as i32)),
|
||||||
None,
|
None,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -170,13 +180,13 @@ pub fn create_tree_view_broken_files(tree_view: &TreeView) {
|
||||||
|
|
||||||
create_default_selection_button_column(tree_view, ColumnsBrokenFiles::SelectionButton as i32, model, None);
|
create_default_selection_button_column(tree_view, ColumnsBrokenFiles::SelectionButton as i32, model, None);
|
||||||
|
|
||||||
create_default_column(tree_view, ColumnsBrokenFiles::Name as i32, None, None);
|
create_default_column(tree_view, ColumnsBrokenFiles::Name as i32, Some(None), None);
|
||||||
create_default_column(tree_view, ColumnsBrokenFiles::Path as i32, None, None);
|
create_default_column(tree_view, ColumnsBrokenFiles::Path as i32, Some(None), None);
|
||||||
create_default_column(tree_view, ColumnsBrokenFiles::ErrorType as i32, None, None);
|
create_default_column(tree_view, ColumnsBrokenFiles::ErrorType as i32, Some(None), None);
|
||||||
create_default_column(
|
create_default_column(
|
||||||
tree_view,
|
tree_view,
|
||||||
ColumnsBrokenFiles::Modification as i32,
|
ColumnsBrokenFiles::Modification as i32,
|
||||||
Some(ColumnsBrokenFiles::ModificationAsSecs as i32),
|
Some(Some(ColumnsBrokenFiles::ModificationAsSecs as i32)),
|
||||||
None,
|
None,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -188,10 +198,10 @@ pub fn create_tree_view_bad_extensions(tree_view: &TreeView) {
|
||||||
|
|
||||||
create_default_selection_button_column(tree_view, ColumnsBadExtensions::SelectionButton as i32, model, None);
|
create_default_selection_button_column(tree_view, ColumnsBadExtensions::SelectionButton as i32, model, None);
|
||||||
|
|
||||||
create_default_column(tree_view, ColumnsBadExtensions::Name as i32, None, None);
|
create_default_column(tree_view, ColumnsBadExtensions::Name as i32, Some(None), None);
|
||||||
create_default_column(tree_view, ColumnsBadExtensions::Path as i32, None, None);
|
create_default_column(tree_view, ColumnsBadExtensions::Path as i32, Some(None), None);
|
||||||
create_default_column(tree_view, ColumnsBadExtensions::CurrentExtension as i32, None, None);
|
create_default_column(tree_view, ColumnsBadExtensions::CurrentExtension as i32, Some(None), None);
|
||||||
create_default_column(tree_view, ColumnsBadExtensions::ValidExtensions as i32, None, None);
|
create_default_column(tree_view, ColumnsBadExtensions::ValidExtensions as i32, Some(None), None);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn create_default_selection_button_column(
|
fn create_default_selection_button_column(
|
||||||
|
@ -220,7 +230,8 @@ fn create_default_selection_button_column(
|
||||||
(renderer, column)
|
(renderer, column)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn create_default_column(tree_view: &TreeView, column_id: i32, sort_column_id: Option<i32>, colors_columns_id: Option<(i32, i32)>) -> (CellRendererText, TreeViewColumn) {
|
#[allow(clippy::option_option)]
|
||||||
|
fn create_default_column(tree_view: &TreeView, column_id: i32, sort_column_id: Option<Option<i32>>, colors_columns_id: Option<(i32, i32)>) -> (CellRendererText, TreeViewColumn) {
|
||||||
let renderer = CellRendererText::new();
|
let renderer = CellRendererText::new();
|
||||||
let column: TreeViewColumn = TreeViewColumn::new();
|
let column: TreeViewColumn = TreeViewColumn::new();
|
||||||
column.pack_start(&renderer, true);
|
column.pack_start(&renderer, true);
|
||||||
|
@ -228,9 +239,11 @@ fn create_default_column(tree_view: &TreeView, column_id: i32, sort_column_id: O
|
||||||
column.set_min_width(50);
|
column.set_min_width(50);
|
||||||
column.add_attribute(&renderer, "text", column_id);
|
column.add_attribute(&renderer, "text", column_id);
|
||||||
if let Some(sort_column_id) = sort_column_id {
|
if let Some(sort_column_id) = sort_column_id {
|
||||||
column.set_sort_column_id(sort_column_id);
|
if let Some(sort_column_id) = sort_column_id {
|
||||||
} else {
|
column.set_sort_column_id(sort_column_id);
|
||||||
column.set_sort_column_id(column_id);
|
} else {
|
||||||
|
column.set_sort_column_id(column_id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if let Some(colors_columns_id) = colors_columns_id {
|
if let Some(colors_columns_id) = colors_columns_id {
|
||||||
column.add_attribute(&renderer, "background", colors_columns_id.0);
|
column.add_attribute(&renderer, "background", colors_columns_id.0);
|
||||||
|
|
Loading…
Reference in a new issue