Skip to content

Commit 349596b

Browse files
committed
Include global rustflags in rustflags override
1 parent 878cd24 commit 349596b

File tree

1 file changed

+21
-6
lines changed

1 file changed

+21
-6
lines changed

.github/workflows/ci.yml

+21-6
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
schedule: [cron: "40 1 * * *"]
77

88
env:
9-
RUSTFLAGS: '-Dwarnings'
9+
RUSTFLAGS: -Dwarnings
1010

1111
jobs:
1212
test:
@@ -24,8 +24,14 @@ jobs:
2424
- run: cargo test
2525
- run: cargo test --no-default-features
2626
- run: cargo test --features span-locations
27-
- run: RUSTFLAGS='--cfg procmacro2_semver_exempt' cargo test
28-
- run: RUSTFLAGS='--cfg procmacro2_semver_exempt' cargo test --no-default-features
27+
- name: RUSTFLAGS='--cfg procmacro2_semver_exempt' cargo test
28+
run: cargo test
29+
env:
30+
RUSTFLAGS: --cfg procmacro2_semver_exempt ${{env.RUSTFLAGS}}
31+
- name: RUSTFLAGS='--cfg procmacro2_semver_exempt' cargo test --no-default-features
32+
run: cargo test --no-default-features
33+
env:
34+
RUSTFLAGS: --cfg procmacro2_semver_exempt ${{env.RUSTFLAGS}}
2935

3036
nightly:
3137
name: Rust nightly
@@ -38,9 +44,18 @@ jobs:
3844
- run: cargo test --no-default-features -- --ignored # run the ignored test to make sure the `proc-macro` feature is disabled
3945
- run: cargo test --features span-locations
4046
- run: cargo test --manifest-path tests/ui/Cargo.toml
41-
- run: RUSTFLAGS='--cfg procmacro2_semver_exempt' cargo test
42-
- run: RUSTFLAGS='--cfg procmacro2_semver_exempt' cargo test --no-default-features
43-
- run: RUSTFLAGS='-Z allow-features=' cargo test
47+
- name: RUSTFLAGS='--cfg procmacro2_semver_exempt' cargo test
48+
run: cargo test
49+
env:
50+
RUSTFLAGS: --cfg procmacro2_semver_exempt ${{env.RUSTFLAGS}}
51+
- name: RUSTFLAGS='--cfg procmacro2_semver_exempt' cargo test --no-default-features
52+
run: cargo test --no-default-features
53+
env:
54+
RUSTFLAGS: --cfg procmacro2_semver_exempt ${{env.RUSTFLAGS}}
55+
- name: RUSTFLAGS='-Z allow-features=' cargo test
56+
run: cargo test
57+
env:
58+
RUSTFLAGS: -Z allow-features= ${{env.RUSTFLAGS}}
4459
- run: cargo update -Z minimal-versions && cargo build
4560

4661
webassembly:

0 commit comments

Comments
 (0)