ci: Add Rust Windows cross toolchain on ubuntu-rolling image

pull/11990/head
Xavier Claessens 2 years ago committed by Xavier Claessens
parent 0bb1647fd1
commit ded2204d2c
  1. 6
      ci/ciimage/build.py
  2. 7
      ci/ciimage/ubuntu-rolling/install.sh

@ -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

@ -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

Loading…
Cancel
Save