Files
jmb-bar/.gitea/workflows/build.yaml
jmb05 3285353006
Some checks failed
Build Project / Build Linux (push) Failing after 1m40s
Add cache step and missing dependency
2026-11-03 01:31:23 +01:00

64 lines
1.5 KiB
YAML

name: Build Project
on:
push:
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
build:
name: Build Linux
runs-on: ubuntu-26.04
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Print Os release
run: cat /etc/os-release
- name: Cache Cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
build-essential \
pkg-config \
libgtk-4-dev \
libgtk4-layer-shell-dev \
libudev-dev
- name: Install Rust
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs \
| sh -s -- -y --profile minimal --default-toolchain stable
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
- name: Install Rust components
run: |
rustup component add rustfmt clippy
- name: Check formatting
run: cargo fmt --all -- --check
- name: Run Clippy
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Run tests
run: cargo test --locked
- name: Build release binaries
run: cargo build --locked --release --bins