2
0
mirror of https://github.com/qarmin/czkawka synced 2024-11-16 06:12:48 +00:00
czkawka/.github/workflows/linux.yml

218 lines
6.9 KiB
YAML
Raw Normal View History

2020-10-07 11:17:30 +00:00
name: 🐧 Linux
2020-10-08 20:15:46 +00:00
on: [ push, pull_request ]
2020-10-07 11:17:30 +00:00
env:
CARGO_TERM_COLOR: always
jobs:
linux-cli:
strategy:
matrix:
toolchain: [ stable ]
type: [ release ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
override: true
- uses: actions/cache@v2
with:
path: |
target
key: linux-cli-${{github.ref}}-${{github.sha}}
restore-keys: |
linux-cli-${{github.ref}}-${{github.sha}}
- name: Install basic libraries
run: sudo apt-get update; sudo apt install libgtk-3-dev -y
- name: Build CLI Debug
run: cargo build --bin czkawka_cli
env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-C debuginfo=0 -D warnings"
if: ${{ matrix.type == 'debug'}}
- name: Build CLI Release
run: cargo build --release --bin czkawka_cli
env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-C debuginfo=0 -D warnings"
if: ${{ matrix.type == 'release'}}
- 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' }}
# Duplicate finder checks included and excluded directories
# Others are just check delete files number
- 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
target/release/czkawka_cli dup -d "$(pwd)/TestSuite" -D aen
python3 misc/check_results.py TestSuite 7 8
rm -rf TestSuite
unzip TestSuite.zip -d TestSuite
target/release/czkawka_cli dup -d "$(pwd)/TestSuite" -D aen
python3 misc/check_results.py TestSuite 7 8
rm -rf TestSuite
unzip TestSuite.zip -d TestSuite
target/release/czkawka_cli dup -d "$(pwd)/TestSuite" -x TEXT -D aeo
python3 misc/check_results.py TestSuite 14 8
rm -rf TestSuite
unzip TestSuite.zip -d TestSuite
target/release/czkawka_cli dup -d "$(pwd)/TestSuite" -e "$(pwd)/TestSuite/SubFolder" -D aeo
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
target/release/czkawka_cli dup -d "$(pwd)/TestSuite" -R
python3 misc/check_results.py TestSuite 15 8
target/release/czkawka_cli dup -d "$(pwd)/TestSuite" -R -D aeo
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
if: ${{ matrix.type == 'release' }}
2020-10-07 11:17:30 +00:00
linux-gui:
strategy:
matrix:
toolchain: [ stable ]
type: [ release ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
override: true
- uses: actions/cache@v2
with:
path: |
target
key: linux-gui-${{github.ref}}-${{github.sha}}
restore-keys: |
linux-gui-${{github.ref}}-${{github.sha}}
- name: Install Gtk, Mingw, unzip, zip and wget
run: sudo apt-get update; sudo apt install libgtk-3-dev -y
- name: Build GUI Debug
run: cargo build --bin czkawka_gui
env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-C debuginfo=0 -D warnings"
if: ${{ matrix.type == 'debug'}}
- name: Build GUI Release
run: cargo build --release --bin czkawka_gui
env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-C debuginfo=0 -D warnings"
if: ${{ matrix.type == 'release'}}
- 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' }}
2020-10-18 15:08:29 +00:00
linux-appimage-gui:
strategy:
matrix:
toolchain: [ stable ]
type: [ release ]
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
override: true
- uses: actions/cache@v2
with:
path: |
target
key: linux-appimage-gui-${{github.ref}}-${{github.sha}}
restore-keys: |
linux-appimage-gui-${{github.ref}}-${{github.sha}}
- name: Install Gtk,
run: sudo apt-get update; sudo apt install libgtk-3-dev librsvg2-dev wget -y
- name: Build GUI Release
run: cargo build --release --bin czkawka_gui
env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-C debuginfo=0 -D warnings"
- name: Download appimage dependiences
run: |
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
cp target/release/czkawka_gui AppDir/usr/bin
2020-12-17 15:45:55 +00:00
./linuxdeploy-x86_64.AppImage --appdir AppDir --plugin gtk --output appimage --icon-file data/icons/com.github.qarmin.czkawka.svg --desktop-file pkgs/com.github.qarmin.czkawka.desktop
2020-10-18 15:08:29 +00:00
- name: Store Linux Appimage GUI
uses: actions/upload-artifact@v2
with:
name: czkawka_gui-appimage-${{ runner.os }}-${{ matrix.toolchain }}
path: Czkawka*.AppImage