From 94f2f009396ef0458c9b97859300d4d2a514ad97 Mon Sep 17 00:00:00 2001 From: Pietro Albini Date: Sun, 5 Jun 2022 12:29:20 +0200 Subject: [PATCH 1/4] remove azure pipelines configuration --- .github/workflows/ci.yml | 9 --------- src/ci/azure-pipelines/auto.yml | 26 ------------------------ src/ci/azure-pipelines/try.yml | 22 -------------------- src/ci/github-actions/ci.yml | 4 ---- src/ci/scripts/setup-environment.sh | 15 -------------- src/ci/scripts/symlink-build-dir.sh | 15 -------------- src/ci/shared.sh | 31 +++++++---------------------- 7 files changed, 7 insertions(+), 115 deletions(-) delete mode 100644 src/ci/azure-pipelines/auto.yml delete mode 100644 src/ci/azure-pipelines/try.yml delete mode 100755 src/ci/scripts/symlink-build-dir.sh diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 451116f320d64..a7be9978c0bc5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -98,9 +98,6 @@ jobs: - name: install WIX run: src/ci/scripts/install-wix.sh if: success() && !env.SKIP_JOB - - name: ensure the build happens on a partition with enough space - run: src/ci/scripts/symlink-build-dir.sh - if: success() && !env.SKIP_JOB - name: disable git crlf conversion run: src/ci/scripts/disable-git-crlf-conversion.sh if: success() && !env.SKIP_JOB @@ -496,9 +493,6 @@ jobs: - name: install WIX run: src/ci/scripts/install-wix.sh if: success() && !env.SKIP_JOB - - name: ensure the build happens on a partition with enough space - run: src/ci/scripts/symlink-build-dir.sh - if: success() && !env.SKIP_JOB - name: disable git crlf conversion run: src/ci/scripts/disable-git-crlf-conversion.sh if: success() && !env.SKIP_JOB @@ -609,9 +603,6 @@ jobs: - name: install WIX run: src/ci/scripts/install-wix.sh if: success() && !env.SKIP_JOB - - name: ensure the build happens on a partition with enough space - run: src/ci/scripts/symlink-build-dir.sh - if: success() && !env.SKIP_JOB - name: disable git crlf conversion run: src/ci/scripts/disable-git-crlf-conversion.sh if: success() && !env.SKIP_JOB diff --git a/src/ci/azure-pipelines/auto.yml b/src/ci/azure-pipelines/auto.yml deleted file mode 100644 index 37c2e9bc35a0d..0000000000000 --- a/src/ci/azure-pipelines/auto.yml +++ /dev/null @@ -1,26 +0,0 @@ -##################################### -## READ BEFORE CHANGING THIS ## -##################################### - -# We're in the process of evaluating GitHub Actions as a possible replacement -# for Azure Pipelines, and at the moment the configuration is duplicated -# between the two CI providers. Be sure to also change the configuration in -# src/ci/github-actions when changing this file. - -##################################### - -# -# Azure Pipelines "auto" branch build for Rust on macOS -# - -pr: none -trigger: - - auto - -jobs: -- job: Dummy - timeoutInMinutes: 600 - pool: - vmImage: ubuntu-16.04 - steps: - - bash: echo "We're running this job since bors is still gating on Azure" diff --git a/src/ci/azure-pipelines/try.yml b/src/ci/azure-pipelines/try.yml deleted file mode 100644 index 62bb6f4733412..0000000000000 --- a/src/ci/azure-pipelines/try.yml +++ /dev/null @@ -1,22 +0,0 @@ -##################################### -## READ BEFORE CHANGING THIS ## -##################################### - -# We're in the process of evaluating GitHub Actions as a possible replacement -# for Azure Pipelines, and at the moment the configuration is duplicated -# between the two CI providers. Be sure to also change the configuration in -# src/ci/github-actions when changing this file. - -##################################### - -pr: none -trigger: -- try - -jobs: -- job: Dummy - timeoutInMinutes: 600 - pool: - vmImage: ubuntu-16.04 - steps: - - bash: echo "We're running this job since bors is still gating on Azure" diff --git a/src/ci/github-actions/ci.yml b/src/ci/github-actions/ci.yml index 173ee170c9f58..57832ac2b9594 100644 --- a/src/ci/github-actions/ci.yml +++ b/src/ci/github-actions/ci.yml @@ -161,10 +161,6 @@ x--expand-yaml-anchors--remove: run: src/ci/scripts/install-wix.sh <<: *step - - name: ensure the build happens on a partition with enough space - run: src/ci/scripts/symlink-build-dir.sh - <<: *step - - name: disable git crlf conversion run: src/ci/scripts/disable-git-crlf-conversion.sh <<: *step diff --git a/src/ci/scripts/setup-environment.sh b/src/ci/scripts/setup-environment.sh index 411ef6f9b2822..0bc35f932832c 100755 --- a/src/ci/scripts/setup-environment.sh +++ b/src/ci/scripts/setup-environment.sh @@ -8,21 +8,6 @@ IFS=$'\n\t' source "$(cd "$(dirname "$0")" && pwd)/../shared.sh" -# Since matrix variables are readonly in Azure Pipelines, we take -# INITIAL_RUST_CONFIGURE_ARGS and establish RUST_CONFIGURE_ARGS -# which downstream steps can alter -if isAzurePipelines; then - # macOS ships with Bash 3.16, so we cannot use [[ -v FOO ]], - # which was introduced in Bash 4.2 - if [[ -z "${INITIAL_RUST_CONFIGURE_ARGS+x}" ]]; then - INITIAL_RUST_CONFIG="" - echo "No initial Rust configure args set" - else - INITIAL_RUST_CONFIG="${INITIAL_RUST_CONFIGURE_ARGS}" - ciCommandSetEnv RUST_CONFIGURE_ARGS "${INITIAL_RUST_CONFIG}" - fi -fi - # Load extra environment variables vars="${EXTRA_VARIABLES-}" echo "${vars}" | jq '' >/dev/null # Validate JSON and exit on errors diff --git a/src/ci/scripts/symlink-build-dir.sh b/src/ci/scripts/symlink-build-dir.sh deleted file mode 100755 index 23849f7047c54..0000000000000 --- a/src/ci/scripts/symlink-build-dir.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash -# We've had multiple issues with the default disk running out of disk space -# during builds, and it looks like other disks mounted in the VMs have more -# space available. This script synlinks the build directory to those other -# disks, in the CI providers and OSes affected by this. - -set -euo pipefail -IFS=$'\n\t' - -source "$(cd "$(dirname "$0")" && pwd)/../shared.sh" - -if isWindows && isAzurePipelines; then - cmd //c "mkdir c:\\MORE_SPACE" - cmd //c "mklink /J build c:\\MORE_SPACE" -fi diff --git a/src/ci/shared.sh b/src/ci/shared.sh index 1f218bc834608..8a88c56194c60 100644 --- a/src/ci/shared.sh +++ b/src/ci/shared.sh @@ -28,11 +28,7 @@ function retry { } function isCI { - [[ "${CI-false}" = "true" ]] || isAzurePipelines || isGitHubActions -} - -function isAzurePipelines { - [[ "${TF_BUILD-False}" = "True" ]] + [[ "${CI-false}" = "true" ]] || isGitHubActions } function isGitHubActions { @@ -63,9 +59,7 @@ function isCiBranch { fi name="$1" - if isAzurePipelines; then - [[ "${BUILD_SOURCEBRANCHNAME}" = "${name}" ]] - elif isGitHubActions; then + if isGitHubActions; then [[ "${GITHUB_REF}" = "refs/heads/${name}" ]] else echo "isCiBranch only works inside CI!" @@ -74,10 +68,7 @@ function isCiBranch { } function ciBaseBranch { - if isAzurePipelines; then - echo "unsupported on Azure Pipelines" - exit 1 - elif isGitHubActions; then + if isGitHubActions; then echo "${GITHUB_BASE_REF#refs/heads/}" else echo "ciBaseBranch only works inside CI!" @@ -86,9 +77,7 @@ function ciBaseBranch { } function ciCommit { - if isAzurePipelines; then - echo "${BUILD_SOURCEVERSION}" - elif isGitHubActions; then + if isGitHubActions; then echo "${GITHUB_SHA}" else echo "ciCommit only works inside CI!" @@ -97,9 +86,7 @@ function ciCommit { } function ciCheckoutPath { - if isAzurePipelines; then - echo "${BUILD_SOURCESDIRECTORY}" - elif isGitHubActions; then + if isGitHubActions; then echo "${GITHUB_WORKSPACE}" else echo "ciCheckoutPath only works inside CI!" @@ -114,9 +101,7 @@ function ciCommandAddPath { fi path="$1" - if isAzurePipelines; then - echo "##vso[task.prependpath]${path}" - elif isGitHubActions; then + if isGitHubActions; then echo "${path}" >> "${GITHUB_PATH}" else echo "ciCommandAddPath only works inside CI!" @@ -132,9 +117,7 @@ function ciCommandSetEnv { name="$1" value="$2" - if isAzurePipelines; then - echo "##vso[task.setvariable variable=${name}]${value}" - elif isGitHubActions; then + if isGitHubActions; then echo "${name}=${value}" >> "${GITHUB_ENV}" else echo "ciCommandSetEnv only works inside CI!" From b926519d322a7e20973517e27d5d7e02984c120d Mon Sep 17 00:00:00 2001 From: Pietro Albini Date: Sun, 5 Jun 2022 12:30:01 +0200 Subject: [PATCH 2/4] remove clean-disk script The script wasn't referenced anywhere, and it's not useful anymore: /opt/ghc is not present in new images, while /usr/share/dotnet is only 2.3 GB rather than 16 GB. --- src/ci/scripts/clean-disk.sh | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100755 src/ci/scripts/clean-disk.sh diff --git a/src/ci/scripts/clean-disk.sh b/src/ci/scripts/clean-disk.sh deleted file mode 100755 index c50de37c492b4..0000000000000 --- a/src/ci/scripts/clean-disk.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash -# This script deletes some of the Azure-provided artifacts. We don't use these, -# and disk space is at a premium on our builders. - -set -euo pipefail -IFS=$'\n\t' - -source "$(cd "$(dirname "$0")" && pwd)/../shared.sh" - -# All the Linux builds happen inside Docker. -if isLinux; then - # 6.7GB - sudo rm -rf /opt/ghc - # 16GB - sudo rm -rf /usr/share/dotnet -fi From 6a6c39765f75fb1bd0cee95a896ce56de16186a9 Mon Sep 17 00:00:00 2001 From: Pietro Albini Date: Sun, 5 Jun 2022 12:30:55 +0200 Subject: [PATCH 3/4] remove azure pipelines-specific debug statement --- src/ci/init_repo.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/ci/init_repo.sh b/src/ci/init_repo.sh index 93af8c26111c2..ec45d9e8bc613 100755 --- a/src/ci/init_repo.sh +++ b/src/ci/init_repo.sh @@ -1,9 +1,5 @@ #!/usr/bin/env bash -# FIXME(61301): we need to debug spurious failures with this on Windows on -# Azure, so let's print more information in the logs. -set -x - set -o errexit set -o pipefail set -o nounset From 6523ef41da79f06c883f0572e068251ed4370a1e Mon Sep 17 00:00:00 2001 From: Pietro Albini Date: Sun, 5 Jun 2022 12:32:46 +0200 Subject: [PATCH 4/4] update comment --- src/ci/scripts/disable-git-crlf-conversion.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ci/scripts/disable-git-crlf-conversion.sh b/src/ci/scripts/disable-git-crlf-conversion.sh index 836145fbb8e60..6de080a9fde00 100755 --- a/src/ci/scripts/disable-git-crlf-conversion.sh +++ b/src/ci/scripts/disable-git-crlf-conversion.sh @@ -1,6 +1,6 @@ #!/bin/bash # Disable automatic line ending conversion, which is enabled by default on -# Azure's Windows image. Having the conversion enabled caused regressions both +# GitHub's Windows image. Having the conversion enabled caused regressions both # in our test suite (it broke miri tests) and in the ecosystem, since we # started shipping install scripts with CRLF endings instead of the old LF. #