1
0
Fork 0
mirror of synced 2024-06-02 10:35:02 +12:00

Smaller amount of workflows

This commit is contained in:
Rafał Mikrut 2022-07-29 18:45:41 +02:00
parent e8259915d8
commit 7ff823b6e9
2 changed files with 51 additions and 111 deletions

View file

@ -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
- name: Build 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 Release Heif
run: cargo build --release --bin czkawka_cli --features heif
env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-C debuginfo=0"
if: ${{ matrix.type == 'release'}}
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_cli-${{ 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 Dependencies
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:
@ -214,8 +158,8 @@ jobs:
- 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
env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-C debuginfo=0"
@ -236,6 +180,23 @@ jobs:
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:

View file

@ -31,8 +31,17 @@ jobs:
restore-keys: |
mac-cli-${{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' }}