17
17
runs-on : " ubuntu-22.04"
18
18
env :
19
19
RUSTFLAGS : " -D warnings"
20
+ strategy :
21
+ matrix :
22
+ api_version : ["4-1", "4-2", "4-3"]
20
23
21
24
steps :
22
25
- name : Checkout
@@ -30,19 +33,11 @@ jobs:
30
33
- name : Build Debug
31
34
run : |
32
35
set -o pipefail
33
- cargo build --workspace --all-features --message-format json | clippy-sarif | tee rust-build-results.sarif | sarif-fmt
34
- - name : Build Debug Runtime
35
- run : |
36
- set -o pipefail
37
- cargo build -p godot-rust-script --features "runtime" --message-format json | clippy-sarif | tee rust-build-results.sarif | sarif-fmt
38
- - name : Build Debug Scripts
39
- run : |
40
- set -o pipefail
41
- cargo build -p godot-rust-script --features "scripts" --message-format json | clippy-sarif | tee rust-build-results.sarif | sarif-fmt
36
+ cargo build --workspace --features "godot/api-${{ matrix.api_version}}" --all-features --message-format json | clippy-sarif | tee rust-build-results.sarif | sarif-fmt
42
37
- name : Build Release
43
38
run : |
44
39
set -o pipefail
45
- cargo build --release --workspace --all-features --message-format json | clippy-sarif | tee rust-build-results.sarif | sarif-fmt
40
+ cargo build --release --workspace --features "godot/api-${{ matrix.api_version}}" -- all-features --message-format json | clippy-sarif | tee rust-build-results.sarif | sarif-fmt
46
41
- name : Upload Results
47
42
uses : github/codeql-action/upload-sarif@v2
48
43
if : ${{ always() }}
52
47
53
48
clippy :
54
49
runs-on : " ubuntu-22.04"
50
+ strategy :
51
+ matrix :
52
+ api_version : ["4-1", "4-2", "4-3"]
55
53
56
54
steps :
57
55
- name : Checkout
@@ -65,27 +63,49 @@ jobs:
65
63
- name : Checks
66
64
run : |
67
65
set -o pipefail
68
- cargo clippy --message-format json --workspace --all-features -- -D warnings | clippy-sarif | tee rust-clippy-results.sarif | sarif-fmt
66
+ cargo clippy --message-format json --workspace --all-features --features "godot/api-${{ matrix.api_version}}" -- -D warnings | clippy-sarif | tee rust-clippy-results.sarif | sarif-fmt
69
67
- name : Upload Results
70
- uses : github/codeql-action/upload-sarif@v2
68
+ uses : github/codeql-action/upload-sarif@v3
71
69
if : ${{ always() }}
72
70
with :
73
71
sarif_file : rust-clippy-results.sarif
74
72
wait-for-processing : true
75
73
76
74
tests :
77
75
runs-on : " ubuntu-22.04"
76
+ strategy :
77
+ matrix :
78
+ api_version : ["4-1", "4-2", "4-3", "custom"]
78
79
79
80
steps :
80
81
- name : Checkout
81
82
uses : actions/checkout@v3
83
+
82
84
- name : Setup Cache
83
85
uses : Swatinem/rust-cache@v2
84
86
with :
85
87
cache-on-failure : true
88
+
89
+ - name : Install ENV
90
+ run : |
91
+ eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
92
+ brew install nushell
93
+
94
+ - name : Download Godot Prerelease
95
+ id : prerelease_setup
96
+ if : ${{ matrix.api_version == 'custom' }}
97
+ run : |
98
+ eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
99
+ brew install llvm
100
+ GODOT4_BIN="$(./download_godot_dev.nu)"
101
+ echo "godot4_bin=$GODOT4_BIN" >> "$GITHUB_OUTPUT"
102
+
86
103
- name : Tests
104
+ env :
105
+ LLVM_PATH : " /home/linuxbrew/.linuxbrew/opt/llvm/bin"
106
+ GODOT4_BIN : ${{ steps.prerelease_setup.outputs.godot4_bin }}
87
107
run : |
88
- cargo test
108
+ cargo test --features "godot/api-${{ matrix.api_version}}"
89
109
90
110
license :
91
111
runs-on : " ubuntu-22.04"
0 commit comments