Skip to content

Commit 4b32b5c

Browse files
committed
Auto merge of #62545 - Mark-Simulacrum:azure-line-endings, r=<try>
Attempt to fix Azure line endings This is just a verification step for now, but I want to run it in a try builder to gauge whether it works or not. Presumably it'll fail, and we can then attempt to track down why. r? @ghost
2 parents d4e1565 + 470d0ff commit 4b32b5c

File tree

3 files changed

+67
-5
lines changed

3 files changed

+67
-5
lines changed

.azure-pipelines/steps/install-windows-build-deps.yml

+10
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,16 @@ steps:
44
# drive. We should probably confirm this with the azure pipelines team at some
55
# point, but this seems to fix our "disk space full" problems.
66
- script: |
7+
git config --list --show-origin
78
mkdir c:\MORE_SPACE
89
mklink /J build c:\MORE_SPACE
10+
git config --list --show-origin
911
displayName: "Ensure build happens on C:/ instead of D:/"
1012
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
1113

14+
- bash: git config --replace-all --system core.autocrlf false
15+
displayName: "Disable git automatic line ending conversion (on C:/)"
16+
1217
# Download and install MSYS2, needed primarily for the test suite (run-make) but
1318
# also used by the MinGW toolchain for assembling things.
1419
#
@@ -30,6 +35,7 @@ steps:
3035
3136
echo ##vso[task.setvariable variable=MSYS_PATH]%MSYS_PATH%
3237
echo ##vso[task.prependpath]%MSYS_PATH%\usr\bin
38+
git config --list
3339
displayName: Install msys2
3440
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
3541

@@ -59,12 +65,14 @@ steps:
5965
powershell -Command "$ProgressPreference = 'SilentlyContinue'; iwr -outf 2017-04-20-%MSYS_BITS%bit-gdborig.exe %MINGW_URL%/2017-04-20-%MSYS_BITS%bit-gdborig.exe"
6066
mv 2017-04-20-%MSYS_BITS%bit-gdborig.exe %MINGW_DIR%\bin\gdborig.exe
6167
echo ##vso[task.prependpath]%CD%\%MINGW_DIR%\bin
68+
git config --list --show-origin
6269
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'), ne(variables['MINGW_URL'],''))
6370
displayName: Download custom MinGW
6471

6572
# Otherwise pull in the MinGW installed on appveyor
6673
- script: |
6774
echo ##vso[task.prependpath]%MSYS_PATH%\mingw%MSYS_BITS%\bin
75+
git config --list --show-origin
6876
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'), eq(variables['MINGW_URL'],''))
6977
displayName: Add MinGW to path
7078

@@ -75,6 +83,7 @@ steps:
7583
- script: |
7684
copy C:\Python27amd64\python.exe C:\Python27amd64\python2.7.exe
7785
echo ##vso[task.prependpath]C:\Python27amd64
86+
git config --list --show-origin
7887
displayName: Prefer the "native" Python as LLVM has trouble building with MSYS sometimes
7988
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
8089

@@ -87,5 +96,6 @@ steps:
8796
set RUST_CONFIGURE_ARGS=%RUST_CONFIGURE_ARGS% --enable-ninja
8897
echo ##vso[task.setvariable variable=RUST_CONFIGURE_ARGS]%RUST_CONFIGURE_ARGS%
8998
echo ##vso[task.prependpath]%CD%\ninja
99+
git config --list --show-origin
90100
displayName: Download and install ninja
91101
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))

.azure-pipelines/steps/run.yml

+28-2
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,32 @@ steps:
1212
# Azure's Windows image. Having the conversion enabled caused regressions both
1313
# in our test suite (it broke miri tests) and in the ecosystem, since we
1414
# started shipping install scripts with CRLF endings instead of the old LF.
15-
- bash: git config --global core.autocrlf false
15+
#
16+
# Note that we do this a couple times during the build as the PATH and current
17+
# user/directory change, e.g. when mingw is enabled.
18+
- bash: git config --replace-all --system core.autocrlf false
1619
displayName: "Disable git automatic line ending conversion"
1720

