1
0
Fork 0
mirror of synced 2024-05-05 13:03:02 +12:00
czkawka/.github/workflows/linux.yml
2020-10-08 22:14:20 +02:00

145 lines
3.9 KiB
YAML

name: 🐧 Linux
on: [push, pull_request]
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' }}
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' }}
linux-gui-orbtk:
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-orbtk-${{github.ref}}-${{github.sha}}
restore-keys: |
linux-gui-orbtk-${{github.ref}}-${{github.sha}}
- name: Install basic libraries
run: sudo apt-get update; sudo apt install libgtk-3-dev -y
- name: Build GUI Orbtk Debug
run: cargo build --bin czkawka_gui_orbtk
env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-C debuginfo=0 -D warnings"
if: ${{ matrix.type == 'debug'}}
- name: Build GUI Orbtk Release
run: cargo build --release --bin czkawka_gui_orbtk
env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-C debuginfo=0 -D warnings"
if: ${{ matrix.type == 'release'}}
- name: Store Linux GUI Orbtk
uses: actions/upload-artifact@v2
with:
name: czkawka_gui_orbtk-${{ runner.os }}-${{ matrix.toolchain }}
path: target/release/czkawka_gui_orbtk
if: ${{ matrix.type == 'release' }}