diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 4fbb6ce..31c9f82 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -120,14 +120,29 @@ jobs: with: node-version: ${{ env.NODE_VERSION }} - - name: Install Rust stable - uses: dtolnay/rust-toolchain@stable + - name: Install Rust stable (Unix) + if: matrix.platform != 'windows' + run: | + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable + echo "$HOME/.cargo/bin" >> $GITHUB_PATH + + - name: Install Rust stable (Windows) + if: matrix.platform == 'windows' + shell: powershell + run: | + if (Get-Command rustup -ErrorAction SilentlyContinue) { + rustup default stable + } else { + Invoke-WebRequest -Uri https://win.rustup.rs/x86_64 -OutFile rustup-init.exe + .\rustup-init.exe -y --default-toolchain stable + echo "$env:USERPROFILE\.cargo\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append + } - name: Install system dependencies (Linux) if: matrix.platform == 'linux' run: | sudo apt-get update - sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf + sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf xdg-utils - name: Install system dependencies (macOS) if: matrix.platform == 'macos'