21+
- bash: |
22+
set -x
23+
git config --list --show-origin
24+
displayName: git config pre checkout
25+
1826
- checkout: self
1927
fetchDepth: 2
2028

29+
- bash: git config --list --show-origin
30+
displayName: git config post checkout
31+
2132
# Spawn a background process to collect CPU usage statistics which we'll upload
2233
# at the end of the build. See the comments in the script here for more
2334
# information.
2435
- bash: python src/ci/cpu-usage-over-time.py &> cpu-usage.csv &
2536
displayName: "Collect CPU-usage statistics in the background"
2637

27-
- bash: printenv | sort
38+
- bash: |
39+
printenv | sort
40+
git config --list --show-origin
2841
displayName: Show environment variables
2942

3043
- bash: |
@@ -79,11 +92,24 @@ steps:
7992
condition: and(succeeded(), ne(variables['Agent.OS'], 'Windows_NT'))
8093
displayName: Check out submodules (Unix)
8194
- script: |
95+
git config --list --show-origin
8296
if not exist D:\cache\rustsrc\NUL mkdir D:\cache\rustsrc
8397
sh src/ci/init_repo.sh . /d/cache/rustsrc
8498
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
8599
displayName: Check out submodules (Windows)
86100

101+
# See also the disable for autocrlf above, this just checks that it worked
102+
#
103+
# If matches for '\r' are found, we should immediately exit the build.
104+
- bash: |
105+
set -x
106+
git config --list --show-origin
107+
dos2unix -ih Cargo.lock src/tools/rust-installer/install-template.sh
108+
endings=$(dos2unix -ic Cargo.lock src/tools/rust-installer/install-template.sh)
109+
# if endings has non-zero length, error out
110+
test -n "$endings" && exit 1
111+
displayName: Verify line endings are LF
112+
87113
# Ensure the `aws` CLI is installed so we can deploy later on, cache docker
88114
# images, etc.
89115
- bash: |

.azure-pipelines/try.yml

+29-3
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,35 @@ jobs:
1818
IMAGE: dist-x86_64-linux
1919
DEPLOY: 1
2020

21-
dist-x86_64-linux-alt:
22-
IMAGE: dist-x86_64-linux
23-
DEPLOY_ALT: 1
21+
# dist-x86_64-linux-alt:
22+
# IMAGE: dist-x86_64-linux
23+
# DEPLOY_ALT: 1
24+
- job: Windows
25+
timeoutInMinutes: 600
26+
pool:
27+
vmImage: 'vs2017-win2016'
28+
steps:
29+
- template: steps/run.yml
30+
strategy:
31+
matrix:
32+
dist-i686-msvc:
33+
RUST_CONFIGURE_ARGS: >
34+
--build=i686-pc-windows-msvc
35+
--target=i586-pc-windows-msvc
36+
--enable-full-tools
37+
--enable-profiler
38+
SCRIPT: python x.py dist
39+
DIST_REQUIRE_ALL_TOOLS: 1
40+
DEPLOY: 1
41+
dist-i686-mingw:
42+
MSYS_BITS: 32
43+
RUST_CONFIGURE_ARGS: --build=i686-pc-windows-gnu --enable-full-tools --enable-profiler
44+
SCRIPT: python x.py dist
45+
MINGW_URL: https://rust-lang-ci2.s3.amazonaws.com/rust-ci-mirror
46+
MINGW_ARCHIVE: i686-6.3.0-release-posix-dwarf-rt_v5-rev2.7z
47+
MINGW_DIR: mingw32
48+
DIST_REQUIRE_ALL_TOOLS: 1
49+
DEPLOY: 1
2450

2551
# The macOS and Windows builds here are currently disabled due to them not being
2652
# overly necessary on `try` builds. We also don't actually have anything that

0 commit comments

Comments
 (0)