Skip to content

Commit 6cd8126

Browse files
committed
CI: memcheck itest uses nightly toolchain, with -Zrandomize-layout
Helps detect potential UB due to relying on unspecified struct layouts
1 parent 6655b04 commit 6cd8126

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

.github/composite/godot-itest/action.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ inputs:
2929
default: ''
3030
description: "Extra command line arguments for 'cargo build', e.g. features"
3131

32+
rust-env-rustflags:
33+
required: false
34+
default: ''
35+
description: "Extra values for the RUSTFLAGS env var"
36+
3237
with-llvm:
3338
required: false
3439
default: ''
@@ -88,6 +93,8 @@ runs:
8893
run: |
8994
cargo build -p itest ${{ inputs.rust-extra-args }}
9095
shell: bash
96+
env:
97+
RUSTFLAGS: ${{ inputs.rust-env-rustflags }}
9198

9299
- name: "Run Godot integration tests"
93100
# Aborts immediately if Godot outputs certain keywords (would otherwise stall until CI runner times out).

.github/workflows/full-ci.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -224,15 +224,17 @@ jobs:
224224
# --disallow-focus: fail if #[itest(focus)] is encountered, to prevent running only a few tests for full CI
225225
- name: linux-memcheck-gcc
226226
os: ubuntu-20.04
227-
rust-toolchain: stable
228227
godot-binary: godot.linuxbsd.editor.dev.x86_64.san
229228
godot-args: -- --disallow-focus
229+
rust-toolchain: nightly
230+
rust-env-rustflags: -Zrandomize-layout
230231

231232
- name: linux-memcheck-clang
232233
os: ubuntu-20.04
233-
rust-toolchain: stable
234234
godot-binary: godot.linuxbsd.editor.dev.x86_64.llvm.san
235235
godot-args: -- --disallow-focus
236+
rust-toolchain: nightly
237+
rust-env-rustflags: -Zrandomize-layout
236238

237239
- name: linux-double
238240
os: ubuntu-20.04
@@ -249,8 +251,10 @@ jobs:
249251
artifact-name: godot-${{ matrix.name }}
250252
godot-binary: ${{ matrix.godot-binary }}
251253
godot-args: ${{ matrix.godot-args }}
252-
with-llvm: ${{ matrix.with-llvm }}
253254
rust-extra-args: ${{ matrix.rust-extra-args }}
255+
rust-toolchain: ${{ matrix.rust-toolchain }}
256+
rust-env-rustflags: ${{ matrix.rust-env-rustflags }}
257+
with-llvm: ${{ matrix.with-llvm }}
254258

255259

256260
license-guard:

0 commit comments

Comments
 (0)