-
-
Notifications
You must be signed in to change notification settings - Fork 6
154 lines (144 loc) · 4.35 KB
/
push.yaml
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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
name: push
on:
push:
branches:
- main
pull_request:
env:
# For setup-rust, see https://github.com/moonrepo/setup-rust/issues/22
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
install-cargo-gpu:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
env:
RUST_LOG: debug
RUNNER_OS: ${{ matrix.os }}
outputs:
cachepath-macOS: ${{ steps.cachepathstep.outputs.cachepath-macOS }}
cachepath-Linux: ${{ steps.cachepathstep.outputs.cachepath-Linux }}
cachepath-Windows: ${{ steps.cachepathstep.outputs.cachepath-macOS }}
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v4
with:
path: ~/.cargo
key: cargo-cache-${{ runner.os }}
- uses: moonrepo/setup-rust@v1
- run: rustup default stable
- run: rustup update
- run: cargo install --git https://github.com/rust-gpu/cargo-gpu cargo-gpu
- id: cachepathstep
run: |
CACHE_PATH=`cargo gpu show --cache-directory`
echo $CACHE_PATH
echo "cachepath-$RUNNER_OS=$CACHE_PATH" >> "$GITHUB_OUTPUT"
renderling-build-shaders:
needs: install-cargo-gpu
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
env:
RUST_LOG: debug
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v4
with:
path: ~/.cargo
key: cargo-cache-${{ runner.os }}
- uses: actions/cache@v4
with:
path: ${{ needs.install-cargo-gpu.outputs.cachepath }}
key: rust-gpu-cache-${{ runner.os }}
- uses: moonrepo/setup-rust@v1
- run: rm -rf crates/renderling/src/linkage/* crates/renderling/shaders
- run: cargo shaders
- run: cargo build -p renderling
- run: git diff --exit-code --no-ext-diff
renderling-clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: moonrepo/setup-rust@v1
- run: cargo clippy
renderling-build-example:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: moonrepo/setup-rust@v1
- run: cargo build -p example
renderling-test-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: moonrepo/setup-rust@v1
- run: sudo apt-get -y install mesa-vulkan-drivers libvulkan1 vulkan-tools vulkan-validationlayers
- run: cargo test
env:
RUST_BACKTRACE: 1
- uses: actions/upload-artifact@v4
if: always()
with:
name: test-output-linux
path: test_output/**/*.png
renderling-test-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: moonrepo/setup-rust@v1
- run: cargo test
env:
RUST_BACKTRACE: 1
- uses: actions/upload-artifact@v4
if: always()
with:
name: test-output-macos
path: test_output/**/*.png
renderling-test-windows:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: moonrepo/setup-rust@v1
- run: cargo test
env:
RUST_BACKTRACE: 1
- uses: actions/upload-artifact@v4
if: always()
with:
name: test-output-windows
path: test_output/**/*.png
# various linuxes w/ physical gpus
# renderling-test-linux-other:
# continue-on-error: true
# strategy:
# matrix:
# label: [intel, amd, pi4]
# runs-on: ${{ matrix.label }}
# steps:
# - uses: actions/checkout@v2
# - uses: moonrepo/setup-rust@v1
# with:
# cache: false
# - uses: Swatinem/rust-cache@v2
# with:
# cache-all-crates: "true"
# cache-on-failure: "true"
# - run: apt-get -q -y update && apt-get -q -y install mesa-vulkan-drivers libvulkan1 vulkan-tools vulkan-validationlayers
# - run: cargo test -j 1 -- --test-threads=1 --nocapture
# continue-on-error: ${{ matrix.label == 'pi4' }}
# env:
# RUST_BACKTRACE: 1
# - uses: actions/upload-artifact@v4
# if: always()
# with:
# name: test-output-${{ matrix.label }}
# path: test_output/**/*.png