File tree Expand file tree Collapse file tree 3 files changed +59
-15
lines changed Expand file tree Collapse file tree 3 files changed +59
-15
lines changed Original file line number Diff line number Diff line change 53
53
# of the testing takes
54
54
- name : cargo fetch
55
55
run : cargo fetch
56
- # See: https://github.com/EmbarkStudios/rust-gpu/issues/84
57
- - if : ${{ runner.os == 'macOS' }}
58
- name : Mac build tests
59
- run : cargo test --exclude example-runner --no-run
60
- - if : ${{ runner.os == 'macOS' }}
61
- name : Mac run tests
62
- run : cargo test --exclude example-runner
63
- - if : ${{ runner.os != 'macOS' }}
64
- name : Build tests
65
- run : cargo test --no-run
66
- - if : ${{ runner.os != 'macOS' }}
67
- name : Run tests
68
- run : cargo test
56
+ - name : Run tests
57
+ run : .github/workflows/test.sh
69
58
70
59
lint :
71
60
name : Lint
91
80
- name : cargo fetch
92
81
run : cargo fetch
93
82
- name : Clippy
94
- run : .github/workflows/run_clippy .sh
83
+ run : .github/workflows/clippy .sh
95
84
96
85
cargo-deny :
97
86
runs-on : ubuntu-latest
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
- set -ex
2
+ set -e
3
3
4
4
if [[ -z " ${CI} " ]]; then
5
5
FEAT=" use-compiled-tools"
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+ set -ex
3
+
4
+ if [[ -z " ${CI} " ]]; then
5
+ FEAT=" use-compiled-tools"
6
+ else
7
+ FEAT=" use-installed-tools"
8
+ fi
9
+
10
+ os=$1
11
+
12
+ function cargo_test() {
13
+ echo ::group::" $1 build"
14
+ cargo test \
15
+ --manifest-path " $1 /Cargo.toml" \
16
+ --no-default-features \
17
+ --features " $FEAT " \
18
+ --no-run
19
+ echo ::endgroup::
20
+
21
+ echo ::group::" $1 test"
22
+ cargo test \
23
+ --manifest-path " $1 /Cargo.toml" \
24
+ --no-default-features \
25
+ --features " $FEAT "
26
+ echo ::endgroup::
27
+ }
28
+
29
+ function cargo_test_no_features() {
30
+ echo ::group::" $1 build"
31
+ cargo test --manifest-path " $1 /Cargo.toml" --no-run
32
+ echo ::endgroup::
33
+
34
+ echo ::group::" $1 test"
35
+ cargo test --manifest-path " $1 /Cargo.toml"
36
+ echo ::endgroup::
37
+ }
38
+
39
+ # Core crates
40
+ cargo_test spirv-tools-sys
41
+ cargo_test spirv-tools
42
+ cargo_test rustc_codegen_spirv
43
+ cargo_test spirv-builder
44
+
45
+ # Examples
46
+ # See: https://github.com/EmbarkStudios/rust-gpu/issues/84
47
+ if [[ -z " ${CI} " && " $os " != " macOS" ]]; then
48
+ cargo_test examples/example-runner
49
+ fi
50
+
51
+ cargo_test examples/wgpu-example-runner
52
+
53
+ cargo_test_no_features examples/example-runner-cpu
54
+ cargo_test_no_features examples/example-shader
55
+ cargo_test_no_features examples/wgpu-example-shader
You can’t perform that action at this time.
0 commit comments