1717 runs-on : " ubuntu-22.04"
1818 env :
1919 RUSTFLAGS : " -D warnings"
20+ strategy :
21+ matrix :
22+ api_version : ["4-1", "4-2", "4-3"]
2023
2124 steps :
2225 - name : Checkout
@@ -30,19 +33,11 @@ jobs:
3033 - name : Build Debug
3134 run : |
3235 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
4237 - name : Build Release
4338 run : |
4439 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
4641 - name : Upload Results
4742 uses : github/codeql-action/upload-sarif@v2
4843 if : ${{ always() }}
5247
5348 clippy :
5449 runs-on : " ubuntu-22.04"
50+ strategy :
51+ matrix :
52+ api_version : ["4-1", "4-2", "4-3"]
5553
5654 steps :
5755 - name : Checkout
@@ -65,27 +63,49 @@ jobs:
6563 - name : Checks
6664 run : |
6765 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
6967 - name : Upload Results
70- uses : github/codeql-action/upload-sarif@v2
68+ uses : github/codeql-action/upload-sarif@v3
7169 if : ${{ always() }}
7270 with :
7371 sarif_file : rust-clippy-results.sarif
7472 wait-for-processing : true
7573
7674 tests :
7775 runs-on : " ubuntu-22.04"
76+ strategy :
77+ matrix :
78+ api_version : ["4-1", "4-2", "4-3", "custom"]
7879
7980 steps :
8081 - name : Checkout
8182 uses : actions/checkout@v3
83+
8284 - name : Setup Cache
8385 uses : Swatinem/rust-cache@v2
8486 with :
8587 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+
86103 - name : Tests
104+ env :
105+ LLVM_PATH : " /home/linuxbrew/.linuxbrew/opt/llvm/bin"
106+ GODOT4_BIN : ${{ steps.prerelease_setup.outputs.godot4_bin }}
87107 run : |
88- cargo test
108+ cargo test --features "godot/api-${{ matrix.api_version}}"
89109
90110 license :
91111 runs-on : " ubuntu-22.04"
0 commit comments