Skip to content

Commit

Permalink
CI
Browse files Browse the repository at this point in the history
  • Loading branch information
qarmin committed Nov 20, 2023
1 parent 238e3a1 commit 0b2b723
Show file tree
Hide file tree
Showing 4 changed files with 106 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/linux_cli_eyra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- uses: actions/checkout@v3

- name: Install basic libraries
run: sudo apt-get update; sudo apt install -y
run: sudo apt-get update; sudo apt install -y ffmpeg

- name: Setup rust version
run: rustup default ${{ matrix.toolchain }}
Expand Down
59 changes: 52 additions & 7 deletions .github/workflows/linux_gui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,50 @@ env:
CARGO_TERM_COLOR: always

jobs:
linux-krokiet-gui:
strategy:
matrix:
toolchain: [ stable, 1.72.1 ]
type: [ release ]
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3

- name: Install basic libraries
run: sudo apt-get update; sudo apt install libgtk-4-dev libheif-dev -y

- name: Setup rust version
run: rustup default ${{ matrix.toolchain }}

- name: Build Release Krokiet
run: cargo build --release --bin krokiet
env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-C debuginfo=0"
if: ${{ (matrix.type == 'release') }}

- name: Store Linux GUI Krokiet
uses: actions/upload-artifact@v3
with:
name: krokiet-${{ runner.os }}-${{ matrix.toolchain }}
path: target/release/krokiet
if: ${{ matrix.type == 'release' }}

- name: Build Release Krokiet heif
run: cargo build --release --bin krokiet --features heif
env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-C debuginfo=0"
if: ${{ (matrix.type == 'release') }}

- name: Store Linux GUI Krokiet heif
uses: actions/upload-artifact@v3
with:
name: krokiet-${{ runner.os }}-${{ matrix.toolchain }}-heif
path: target/release/krokiet
if: ${{ matrix.type == 'release' }}


linux-gui:
strategy:
matrix:
Expand All @@ -25,32 +69,33 @@ jobs:
run: rustup default ${{ matrix.toolchain }}

- name: Build Release Heif
run: cargo build --release --features heif
run: cargo build --release --bin czkawka_gui --features heif
env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-C debuginfo=0"
if: ${{ (matrix.type == 'release') && (matrix.toolchain == '1.72.1') }}
if: ${{ (matrix.type == 'release') }}

- name: Store Linux GUI Heif
uses: actions/upload-artifact@v3
with:
name: czkawka_gui-${{ runner.os }}-${{ matrix.toolchain }}-heif
path: target/release/czkawka_gui
if: ${{ matrix.type == 'release' }}
if: ${{ (matrix.type == 'release') && (matrix.toolchain == 'stable') }}

- name: Build Release
run: cargo build --release
run: cargo build --release --bin czkawka_gui
env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-C debuginfo=0"
if: ${{ (matrix.type == 'release') && (matrix.toolchain == 'stable') }}
if: ${{ (matrix.type == 'release') }}

# Only store stable toolchain
- name: Store Linux GUI
uses: actions/upload-artifact@v3
with:
name: czkawka_gui-${{ runner.os }}-${{ matrix.toolchain }}
path: target/release/czkawka_gui
if: ${{ matrix.type == 'release' }}
if: ${{ (matrix.type == 'release') && (matrix.toolchain == 'stable') }}

linux-appimage-gui:
strategy:
Expand All @@ -68,7 +113,7 @@ jobs:
run: rustup default ${{ matrix.toolchain }}

- name: Build Release
run: cargo build --release
run: cargo build --release --bin czkawka_gui
env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-C debuginfo=0"
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,13 @@ jobs:
path: target/release/czkawka_gui
if: ${{ matrix.type == 'release' }}

- name: Store MacOS Krokiet
uses: actions/upload-artifact@v3
with:
name: czkawka_gui-${{ runner.os }}-${{ matrix.toolchain }}
path: target/release/krokiet
if: ${{ matrix.type == 'release' }}

- name: Build Release Heif
run: cargo build --release --features heif
env:
Expand All @@ -68,4 +75,11 @@ jobs:
with:
name: czkawka_gui-${{ runner.os }}-${{ matrix.toolchain }}-heif
path: target/release/czkawka_gui
if: ${{ matrix.type == 'release' }}

- name: Store MacOS Krokiet Heif
uses: actions/upload-artifact@v3
with:
name: czkawka_gui-${{ runner.os }}-${{ matrix.toolchain }}-heif
path: target/release/krokiet
if: ${{ matrix.type == 'release' }}
39 changes: 39 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,47 @@ env:
CARGO_TERM_COLOR: always

jobs:
krokiet:
strategy:
fail-fast: false
matrix:
use_heif: [ normal ]
runs-on: windows-latest
steps:
- uses: actions/checkout@v3

- name: Setup rust version
run: rustup default ${{ matrix.toolchain }}

- name: Compile Krokiet
run: cargo build --release --bin krokiet

- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: krokiet-windows-${{ github.sha }}-${{ matrix.use_heif }}
path: |
target/release/krokiet.exe
if-no-files-found: error

- name: Show console window on windows
run: sed -i 's|\#\!\[windows_subsystem|//#![windows_subsystem|' czkawka_gui/src/main.rs

- name: Compile Krokiet Console
run: cargo build --release --bin krokiet

- name: Upload artifacts Console
uses: actions/upload-artifact@v3
with:
name: krokiet-windows-${{ github.sha }}-${{ matrix.use_heif }}-console
path: |
target/release/krokiet.exe
if-no-files-found: error


container:
strategy:
fail-fast: false
matrix:
use_heif: [ non_heif ] #, heif ] - heif problems with mingw
runs-on: ubuntu-22.04
Expand Down

0 comments on commit 0b2b723

Please sign in to comment.