name: Setup toolchain description: Checkout + configure Cargo mirror + install Rust, Node, wasm target, Dioxus CLI and Tailwind CSS CLI runs: using: composite steps: - name: Checkout shell: bash run: | git init git remote add origin https://git.rua.plus/${{ github.repository }}.git git fetch --depth 1 origin ${{ github.sha }} git checkout ${{ github.sha }} - name: Configure Cargo mirror shell: bash run: | mkdir -p "$HOME/.cargo" printf '%s\n' '[source.crates-io]' "replace-with = 'rsproxy'" '' "[source.rsproxy]" 'registry = "sparse+https://rsproxy.cn/index/"' > "$HOME/.cargo/config.toml" # Rust mirror env (RUSTUP_UPDATE_ROOT / RUSTUP_DIST_SERVER) is inherited # from the top-level workflow env. - name: Install Rust toolchain shell: bash run: | for i in 1 2 3; do curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable && break echo "rustup install attempt $i failed, retrying..." sleep 15 done echo "$HOME/.cargo/bin" >> $GITHUB_PATH - name: Install Node.js shell: bash run: | apt-get update apt-get install -y nodejs npm - name: Install Rust target shell: bash run: rustup target add wasm32-unknown-unknown - name: Install Dioxus CLI shell: bash run: cargo install dioxus-cli --locked - name: Install Tailwind CSS CLI shell: bash run: npm install -g @tailwindcss/cli