Use shell-based check-before-install for all build jobs
Replace JS-based GitHub Actions (dtolnay/rust-toolchain, actions/setup-node) in the Linux job with shell commands that check if Rust and Node.js are already present before installing. All three jobs (Linux, macOS, Windows) now use the same pattern: skip installation if the tool is already available on the runner. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -61,17 +61,29 @@ jobs:
|
|||||||
xdg-utils
|
xdg-utils
|
||||||
|
|
||||||
- name: Install Rust stable
|
- name: Install Rust stable
|
||||||
uses: dtolnay/rust-toolchain@stable
|
run: |
|
||||||
|
if command -v rustup &>/dev/null; then
|
||||||
- name: Rust cache
|
echo "Rust already installed: $(rustc --version)"
|
||||||
uses: swatinem/rust-cache@v2
|
rustup update stable
|
||||||
with:
|
rustup default stable
|
||||||
workspaces: "./app/src-tauri -> target"
|
else
|
||||||
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable
|
||||||
|
. "$HOME/.cargo/env"
|
||||||
|
fi
|
||||||
|
rustc --version
|
||||||
|
cargo --version
|
||||||
|
|
||||||
- name: Install Node.js
|
- name: Install Node.js
|
||||||
uses: actions/setup-node@v4
|
run: |
|
||||||
with:
|
if command -v node &>/dev/null; then
|
||||||
node-version: "22"
|
echo "Node.js already installed: $(node --version)"
|
||||||
|
else
|
||||||
|
echo "Installing Node.js 22..."
|
||||||
|
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
|
||||||
|
sudo apt-get install -y nodejs
|
||||||
|
fi
|
||||||
|
node --version
|
||||||
|
npm --version
|
||||||
|
|
||||||
- name: Install frontend dependencies
|
- name: Install frontend dependencies
|
||||||
working-directory: ./app
|
working-directory: ./app
|
||||||
|
|||||||
Reference in New Issue
Block a user