Skip to content

Commit

Permalink
Prevent missing rust-src from reinstalling a nightly without miri
Browse files Browse the repository at this point in the history
A build log from GitHub Actions:

    $ Run rustup toolchain install nightly --component miri --profile minimal --allow-downgrade --no-self-update
    info: syncing channel updates for 'nightly-x86_64-unknown-linux-gnu'
    info: latest update on 2021-10-27, rust version 1.58.0-nightly (e269e6bf4 2021-10-26)
    info: skipping nightly which is missing installed component 'miri'
    info: syncing channel updates for 'nightly-2021-10-26-x86_64-unknown-linux-gnu'
    info: latest update on 2021-10-26, rust version 1.58.0-nightly (29b124802 2021-10-25)
    info: downloading component 'cargo'
    info: downloading component 'miri'
    info: downloading component 'rust-std'
    info: downloading component 'rustc'
    info: installing component 'cargo'
    info: installing component 'miri'
    info: installing component 'rust-std'
    info: installing component 'rustc'

      nightly-x86_64-unknown-linux-gnu installed - rustc 1.58.0-nightly (29b124802 2021-10-25)

    $ Run rustup default nightly
    info: using existing install for 'nightly-x86_64-unknown-linux-gnu'
    info: default toolchain set to 'nightly-x86_64-unknown-linux-gnu'

      nightly-x86_64-unknown-linux-gnu unchanged - rustc 1.58.0-nightly (29b124802 2021-10-25)

    $ Run echo "::set-output name=version::$(rustc --version)"
    info: syncing channel updates for 'nightly-x86_64-unknown-linux-gnu'
    info: latest update on 2021-10-27, rust version 1.58.0-nightly (e269e6bf4 2021-10-26)
    warning: Force-skipping unavailable component 'miri-x86_64-unknown-linux-gnu'
    info: downloading component 'rust-src'
    info: downloading component 'cargo'
    info: downloading component 'rust-std'
    info: downloading component 'rustc'
    info: removing previous version of component 'cargo'
    info: removing previous version of component 'miri'
    info: removing previous version of component 'rust-std'
    info: removing previous version of component 'rustc'
    info: installing component 'rust-src'
    info: installing component 'cargo'
    info: installing component 'rust-std'
    info: installing component 'rustc'

    $ Run rustc --version
    rustc 1.58.0-nightly (e269e6bf4 2021-10-26)

    $ Run cargo miri test
    error: the 'miri' component which provides the command 'cargo-miri' is not available for the 'nightly-x86_64-unknown-linux-gnu' toolchain
    Error: Process completed with exit code 1.
  • Loading branch information
dtolnay committed Oct 27, 2021
1 parent 3acbb33 commit 263257b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@nightly
with:
components: miri
components: miri, rust-src
- run: cargo miri test

outdated:
Expand Down

0 comments on commit 263257b

Please sign in to comment.