This commit is contained in:
+10
-3
@@ -20,9 +20,16 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Install Rust
|
- name: Install Rust
|
||||||
uses: dtolnay/rust-toolchain@stable
|
run: |
|
||||||
with:
|
if command -v rustc >/dev/null 2>&1 && command -v cargo >/dev/null 2>&1; then
|
||||||
components: rustfmt, clippy
|
echo "Rust already present"
|
||||||
|
elif command -v apk >/dev/null 2>&1; then
|
||||||
|
apk add --no-cache rust cargo rustfmt clippy
|
||||||
|
elif command -v apt-get >/dev/null 2>&1; then
|
||||||
|
apt-get update && apt-get install -y rustc cargo rustfmt clippy
|
||||||
|
else
|
||||||
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable --component rustfmt,clippy
|
||||||
|
fi
|
||||||
- name: cargo check
|
- name: cargo check
|
||||||
run: cargo check
|
run: cargo check
|
||||||
- name: cargo clippy
|
- name: cargo clippy
|
||||||
|
|||||||
Reference in New Issue
Block a user