name: Check Wayland+OpenXR

on:
  pull_request:
    #branches: [ "main" ]

env:
  CARGO_TERM_COLOR: always
  SCCACHE_GHA_ENABLED: "true"
  RUSTC_WRAPPER: "sccache"

jobs:
  build:
    runs-on: ubuntu-22.04
    defaults:
      run:
        working-directory: ./wlx-overlay-s
    steps:
    - uses: actions/checkout@v4
    - name: Setup sccache
      uses: mozilla-actions/sccache-action@v0.0.9
    - name: Prepare Environment
      run: |
        ../.github/workflows/scripts/appimage_prepare_env.sh
    - name: Build
      run: cargo build --verbose --no-default-features --features=wayland,openxr
    - name: Run tests
      run: cargo test --verbose --no-default-features --features=wayland,openxr
