mirror of
https://github.com/wayvr-org/wayvr.git
synced 2026-11-30 22:02:44 -08:00
45 lines
1.1 KiB
YAML
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
|