diff --git a/ci/ciimage/build.py b/ci/ciimage/build.py index 01979556d..559723c0c 100755 --- a/ci/ciimage/build.py +++ b/ci/ciimage/build.py @@ -74,6 +74,12 @@ class Builder(BuilderBase): # Also add /ci to PATH out_data += 'export PATH="/ci:$PATH"\n' + out_data += ''' + if [ -f "$HOME/.cargo/env" ]; then + source "$HOME/.cargo/env" + fi + ''' + out_file.write_text(out_data, encoding='utf-8') # make it executable diff --git a/ci/ciimage/ubuntu-rolling/install.sh b/ci/ciimage/ubuntu-rolling/install.sh index 697ef060b..a02eb8f5d 100755 --- a/ci/ciimage/ubuntu-rolling/install.sh +++ b/ci/ciimage/ubuntu-rolling/install.sh @@ -50,6 +50,13 @@ dub_fetch dubtestproject dub build dubtestproject:test1 --compiler=ldc2 dub build dubtestproject:test2 --compiler=ldc2 +# Remove debian version of Rust and install latest with rustup. +# This is needed to get the cross toolchain as well. +apt-get -y remove rustc || true +wget -O - https://sh.rustup.rs | sh -s -- -y --profile minimal --component clippy +source "$HOME/.cargo/env" +rustup target add x86_64-pc-windows-gnu + # cleanup apt-get -y clean apt-get -y autoclean