Files
wayvr/.github/workflows/build-default.yml
2026-11-25 14:49:56 +09:00

45 lines
1.1 KiB
YAML

name: Check Default
on:
pull_request:
#branches: [ "!main" ]
env:
CARGO_TERM_COLOR: always
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
jobs:
build:
runs-on: ubuntu-24.04
defaults:
run:
working-directory: ./wayvr
steps:
- uses: actions/checkout@v4
- name: Setup sccache
uses: mozilla-actions/[email protected]
- name: Prepare Environment
run: |
../.github/workflows/scripts/appimage_prepare_env.sh
- name: Run cargo fmt
run: cargo fmt --check
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
- name: Check Features
run: |
fails=""
for features in "openxr,wayland,osc,whisper" "openvr,x11" "openvr,openxr,osc" "openvr,openxr,wayland,x11,whisper"; do
cargo check --no-default-features --features "$features" || fails="$fails $features"
done
if [ -n "$fails" ]; then
echo "failed checks:$fails"
exit 1
fi
- name: Build
run: cargo build --verbose
- name: Run clippy
run: cargo clippy -- -D warnings
- name: Run tests
run: cargo test --verbose