File tree Expand file tree Collapse file tree 4 files changed +9
-7
lines changed Expand file tree Collapse file tree 4 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -61,14 +61,14 @@ runs:
61
61
if: {% raw %} ${{ inputs.rustfmt == 'true' }}{% endraw %}
62
62
uses: dtolnay/rust-toolchain@master
63
63
with:
64
- toolchain: {% raw %} ${{ env.RUSTFMT_NIGHTLY_VERSION }}{% endraw %}
64
+ toolchain: {% raw %} ${{ env.TOOLCHAIN_FORMAT }}{% endraw %}
65
65
components: rustfmt
66
66
67
67
- name: Install Clippy
68
68
if: {% raw %} ${{ inputs.clippy == 'true' }}{% endraw %}
69
69
uses: dtolnay/rust-toolchain@master
70
70
with:
71
- toolchain: {% raw %} ${{ env.CLIPPY_NIGHTLY_VERSION }}{% endraw %}
71
+ toolchain: {% raw %} ${{ env.TOOLCHAIN_LINT }}{% endraw %}
72
72
components: clippy
73
73
74
74
- name: Install Solana
Original file line number Diff line number Diff line change 2
2
resolver = "2"
3
3
members = ["program"]
4
4
5
- [workspace.metadata.toolchain]
6
- lint = "{{ toolchain }} "
5
+ # Specify Rust toolchains for rustfmt, clippy, and build.
6
+ # Any unprovided toolchains default to stable.
7
+ [workspace.metadata.toolchains]
7
8
format = "{{ toolchain }} "
9
+ lint = "{{ toolchain }} "
Original file line number Diff line number Diff line change 1
1
#!/usr/bin/env zx
2
2
import { getToolchain } from '../utils.mjs' ;
3
3
4
- await $ `echo "RUSTFMT_NIGHTLY_VERSION =${ getToolchain ( 'format' ) } " >> $GITHUB_ENV` ;
5
- await $ `echo "CLIPPY_NIGHTLY_VERSION =${ getToolchain ( 'lint' ) } " >> $GITHUB_ENV` ;
4
+ await $ `echo "TOOLCHAIN_FORMAT =${ getToolchain ( 'format' ) } " >> $GITHUB_ENV` ;
5
+ await $ `echo "TOOLCHAIN_LINT =${ getToolchain ( 'lint' ) } " >> $GITHUB_ENV` ;
Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ export function getCargoMetadata(folder) {
85
85
}
86
86
87
87
export function getToolchain ( operation ) {
88
- return getCargoMetadata ( ) ?. toolchain ?. [ operation ] ;
88
+ return getCargoMetadata ( ) ?. toolchains ?. [ operation ] ;
89
89
}
90
90
91
91
export function getToolchainArgument ( operation ) {
You can’t perform that action at this time.
0 commit comments