|
| 1 | +name: Rust |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches-ignore: "master" |
| 6 | + pull_request: |
| 7 | + |
| 8 | +env: |
| 9 | + SHELL: /bin/bash |
| 10 | + |
| 11 | +jobs: |
| 12 | + fmt: |
| 13 | + runs-on: macos-latest |
| 14 | + steps: |
| 15 | + - uses: actions/checkout@v2 |
| 16 | + - uses: dtolnay/rust-toolchain@stable |
| 17 | + - name: fmt check |
| 18 | + run: cargo fmt --all -- --check |
| 19 | + linux: |
| 20 | + runs-on: macos-latest |
| 21 | + steps: |
| 22 | + - uses: actions/checkout@v2 |
| 23 | + - uses: dtolnay/rust-toolchain@stable |
| 24 | + - name: build |
| 25 | + run: | |
| 26 | + cd webxr |
| 27 | + cargo build --features=glwindow,headless,googlevr |
| 28 | + cargo build --features=ipc,glwindow,headless,googlevr |
| 29 | + cargo build --features=glwindow,headless,profile |
| 30 | + rustup target add arm-linux-androideabi |
| 31 | + cargo build --target arm-linux-androideabi --features=ipc,googlevr |
| 32 | + mac: |
| 33 | + runs-on: macos-latest |
| 34 | + steps: |
| 35 | + - uses: actions/checkout@v2 |
| 36 | + - uses: dtolnay/rust-toolchain@stable |
| 37 | + - name: build |
| 38 | + run: | |
| 39 | + cd webxr |
| 40 | + cargo build --features=glwindow,headless,googlevr |
| 41 | + cargo build --features=ipc,glwindow,headless,googlevr |
| 42 | + cargo build --features=glwindow,headless,profile |
| 43 | + win: |
| 44 | + runs-on: windows-latest |
| 45 | + steps: |
| 46 | + - uses: actions/checkout@v2 |
| 47 | + - uses: dtolnay/rust-toolchain@stable |
| 48 | + - name: build |
| 49 | + run: | |
| 50 | + cd webxr |
| 51 | + cargo build --features=glwindow,headless,googlevr |
| 52 | + cargo build --features=ipc,glwindow,headless,googlevr |
| 53 | + cargo build --features=glwindow,headless,profile |
| 54 | + rustup target add aarch64-pc-windows-msvc |
| 55 | + cargo build --target=aarch64-pc-windows-msvc --features ipc,openxr-api |
| 56 | + build_result: |
| 57 | + name: homu build finished |
| 58 | + runs-on: ubuntu-latest |
| 59 | + needs: ["mac", "linux", "win", "fmt"] |
| 60 | + steps: |
| 61 | + - name: Mark the job as successful |
| 62 | + run: exit 0 |
| 63 | + if: success() |
| 64 | + - name: Mark the job as unsuccessful |
| 65 | + run: exit 1 |
| 66 | + if: "!success()" |
0 commit comments