Skip to content

🐧 Linux

🐧 Linux #271

Workflow file for this run

name: 🐧 Linux
on:
push:
pull_request:
schedule:
- cron: '0 0 * * 2'
env:
CARGO_TERM_COLOR: always
jobs:
linux-default:
strategy:
matrix:
toolchain: [ stable, 1.69.0 ]
type: [ release ]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Setup rust version
run: rustup default ${{ matrix.toolchain }}
- name: Install basic libraries
run: sudo apt-get update; sudo apt install libgtk-4-dev -y
- name: Build Release
run: cargo build --release
env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-C debuginfo=0"
if: ${{ matrix.type == 'release' }}
- name: Store Linux GUI
uses: actions/upload-artifact@v3
with:
name: szyszka-${{ runner.os }}-${{ matrix.toolchain }}
path: target/release/szyszka
if: ${{ matrix.type == 'release' }}
linux-appimage-gui:
strategy:
matrix:
toolchain: [ stable ]
type: [ release ]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Setup rust version
run: rustup default ${{ matrix.toolchain }}
- name: Install Dependencies
run: sudo apt-get update; sudo apt install libgtk-4-dev librsvg2-dev wget fuse libfuse2 -y
- 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/szyszka AppDir/usr/bin
./linuxdeploy-x86_64.AppImage --appdir AppDir --plugin gtk --output appimage --icon-file data/icons/com.github.qarmin.szyszka.svg --desktop-file data/com.github.qarmin.szyszka.desktop
- name: Store Linux Appimage GUI
uses: actions/upload-artifact@v3
with:
name: szyszka-appimage-${{ runner.os }}-${{ matrix.toolchain }}
path: Szyszka*.AppImage
- name: Minimal AppImage
run: |
pwd
rm -rf szyszka
cp target/release/szyszka .
strip szyszka
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/szyszka-appimage-recipe.yml
mv out/Szyszka*.AppImage out/szyszka-minimal.AppImage
- name: Minimal Appimage Upload
uses: actions/upload-artifact@v3
with:
name: szyszka-${{ matrix.toolchain }}_minimal_AppImage
path: out/*.AppImage
linux-tests:
strategy:
matrix:
toolchain: [ stable ]
type: [ debug ]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Setup rust version
run: rustup default ${{ matrix.toolchain }}
- name: Install Dependencies
run: sudo apt-get update; sudo apt install libgtk-4-dev librsvg2-dev wget fuse libfuse2 -y xvfb
- name: Test
run: xvfb-run cargo test
env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-C debuginfo=0"