-
Notifications
You must be signed in to change notification settings - Fork 6
118 lines (98 loc) · 3.11 KB
/
Copy pathrust.yml
File metadata and controls
118 lines (98 loc) · 3.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
name: Build and test
on:
workflow_dispatch:
inputs:
branch:
description: 'Branch to build'
type: string
required: false
default: 'master'
onWindows:
description: 'on windows latest!'
type: boolean
required: false
default: true
onUbuntu:
description: 'on ubuntu latest!'
type: boolean
required: false
default: true
permissions:
contents: write
actions: write
env:
CARGO_TERM_COLOR: always
CARGO_TERM_VERBOSE: true
RUST_BACKTRACE: 1
jobs:
build-windows:
runs-on: windows-latest
if: ${{ inputs.onWindows }}
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
ref: ${{ inputs.branch }}
- uses: lukka/get-cmake@v3.26.3
- name: Get Cache
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install StereoKit
run: cargo install -F event-loop --force --path .
- name: compile shaders
run: cargo compile_sks --options -f -t x
- name: Build event-loop
run: cargo build --verbose --features event-loop --example main_pc
- name: Run tests event-loop
run: cargo test --verbose --features event-loop
- name: Build no-event-loop
run: cargo build --verbose --features no-event-loop --example manual
- name: Run tests no-event-loop
run: cargo test --verbose --features no-event-loop
build-linux:
runs-on: ubuntu-latest
if: ${{ inputs.onUbuntu }}
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
ref: ${{ inputs.branch }}
- name: Get Cache
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install Prerequisites
run: |
sudo apt-get update
sudo apt-get install xvfb clang cmake lld ninja-build libx11-dev libxfixes-dev libegl-dev libgbm-dev libfontconfig-dev libxkbcommon-x11-0 libxkbcommon0
- name: Install StereoKit
run: cargo install -F event-loop --force --path .
- name: compile shaders
run: cargo compile_sks --options -f -t e
- name: Build event-loop
run: cargo build --verbose --features event-loop --example main_pc
- name: Run tests event-loop
run: |
export DISPLAY=:99
Xvfb -ac :99 -screen 0 1280x1024x16 > /dev/null 2>&1 &
cargo test --verbose --features event-loop -- --test-threads=1
- name: Build no-event-loop
run: cargo build --verbose --features no-event-loop --example manual
# - name: Run tests no-event-loop
# run: |
# export DISPLAY=:99
# Xvfb -ac :99 -screen 0 1280x1024x16 > /dev/null 2>&1 &
# cargo test --verbose --features no-event-loop -- --test-threads=1