Skip to content

Commit eb765a4

Browse files
committed
add RUSTFLAGS and RUSTDOCFLAGS to env
1 parent 93813fd commit eb765a4

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

.github/actions/build/action.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,12 @@ inputs:
3838
runs:
3939
using: "composite"
4040
steps:
41+
- name: set up Rust env
42+
shell: bash
43+
run: |
44+
echo "RUSTFLAGS=${{ inputs.RUSTFLAGS }}" >> $GITHUB_ENV
45+
echo "RUSTDOCFLAGS=${{ inputs.RUSTDOCFLAGS }}" >> $GITHUB_ENV
46+
4147
- name: debug info
4248
shell: bash
4349
run: |

.github/actions/test/action.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,18 @@ inputs:
1010
required: false
1111
default: cargo
1212

13+
RUSTFLAGS:
14+
required: false
15+
default: -D warnings -A unknown-lints
16+
1317
runs:
1418
using: "composite"
1519
steps:
20+
- name: set up Rust env
21+
shell: bash
22+
run: |
23+
echo "RUSTFLAGS=${{ inputs.RUSTFLAGS }}" >> $GITHUB_ENV
24+
1625
- name: test
1726
shell: bash
1827
run: ${{ inputs.TOOL }} test --target ${{ inputs.TARGET }} --all-features

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,14 @@ jobs:
8282
with:
8383
TARGET: '${{ matrix.target }}'
8484
TOOL: cross
85+
RUSTFLAGS: --cfg qemu -D warnings
8586

8687
- name: test
8788
uses: ./.github/actions/test
8889
with:
8990
TARGET: '${{ matrix.target }}'
9091
TOOL: cross
92+
RUSTFLAGS: --cfg qemu -D warnings
9193

9294
- name: before_cache_script
9395
run: rm -rf $CARGO_HOME/registry/index

0 commit comments

Comments
 (0)