aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xci/ciimage/build.py6
-rwxr-xr-xci/ciimage/ubuntu-rolling/install.sh7
2 files changed, 13 insertions, 0 deletions
diff --git a/ci/ciimage/build.py b/ci/ciimage/build.py
index 0197955..559723c 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 697ef06..a02eb8f 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