Skip to content

Commit 2e1ddc5

Browse files
committed
chore: try manually setting up mise on CI
1 parent c3833a6 commit 2e1ddc5

1 file changed

Lines changed: 26 additions & 19 deletions

File tree

.github/actions/setup/action.yml

Lines changed: 26 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,24 @@ runs:
1010
using: "composite"
1111

1212
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 }}-
1531
1632
- name: Restore mise State (Tasks)
1733
uses: actions/cache/restore@v5
@@ -42,6 +58,14 @@ runs:
4258
restore-keys: |
4359
cargo-${{ runner.os }}-
4460
61+
- name: Install Tools
62+
run: |
63+
mise trust --yes
64+
mise install
65+
shell: bash
66+
env:
67+
GITHUB_TOKEN: ${{ github.token }}
68+
4569
- name: Restore Target Cache
4670
uses: actions/cache/restore@v5
4771
with:
@@ -75,23 +99,6 @@ runs:
7599
restore-keys: |
76100
uv-${{ runner.os }}-
77101
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-
95102
- name: Run Install
96103
run: mise :install
97104
shell: bash

0 commit comments

Comments
 (0)