]> git.lizzy.rs Git - rust.git/blobdiff - .azure-pipelines/steps/run.yml
ci: Favor SCRIPT instead of RUST_CHECK_TARGET
[rust.git] / .azure-pipelines / steps / run.yml
index 2d98efd586e7747535ecd63dbd90063a70ded654..e7c6235a50444b59d25b73083b91077270fa466b 100644 (file)
@@ -8,22 +8,6 @@
 
 steps:
 
-# Ensure the `aws` CLI is installed so we can deploy later on, cache docker
-# images, etc.
-- bash: |
-    set -e
-    sudo apt-get install -y python3-setuptools
-    pip3 install awscli --upgrade --user
-    echo "##vso[task.prependpath]$HOME/.local/bin"
-  displayName: Install awscli (Linux)
-  condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'))
-- script: pip install awscli
-  displayName: Install awscli (non-Linux)
-  condition: and(succeeded(), ne(variables['Agent.OS'], 'Linux'))
-
-- bash: aws s3 help
-- bash: exit 1
-
 - checkout: self
   fetchDepth: 2
 
@@ -49,10 +33,28 @@ steps:
     brew install xz
     brew install swig
   displayName: Install build dependencies (OSX)
-  condition: and(succeeded(), eq(variables['Agent.OS'], 'Darwin'), eq(variables['RUST_CHECK_TARGET'],'dist'))
+  condition: and(succeeded(), eq(variables['Agent.OS'], 'Darwin'), eq(variables['SCRIPT'],'./x.py dist'))
+
+# Switch to XCode 9.3 on OSX since it seems to be the last version that supports
+# i686-apple-darwin. We'll eventually want to upgrade this and it will probably
+# force us to drop i686-apple-darwin, but let's keep the wheels turning for now.
+- bash: |
+    set -e
+    sudo xcode-select --switch /Applications/Xcode_9.3.app
+  displayName: Switch to Xcode 9.3 (OSX)
+  condition: and(succeeded(), eq(variables['Agent.OS'], 'Darwin'))
 
 - template: install-windows-build-deps.yml
 
+# Looks like docker containers have IPv6 disabled by default, so let's turn it
+# on since libstd tests require it
+- bash: |
+    set -e
+    echo '{"ipv6":true,"fixed-cidr-v6":"fd9a:8454:6789:13f7::/64"}' | sudo tee /etc/docker/daemon.json
+    sudo service docker restart
+  displayName: Enable IPv6
+  condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'))
+
 # Check out all our submodules, but more quickly than using git by using one of
 # our custom scripts
 - bash: |
@@ -67,6 +69,19 @@ steps:
   condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
   displayName: Check out submodules (Windows)
 
+# Ensure the `aws` CLI is installed so we can deploy later on, cache docker
+# images, etc.
+- bash: |
+    set -e
+    sudo apt-get install -y python3-setuptools
+    pip3 install awscli --upgrade --user
+    echo "##vso[task.prependpath]$HOME/.local/bin"
+  displayName: Install awscli (Linux)
+  condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'))
+- script: pip install awscli
+  displayName: Install awscli (non-Linux)
+  condition: and(succeeded(), ne(variables['Agent.OS'], 'Linux'))
+
 # Configure our CI_JOB_NAME variable which log analyzers can use for the main
 # step to see what's going on.
 - bash: echo "##vso[task.setvariable variable=CI_JOB_NAME]$SYSTEM_JOBNAME"
@@ -91,21 +106,32 @@ steps:
     else
       src/ci/docker/run.sh $IMAGE
     fi
-  timeoutInMinutes: 180
+  #timeoutInMinutes: 180
+  timeoutInMinutes: 600
   env:
     CI: true
     SRC: .
-    AWS_SECRET_ACCESS_KEY: $(SCCACHE_AWS_SECRET_ACCESS_KEY)
+    AWS_SECRET_ACCESS_KEY: $(AWS_SECRET_ACCESS_KEY)
   displayName: Run build
 
+# If we're a deploy builder, use the `aws` command to publish everything to our
+# bucket.
 - bash: |
     set -e
+    if [ "$AGENT_OS" = "Linux" ]; then
+        rm -rf obj/build/dist/doc
+        upload_dir=obj/build/dist
+    else
+        rm -rf build/dist/doc
+        upload_dir=build/dist
+    fi
+    ls -la $upload_dir
     deploy_dir=rustc-builds
     if [ "$DEPLOY_ALT" == "1" ]; then
         deploy_dir=rustc-builds-alt
     fi
-    aws s3 cp --no-progress --recursive --acl public-read ./deploy s3://$DEPLOY_BUCKET/$deploy_dir
+    aws s3 cp --no-progress --recursive --acl public-read ./$upload_dir s3://$DEPLOY_BUCKET/$deploy_dir/$BUILD_SOURCEVERSION
   env:
-    AWS_SECRET_ACCESS_KEY: $(SCCACHE_AWS_SECRET_ACCESS_KEY)
+    AWS_SECRET_ACCESS_KEY: $(AWS_SECRET_ACCESS_KEY)
   condition: and(succeeded(), or(eq(variables.DEPLOY, '1'), eq(variables.DEPLOY_ALT, '1')))
   displayName: Upload artifacts