2020-10-08 00:17:30 +13:00
|
|
|
name: 🐧 Linux
|
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:
|
2022-07-30 05:26:28 +12:00
|
|
|
linux-default:
|
2020-10-08 00:17:30 +13:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2022-07-30 05:26:28 +12:00
|
|
|
toolchain: [ stable, 1.60.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:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
toolchain: ${{ matrix.toolchain }}
|
|
|
|
override: true
|
|
|
|
|
|
|
|
- uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
target
|
2022-07-30 05:26:28 +12:00
|
|
|
key: linux-default-${{github.ref}}-${{github.sha}}
|
2020-10-08 00:17:30 +13:00
|
|
|
restore-keys: |
|
2022-07-30 05:26:28 +12:00
|
|
|
linux-default-${{github.ref}}-${{github.sha}}
|
2020-10-08 00:17:30 +13:00
|
|
|
|
|
|
|
- name: Install basic libraries
|
2022-06-09 07:42:51 +12:00
|
|
|
run: sudo apt-get update; sudo apt install libgtk-4-dev libheif-dev -y
|
2020-10-08 00:17:30 +13:00
|
|
|
|
2022-08-28 07:46:08 +12:00
|
|
|
- name: Build Release Heif
|
|
|
|
run: cargo build --release --features heif
|
2022-07-30 05:26:28 +12:00
|
|
|
env:
|
|
|
|
CARGO_INCREMENTAL: 0
|
|
|
|
RUSTFLAGS: "-C debuginfo=0"
|
|
|
|
if: ${{ (matrix.type == 'release') && (matrix.toolchain == '1.60.0') }}
|
|
|
|
|
2022-08-28 07:46:08 +12:00
|
|
|
- name: Build Release
|
|
|
|
run: cargo build --release
|
2020-10-08 00:17:30 +13:00
|
|
|
env:
|
|
|
|
CARGO_INCREMENTAL: 0
|
2022-05-22 20:59:09 +12:00
|
|
|
RUSTFLAGS: "-C debuginfo=0"
|
2022-07-30 05:26:28 +12:00
|
|
|
if: ${{ (matrix.type == 'release') && (matrix.toolchain == 'stable') }}
|
2020-10-08 00:17:30 +13:00
|
|
|
|
|
|
|
- name: Store Linux CLI
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: czkawka_cli-${{ runner.os }}-${{ matrix.toolchain }}
|
|
|
|
path: target/release/czkawka_cli
|
|
|
|
if: ${{ matrix.type == 'release' }}
|
|
|
|
|
2022-07-30 05:26:28 +12:00
|
|
|
- name: Store Linux GUI
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: czkawka_gui-${{ runner.os }}-${{ matrix.toolchain }}
|
|
|
|
path: target/release/czkawka_gui
|
|
|
|
if: ${{ matrix.type == 'release' }}
|
|
|
|
|
2021-11-28 08:57:10 +13:00
|
|
|
# Duplicate finder checks included and excluded directories
|
|
|
|
# Others are just check delete files number
|
2020-10-14 02:56:04 +13:00
|
|
|
- name: Linux Regression Test
|
|
|
|
run: |
|
|
|
|
wget https://github.com/qarmin/czkawka/releases/download/1.1.0/TestSuite.zip
|
|
|
|
unzip TestSuite.zip -d TestSuite
|
|
|
|
python3 misc/check_results.py TestSuite 15 8
|
|
|
|
|
|
|
|
|
2021-08-07 09:23:11 +12:00
|
|
|
target/release/czkawka_cli dup -d "$(pwd)/TestSuite" -D aen -m 1024
|
2020-10-14 02:56:04 +13:00
|
|
|
python3 misc/check_results.py TestSuite 7 8
|
|
|
|
|
|
|
|
rm -rf TestSuite
|
|
|
|
unzip TestSuite.zip -d TestSuite
|
|
|
|
|
2021-08-07 09:23:11 +12:00
|
|
|
target/release/czkawka_cli dup -d "$(pwd)/TestSuite" -D aen -m 1024
|
2020-10-14 02:56:04 +13:00
|
|
|
python3 misc/check_results.py TestSuite 7 8
|
|
|
|
|
|
|
|
rm -rf TestSuite
|
|
|
|
unzip TestSuite.zip -d TestSuite
|
|
|
|
|
2021-08-07 09:23:11 +12:00
|
|
|
target/release/czkawka_cli dup -d "$(pwd)/TestSuite" -x TEXT -D aeo -m 1024
|
2020-10-14 02:56:04 +13:00
|
|
|
python3 misc/check_results.py TestSuite 14 8
|
|
|
|
|
|
|
|
rm -rf TestSuite
|
|
|
|
unzip TestSuite.zip -d TestSuite
|
|
|
|
|
2021-08-07 09:23:11 +12:00
|
|
|
target/release/czkawka_cli dup -d "$(pwd)/TestSuite" -e "$(pwd)/TestSuite/SubFolder" -D aeo -m 1024
|
2020-10-14 02:56:04 +13:00
|
|
|
python3 misc/check_results.py TestSuite 13 8
|
|
|
|
|
|
|
|
rm -rf TestSuite
|
|
|
|
unzip TestSuite.zip -d TestSuite
|
|
|
|
|
|
|
|
target/release/czkawka_cli dup -d "$(pwd)/TestSuite" -m 1500 -D aeo
|
|
|
|
python3 misc/check_results.py TestSuite 8 8
|
|
|
|
|
|
|
|
rm -rf TestSuite
|
|
|
|
unzip TestSuite.zip -d TestSuite
|
|
|
|
|
2021-08-07 09:23:11 +12:00
|
|
|
target/release/czkawka_cli dup -d "$(pwd)/TestSuite" -R -m 1024
|
2020-10-14 02:56:04 +13:00
|
|
|
python3 misc/check_results.py TestSuite 15 8
|
2021-08-07 09:23:11 +12:00
|
|
|
target/release/czkawka_cli dup -d "$(pwd)/TestSuite" -R -D aeo -m 1024
|
2020-10-14 02:56:04 +13:00
|
|
|
python3 misc/check_results.py TestSuite 13 8
|
|
|
|
|
|
|
|
|
|
|
|
target/release/czkawka_cli big -d "$(pwd)/TestSuite"
|
|
|
|
|
|
|
|
rm -rf TestSuite
|
|
|
|
unzip TestSuite.zip -d TestSuite
|
|
|
|
|
|
|
|
target/release/czkawka_cli empty-files -d "$(pwd)/TestSuite"
|
|
|
|
python3 misc/check_results.py TestSuite 15 8
|
|
|
|
target/release/czkawka_cli empty-files -d "$(pwd)/TestSuite" -D
|
|
|
|
python3 misc/check_results.py TestSuite 13 8
|
|
|
|
|
|
|
|
rm -rf TestSuite
|
|
|
|
unzip TestSuite.zip -d TestSuite
|
|
|
|
|
|
|
|
target/release/czkawka_cli empty-folders -d "$(pwd)/TestSuite"
|
|
|
|
python3 misc/check_results.py TestSuite 15 8
|
|
|
|
target/release/czkawka_cli empty-folders -d "$(pwd)/TestSuite" -D
|
|
|
|
python3 misc/check_results.py TestSuite 15 2
|
|
|
|
|
|
|
|
rm -rf TestSuite
|
|
|
|
unzip TestSuite.zip -d TestSuite
|
|
|
|
|
|
|
|
target/release/czkawka_cli temp -d "$(pwd)/TestSuite"
|
|
|
|
python3 misc/check_results.py TestSuite 15 8
|
|
|
|
target/release/czkawka_cli temp -d "$(pwd)/TestSuite" -D
|
|
|
|
python3 misc/check_results.py TestSuite 14 8
|
|
|
|
|
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:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
toolchain: ${{ matrix.toolchain }}
|
|
|
|
override: true
|
|
|
|
|
|
|
|
- uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
target
|
2022-07-30 05:26:28 +12:00
|
|
|
key: linux-appimage-gui-${{github.ref}}-${{github.sha}}
|
2020-10-08 00:17:30 +13:00
|
|
|
restore-keys: |
|
2022-07-30 05:26:28 +12:00
|
|
|
linux-appimage-gui-${{github.ref}}-${{github.sha}}
|
2022-06-09 07:42:51 +12:00
|
|
|
|
2022-07-30 05:26:28 +12:00
|
|
|
- name: Install Dependencies
|
|
|
|
run: sudo apt-get update; sudo apt install libgtk-4-dev libheif-dev librsvg2-dev wget fuse libfuse2 -y
|
2020-10-08 00:17:30 +13:00
|
|
|
|
2022-07-30 05:26:28 +12:00
|
|
|
- name: Build Release
|
|
|
|
run: cargo build --release
|
2020-10-08 00:17:30 +13:00
|
|
|
env:
|
|
|
|
CARGO_INCREMENTAL: 0
|
2022-05-22 20:59:09 +12:00
|
|
|
RUSTFLAGS: "-C debuginfo=0"
|
2020-10-08 00:17:30 +13:00
|
|
|
|
2022-07-30 05:26:28 +12:00
|
|
|
- name: Download appimage dependiences
|
|
|
|
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
|
2020-10-08 00:17:30 +13:00
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
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
|
2021-06-26 04:07:13 +12:00
|
|
|
wget https://github.com/AppImage/pkg2appimage/releases/download/continuous/pkg2appimage-1807-x86_64.AppImage
|
|
|
|
chmod +x pkg2appimage-1807-x86_64.AppImage
|
|
|
|
./pkg2appimage-1807-x86_64.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
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
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:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
toolchain: ${{ matrix.toolchain }}
|
|
|
|
override: true
|
|
|
|
|
2022-07-30 05:26:28 +12:00
|
|
|
- name: Install Dependencies
|
|
|
|
run: sudo apt-get update; sudo apt install libgtk-4-dev libheif-dev librsvg2-dev wget fuse libfuse2 -y xvfb
|
2020-10-19 04:08:29 +13:00
|
|
|
|
2022-07-30 05:26:28 +12:00
|
|
|
- name: Test
|
|
|
|
run: xvfb-run cargo test
|
2020-10-19 04:08:29 +13:00
|
|
|
env:
|
|
|
|
CARGO_INCREMENTAL: 0
|
2022-07-30 05:26:28 +12:00
|
|
|
RUSTFLAGS: "-C debuginfo=0"
|