Skip to content

Commit b9a49d4

Browse files
committed
add ci job to test check-cfg
1 parent e74f735 commit b9a49d4

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

.github/workflows/bors.yml

+17
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,23 @@ jobs:
317317
run: LIBC_CI=1 TOOLCHAIN=${{ matrix.toolchain }} WIN_TARGET=${{ matrix.target }} sh ./ci/build.sh
318318
shell: bash
319319

320+
check_cfg:
321+
permissions:
322+
actions: write # to cancel workflows (rust-lang/simpleinfra/github-actions/cancel-outdated-builds)
323+
contents: read # to fetch code (actions/checkout)
324+
325+
name: "Check #[cfg]s"
326+
runs-on: ubuntu-22.04
327+
steps:
328+
- uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@master
329+
with:
330+
github_token: "${{ secrets.GITHUB_TOKEN }}"
331+
- uses: actions/checkout@v3
332+
- name: Setup Rust toolchain
333+
run: TOOLCHAIN=nightly sh ./ci/install-rust.sh
334+
- name: Build with check-cfg
335+
run: LIBC_CI=1 LIBC_CHECK_CFG=1 cargo build -Z unstable-options -Z check-cfg=features,names,values,output
336+
320337
docs:
321338
permissions:
322339
actions: write # to cancel workflows (rust-lang/simpleinfra/github-actions/cancel-outdated-builds)

0 commit comments

Comments
 (0)