diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 3e5c17f..12d4f15 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -9,10 +9,10 @@ env: CARGO_TERM_COLOR: always jobs: - linux-cli: + linux-default: strategy: matrix: - toolchain: [ stable ] + toolchain: [ stable, 1.60.0 ] type: [ release ] runs-on: ubuntu-22.04 steps: @@ -27,19 +27,26 @@ jobs: with: path: | target - key: linux-cli-${{github.ref}}-${{github.sha}} + key: linux-default-${{github.ref}}-${{github.sha}} restore-keys: | - linux-cli-${{github.ref}}-${{github.sha}} + linux-default-${{github.ref}}-${{github.sha}} - name: Install basic libraries run: sudo apt-get update; sudo apt install libgtk-4-dev libheif-dev -y - - name: Build CLI Release - run: cargo build --release --bin czkawka_cli --features heif + - name: Build Release + run: cargo build --release env: CARGO_INCREMENTAL: 0 RUSTFLAGS: "-C debuginfo=0" - if: ${{ matrix.type == 'release'}} + if: ${{ (matrix.type == 'release') && (matrix.toolchain == '1.60.0') }} + + - name: Build Release Heif + run: cargo build --release --features heif + env: + CARGO_INCREMENTAL: 0 + RUSTFLAGS: "-C debuginfo=0" + if: ${{ (matrix.type == 'release') && (matrix.toolchain == 'stable') }} - name: Store Linux CLI uses: actions/upload-artifact@v2 @@ -48,6 +55,13 @@ jobs: path: target/release/czkawka_cli 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' }} + # Duplicate finder checks included and excluded directories # Others are just check delete files number - name: Linux Regression Test @@ -118,76 +132,6 @@ jobs: 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' }} - - linux-gui: - strategy: - matrix: - toolchain: [ stable, 1.60.0 ] - type: [ release ] - runs-on: ubuntu-22.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-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-4-dev fuse libfuse2 - if: ${{ matrix.toolchain == '1.60.0' }} - - - name: Install Gtk, Mingw, unzip, zip and wget and libheif - run: sudo apt-get update; sudo apt install libgtk-4-dev fuse libfuse2 libheif-dev -y - if: ${{ matrix.toolchain == 'stable' }} - - - name: Build GUI Release - run: cargo build --release --bin czkawka_gui - env: - CARGO_INCREMENTAL: 0 - RUSTFLAGS: "-C debuginfo=0" - if: ${{ (matrix.type == 'release') && (matrix.toolchain == '1.60.0') }} - - - name: Build GUI Release - run: cargo build --release --bin czkawka_gui --features heif - env: - CARGO_INCREMENTAL: 0 - RUSTFLAGS: "-C debuginfo=0" - if: ${{ (matrix.type == 'release') && (matrix.toolchain == 'stable') }} - - - 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' }} - - - name: Minimal AppImage - run: | - pwd - rm -rf czkawka_gui - cp target/release/czkawka_gui . - strip czkawka_gui - 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 - mv out/Czkawka*.AppImage out/czkawka_gui-minimal.AppImage - - - name: Minimal Appimage Upload - uses: actions/upload-artifact@v2 - with: - name: czkawka_gui-${{ matrix.toolchain }}_minimal_AppImage - path: out/*.AppImage - linux-appimage-gui: strategy: @@ -211,22 +155,24 @@ jobs: restore-keys: | linux-appimage-gui-${{github.ref}}-${{github.sha}} - - name: Install Gtk, + - name: Install Dependencies run: sudo apt-get update; sudo apt install libgtk-4-dev libheif-dev librsvg2-dev wget fuse libfuse2 -y - - name: Build GUI Release - run: cargo build --release --bin czkawka_gui + - name: Build Release + run: cargo build --release env: CARGO_INCREMENTAL: 0 RUSTFLAGS: "-C debuginfo=0" - 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 @@ -235,3 +181,43 @@ jobs: with: name: czkawka_gui-appimage-${{ runner.os }}-${{ matrix.toolchain }} path: Czkawka*.AppImage + + - name: Minimal AppImage + run: | + pwd + rm -rf czkawka_gui + cp target/release/czkawka_gui . + strip czkawka_gui + 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 + mv out/Czkawka*.AppImage out/czkawka_gui-minimal.AppImage + + - name: Minimal Appimage Upload + uses: actions/upload-artifact@v2 + with: + name: czkawka_gui-${{ matrix.toolchain }}_minimal_AppImage + path: out/*.AppImage + + linux-tests: + strategy: + matrix: + toolchain: [ stable ] + type: [ debug ] + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v2 + + - uses: actions-rs/toolchain@v1 + with: + toolchain: ${{ matrix.toolchain }} + override: true + + - name: Install Dependencies + run: sudo apt-get update; sudo apt install libgtk-4-dev libheif-dev librsvg2-dev wget fuse libfuse2 -y xvfb + + - name: Test + run: xvfb-run cargo test + env: + CARGO_INCREMENTAL: 0 + RUSTFLAGS: "-C debuginfo=0" \ No newline at end of file diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml index e188529..a4632cb 100644 --- a/.github/workflows/mac.yml +++ b/.github/workflows/mac.yml @@ -27,12 +27,21 @@ jobs: with: path: | target - key: mac-cli-${{github.ref}}-${{github.sha}} + key: mac-${{github.ref}}-${{github.sha}} restore-keys: | - mac-cli-${{github.ref}}-${{github.sha}} + mac-${{github.ref}}-${{github.sha}} - - name: Build CLI Release - run: cargo build --release --bin czkawka_cli --features heif + - name: Install Homebrew + run: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" + + - name: Override link[WORKAROUND] # Looks that this is a bug with current homebrew or GitHub CI + run: rm '/usr/local/bin/2to3' + + - name: Install GTK4 + run: brew install rust gtk4 libheif + + - name: Build Release + run: cargo build --release --features heif env: CARGO_INCREMENTAL: 0 RUSTFLAGS: "-C debuginfo=0 -D warnings" @@ -45,39 +54,9 @@ jobs: path: target/release/czkawka_cli if: ${{ matrix.type == 'release' }} - macos-gui: - strategy: - matrix: - toolchain: [ stable ] - type: [ release ] - runs-on: macos-latest - steps: - - uses: actions/checkout@v2 - - - uses: actions-rs/toolchain@v1 - with: - toolchain: ${{ matrix.toolchain }} - override: true - - - name: Install Homebrew - run: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" - - - name: Override link[WORKAROUND] # Looks that this is a bug with current homebrew or GitHub CI - run: rm '/usr/local/bin/2to3' - - - name: Install GTK4 - run: brew install rust gtk4 libheif - - - name: Build GUI Release - run: cargo build --release --bin czkawka_gui --features heif - env: - CARGO_INCREMENTAL: 0 - RUSTFLAGS: "-C debuginfo=0 -D warnings" - if: ${{ matrix.type == 'release'}} - - name: Store MacOS GUI uses: actions/upload-artifact@v2 with: name: czkawka_gui-${{ runner.os }}-${{ matrix.toolchain }} path: target/release/czkawka_gui - if: ${{ matrix.type == 'release' }} + if: ${{ matrix.type == 'release' }} \ No newline at end of file