Files
shinespark/.gitea/workflows/ci.yml
EIREXE 441e3d53b3
CI / build-and-test (push) Successful in 1m46s
Fix Rust cache reuse for dynamic linking (#37)
## Summary
- update rust-cache to v2.9.2, which preserves dynamic-linking target artifacts during cleanup
- rotate the cache prefix to invalidate the broken v1 cache

Reviewed-on: #37
Co-authored-by: Álex Román Núñez <eirexe@eirteam.moe>
2026-09-17 08:55:52 +00:00

53 lines
1.3 KiB
YAML

name: CI
on:
push:
branches:
- master
pull_request:
workflow_dispatch:
jobs:
build-and-test:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Check out source
uses: actions/checkout@v4
- name: Install Rust toolchain
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \
sh -s -- -y --profile minimal
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
"$HOME/.cargo/bin/rustup" toolchain install nightly-2026-09-14 --profile minimal
- name: Cache Rust dependencies and build artifacts
uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
with:
prefix-key: v2-rust
shared-key: linux-nightly
cache-bin: false
- name: Install Linux dependencies
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends -y \
clang \
libasound2-dev \
libudev-dev \
libusb-1.0-0-dev \
libwayland-dev \
libx11-dev \
libxkbcommon-dev \
libxkbcommon-x11-0 \
mesa-vulkan-drivers \
mold \
pkg-config
- name: Build
run: cargo build --locked -j 4
- name: Run unit tests
run: cargo test --locked --lib -j 4