Files
pomomon-garden/.gitea/workflows/ci.yaml
demenik 82bf4b6ced
Some checks failed
Gitea CI / Run Tests (push) Successful in 41m7s
Gitea CI / Build Linux (push) Failing after 10m19s
fix: Exclude target dir from CI cache to reduce size
2025-12-21 01:00:31 +01:00

67 lines
2.1 KiB
YAML

name: Gitea CI
on:
push:
branches:
- 'main'
- 'dev'
jobs:
test:
name: Run Tests
runs-on: ubuntu-latest
container:
image: rust:slim
steps:
- name: Install System Dependencies
run: |
apt-get update -yq
apt-get install -yq git g++ pkg-config libx11-dev libasound2-dev libudev-dev libxkbcommon-x11-0 libwayland-dev nodejs libssl-dev
- name: Checkout
uses: actions/checkout@v4
- name: Cache Cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Run Tests
run: cargo test --verbose --workspace --package pomomon-garden
build:
name: Build Linux
needs: test
runs-on: ubuntu-latest
container:
image: rust:slim
steps:
- name: Install System Dependencies
run: |
apt-get update -yq
apt-get install -yq git g++ pkg-config libx11-dev libasound2-dev libudev-dev libxkbcommon-x11-0 libwayland-dev nodejs libssl-dev
- name: Checkout
uses: actions/checkout@v4
- name: Cache Cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Build Release
run: cargo build --release --target x86_64-unknown-linux-gnu
- name: Get Short SHA
id: slug
run: echo "sha8=$(echo ${GITHUB_SHA} | cut -c1-8)" >> $GITHUB_OUTPUT
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: pomomon-garden-linux-x86_64-${{ steps.slug.outputs.sha8 }}
path: target/x86_64-unknown-linux-gnu/release/pomomon-garden
retention-days: 14