diff --git a/.gitea/workflows/on_docserver.yaml b/.gitea/workflows/on_docserver.yaml index 8962dde..703e17b 100644 --- a/.gitea/workflows/on_docserver.yaml +++ b/.gitea/workflows/on_docserver.yaml @@ -24,17 +24,20 @@ jobs: #run: echo "šŸ’” The ${{ gitea.repository }} repository has been cloned to the runner." - name: Install Rust run: | - - while true; do sleep 20; done - export RUSTUP_HOME=//share/rust/.rustup - export CARGO_HOME=/usr/share/rust/.cargo + export RUSTUP_HOME=/toolcache/rust/.rustup + export CARGO_HOME=/toolcach/rust/.cargo printf "\n\tšŸ‹ Installing dependencies šŸ‹\t\n" apt-get -yq update apt-get -yq install build-essential llvm libssl-dev - printf "\n\tšŸ‹ Installing Rust šŸ‹\t\n" - curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain=stable --profile=minimal - source "${CARGO_HOME}/env" - rustup component add rustfmt clippy + if [ ! -x "${CARGO_HOME}/bin/cargo" ] ; then + source "${CARGO_HOME}/env" + else + printf "\n\tšŸ‹ Installing Rust šŸ‹\t\n" + curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain=stable --profile=minimal + source "${CARGO_HOME}/env" + printf "\n\tšŸ‹ Installing Rust components šŸ‹\t\n" + rustup component add rustfmt clippy + fi printf "\n\tšŸ‹ Installed CARGO šŸ‹\t\n" cargo -V printf "\n\tšŸ‹ Installed RUSTC šŸ‹\t\n" @@ -43,16 +46,12 @@ jobs: # rustup -V - name: Rust build run: | - export RUSTUP_HOME=/usr/share/rust/.rustup - export CARGO_HOME=/usr/share/rust/.cargo + export RUSTUP_HOME=/toolcache/rust/.rustup + export CARGO_HOME=/toolcach/rust/.cargo source "${CARGO_HOME}/env" cd ${{ gitea.workspace }} - pwd - ls - ls /home/rootless/ - df -h - #cargo build - #ls -l target/debug + cargo build + ls -l target/debug - name: Install kubectl run: | OS="$(uname | tr '[:upper:]' '[:lower:]')"