|
10 | 10 | using: "composite" |
11 | 11 |
|
12 | 12 | steps: |
13 | | - - name: Install mise and Tools |
14 | | - uses: jdx/mise-action@v4 |
| 13 | + - name: Install mise |
| 14 | + run: | |
| 15 | + if [ "$RUNNER_OS" == "Windows" ]; then |
| 16 | + winget install jdx.mise |
| 17 | + else |
| 18 | + curl https://mise.run | sh |
| 19 | + fi |
| 20 | + echo "$HOME/.local/share/mise/bin" >> $GITHUB_PATH |
| 21 | + echo "$HOME/.local/share/mise/shims" >> $GITHUB_PATH |
| 22 | + shell: bash |
| 23 | + |
| 24 | + - name: Restore mise Cache |
| 25 | + uses: actions/cache/restore@v5 |
| 26 | + with: |
| 27 | + path: ~/.local/share/mise |
| 28 | + key: mise-${{ runner.os }}-${{ hashFiles('**/mise.toml', '**/mise.lock') }} |
| 29 | + restore-keys: | |
| 30 | + mise-${{ runner.os }}- |
15 | 31 |
|
16 | 32 | - name: Restore mise State (Tasks) |
17 | 33 | uses: actions/cache/restore@v5 |
|
42 | 58 | restore-keys: | |
43 | 59 | cargo-${{ runner.os }}- |
44 | 60 |
|
| 61 | + - name: Install Tools |
| 62 | + run: | |
| 63 | + mise trust --yes |
| 64 | + mise install |
| 65 | + shell: bash |
| 66 | + env: |
| 67 | + GITHUB_TOKEN: ${{ github.token }} |
| 68 | + |
45 | 69 | - name: Restore Target Cache |
46 | 70 | uses: actions/cache/restore@v5 |
47 | 71 | with: |
|
75 | 99 | restore-keys: | |
76 | 100 | uv-${{ runner.os }}- |
77 | 101 |
|
78 | | - # NOTE: This is workaround for mise action messing up with rustup state: |
79 | | - # - https://github.com/jdx/mise-action/issues/184 |
80 | | - # - https://github.com/jdx/mise-action/issues/215 |
81 | | - - name: Install Rust Components |
82 | | - run: | |
83 | | - export active_rust_toolchain=$(rustup show active-toolchain | cut -d' ' -f1) |
84 | | - # NOTE: Workaround for "error: failed to install component: 'rustfmt-preview-x86_64-unknown-linux-gnu', detected conflict: 'bin/cargo-fmt'" |
85 | | - active_rust_bin_dir=$(dirname "$(rustup which rustc --toolchain "${active_rust_toolchain}")") |
86 | | -
|
87 | | - rm -f "${active_rust_bin_dir}/cargo-fmt" |
88 | | - rm -f "${active_rust_bin_dir}/rustfmt" |
89 | | - rm -f ~/.cargo/bin/cargo-fmt |
90 | | - rm -f ~/.cargo/bin/rustfmt |
91 | | -
|
92 | | - rustup component add --toolchain ${active_rust_toolchain} rustfmt clippy |
93 | | - shell: bash |
94 | | - |
95 | 102 | - name: Run Install |
96 | 103 | run: mise :install |
97 | 104 | shell: bash |
0 commit comments