Skip to content

Commit 0934237

Browse files
committed
add ci job to test check-cfg
1 parent 894aafd commit 0934237

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

Diff for: .github/workflows/bors.yml

+17
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,23 @@ jobs:
343343
- name: Check breaking changes
344344
run: sh ci/semver.sh macos
345345

346+
check_cfg:
347+
permissions:
348+
actions: write # to cancel workflows (rust-lang/simpleinfra/github-actions/cancel-outdated-builds)
349+
contents: read # to fetch code (actions/checkout)
350+
351+
name: "Check #[cfg]s"
352+
runs-on: ubuntu-22.04
353+
steps:
354+
- uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@master
355+
with:
356+
github_token: "${{ secrets.GITHUB_TOKEN }}"
357+
- uses: actions/checkout@v3
358+
- name: Setup Rust toolchain
359+
run: TOOLCHAIN=nightly sh ./ci/install-rust.sh
360+
- name: Build with check-cfg
361+
run: LIBC_CI=1 LIBC_CHECK_CFG=1 cargo build -Z unstable-options -Z check-cfg=features,names,values,output
362+
346363
docs:
347364
permissions:
348365
actions: write # to cancel workflows (rust-lang/simpleinfra/github-actions/cancel-outdated-builds)

0 commit comments

Comments
 (0)