2022-11-26 08:38:27 +13:00
|
|
|
name: 🐧 Linux GUI
|
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-11-26 08:38:27 +13:00
|
|
|
linux-gui:
|
2020-10-08 00:17:30 +13:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2023-03-06 08:54:02 +13:00
|
|
|
toolchain: [ stable, 1.67.1 ]
|
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:
|
2022-11-26 08:38:27 +13:00
|
|
|
- uses: actions/checkout@v3
|
2020-10-08 00:17:30 +13:00
|
|
|
|
|
|
|
- uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
toolchain: ${{ matrix.toolchain }}
|
|
|
|
override: true
|
|
|
|
|
2022-11-26 08:38:27 +13:00
|
|
|
- uses: actions/cache@v3
|
2020-10-08 00:17:30 +13:00
|
|
|
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"
|
2023-03-06 08:54:02 +13:00
|
|
|
if: ${{ (matrix.type == 'release') && (matrix.toolchain == '1.67.1') }}
|
2022-07-30 05:26:28 +12:00
|
|
|
|
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
|
|
|
|
2022-07-30 05:26:28 +12:00
|
|
|
- name: Store Linux GUI
|
2022-11-26 08:38:27 +13:00
|
|
|
uses: actions/upload-artifact@v3
|
2022-07-30 05:26:28 +12:00
|
|
|
with:
|
|
|
|
name: czkawka_gui-${{ runner.os }}-${{ matrix.toolchain }}
|
|
|
|
path: target/release/czkawka_gui
|
|
|
|
if: ${{ matrix.type == 'release' }}
|
|
|
|
|
|
|
|
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:
|
2022-11-26 08:38:27 +13:00
|
|
|
- uses: actions/checkout@v3
|
2020-10-08 00:17:30 +13:00
|
|
|
|
|
|
|
- uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
toolchain: ${{ matrix.toolchain }}
|
|
|
|
override: true
|
|
|
|
|
2022-11-26 08:38:27 +13:00
|
|
|
- uses: actions/cache@v3
|
2020-10-08 00:17:30 +13:00
|
|
|
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
|
|
|
|
2023-04-03 03:34:25 +12:00
|
|
|
- name: Download appimage dependencies
|
2022-07-30 05:26:28 +12:00
|
|
|
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
|
2022-11-26 08:38:27 +13:00
|
|
|
uses: actions/upload-artifact@v3
|
2020-10-08 00:17:30 +13:00
|
|
|
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
|
2022-11-26 08:38:27 +13:00
|
|
|
uses: actions/upload-artifact@v3
|
2021-05-17 04:39:40 +12:00
|
|
|
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:
|
2022-11-26 08:38:27 +13:00
|
|
|
- uses: actions/checkout@v3
|
2020-10-19 04:08:29 +13:00
|
|
|
|
|
|
|
- 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
|
2023-04-03 03:34:25 +12:00
|
|
|
RUSTFLAGS: "-C debuginfo=0"
|