Make sure we never context switch while holding VM lock. #39
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Surface Rust warnings on PRs that touch any Rust code. | |
| # Not a required check so we never block people over new warnings | |
| # that might come from a new Rust version being released. | |
| name: Rust warnings | |
| on: | |
| pull_request: | |
| types: | |
| - opened | |
| - synchronize | |
| - reopened | |
| paths: | |
| - '**.rs' | |
| - '!**.inc.rs' | |
| merge_group: | |
| concurrency: | |
| group: ${{ github.workflow }} / ${{ startsWith(github.event_name, 'pull') && github.ref_name || github.sha }} | |
| cancel-in-progress: ${{ startsWith(github.event_name, 'pull') }} | |
| permissions: | |
| contents: read | |
| jobs: | |
| make: | |
| env: | |
| GITPULLOPTIONS: --no-tags origin ${{ github.ref }} | |
| runs-on: ubuntu-24.04 | |
| if: >- | |
| ${{!(false | |
| || contains(github.event.head_commit.message, '[DOC]') | |
| || contains(github.event.pull_request.title, '[DOC]') | |
| || contains(github.event.pull_request.labels.*.name, 'Documentation') | |
| || (github.event_name == 'push' && github.event.pull_request.user.login == 'dependabot[bot]') | |
| )}} | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - name: Install Rust | |
| run: rustup default beta | |
| - name: Rust warnings | |
| shell: bash | |
| run: | | |
| set -eu | |
| cargo check --quiet --all-features --message-format=json \ | |
| | jq -r 'select(.message.level == "warning" or .message.level == "error") | .message.rendered' \ | |
| | tee messages.txt | |
| (exit "${PIPESTATUS[0]}") && ! grep --quiet '[^[:space:]]' messages.txt |