@@ -22,18 +22,26 @@ jobs:
2222 os : [ubuntu-latest, windows-latest, macOS-latest, windows-11-arm]
2323 mode : ["--release", "-Zminimal-versions", ""]
2424 manifest : ["psm/Cargo.toml", "Cargo.toml"]
25+ # Pedantic flags
26+ cflags : ["-Werror -Wundef", ""]
2527 exclude :
2628 - rust_toolchain : stable
2729 mode : -Zminimal-versions
2830 - rust_toolchain : 1.91.0
2931 mode : -Zminimal-versions
32+ - os : windows-latest
33+ cflags : " -Werror -Wundef"
34+ - os : windows-11-arm
35+ cflags : " -Werror -Wundef"
3036 include :
3137 - os : windows-latest
3238 extra_target : i686-pc-windows-msvc
3339 - os : windows-11-arm
3440 rust_toolchain : nightly
3541 extra_target : arm64ec-pc-windows-msvc
3642 timeout-minutes : 10
43+ env :
44+ CFLAGS : ${{ matrix.cflags }}
3745 steps :
3846 - uses : actions/checkout@v4
3947 - name : Install Rust ${{ matrix.rust_toolchain }}
@@ -101,6 +109,7 @@ jobs:
101109 args : --target=${{ matrix.rust_target }} --manifest-path=${{ matrix.manifest }} -- --nocapture
102110 env :
103111 CC : ${{ matrix.clang_cl }}
112+ CFLAGS : " -Werror -Wundef"
104113
105114 windows-gnu-test :
106115 name : Test ${{ matrix.manifest }} on ${{ matrix.rust_target }} with ${{ matrix.rust_toolchain }}
@@ -139,6 +148,8 @@ jobs:
139148 with :
140149 command : test
141150 args : --target ${{ matrix.rust_target }} --manifest-path=${{ matrix.manifest }}
151+ env :
152+ CFLAGS : " -Werror -Wundef"
142153
143154 cross-windows-gnullvm-check :
144155 name : Check ${{ matrix.manifest }} to ${{ matrix.rust_target }} with stable
0 commit comments