From 939a71162d29576157c77e438f97dcdee506bd1e Mon Sep 17 00:00:00 2001 From: lcnr Date: Thu, 9 May 2024 18:20:00 +0000 Subject: update pull_request_templete --- .github/pull_request_template.md | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .github/pull_request_template.md (limited to '.github') diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 00000000000..ca704082a3f --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,10 @@ + \ No newline at end of file -- cgit 1.4.1-3-g733a5 From 7b6a3d029bf2884126aad7c5d718b1f7eeab3980 Mon Sep 17 00:00:00 2001 From: Jakub Beránek Date: Wed, 15 May 2024 15:48:52 +0200 Subject: CI: fix toolstate publishing --- .github/workflows/ci.yml | 3 ++- src/ci/github-actions/jobs.yml | 2 -- src/tools/publish_toolstate.py | 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-) (limited to '.github') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5364c1e9f46..0551d44649c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -190,7 +190,6 @@ jobs: env: AWS_ACCESS_KEY_ID: ${{ env.CACHES_AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.CACHES_AWS_ACCESS_KEY_ID)] }} - TOOLSTATE_REPO_ACCESS_TOKEN: ${{ secrets.TOOLSTATE_REPO_ACCESS_TOKEN }} - name: create github artifacts run: src/ci/scripts/create-doc-artifacts.sh @@ -241,3 +240,5 @@ jobs: if: needs.calculate_matrix.outputs.run_type == 'auto' env: TOOLSTATE_REPO_ACCESS_TOKEN: ${{ secrets.TOOLSTATE_REPO_ACCESS_TOKEN }} + TOOLSTATE_ISSUES_API_URL: https://api.github.com/repos/rust-lang/rust/issues + TOOLSTATE_PUBLISH: 1 diff --git a/src/ci/github-actions/jobs.yml b/src/ci/github-actions/jobs.yml index 04888dc09b5..989fcc9f764 100644 --- a/src/ci/github-actions/jobs.yml +++ b/src/ci/github-actions/jobs.yml @@ -50,8 +50,6 @@ envs: production: &production DEPLOY_BUCKET: rust-lang-ci2 - TOOLSTATE_ISSUES_API_URL: https://api.github.com/repos/rust-lang/rust/issues - TOOLSTATE_PUBLISH: 1 # AWS_SECRET_ACCESS_KEYs are stored in GitHub's secrets storage, named # AWS_SECRET_ACCESS_KEY_. Including the key id in the name allows to # rotate them in a single branch while keeping the old key in another diff --git a/src/tools/publish_toolstate.py b/src/tools/publish_toolstate.py index f9421117eaa..860d21876de 100755 --- a/src/tools/publish_toolstate.py +++ b/src/tools/publish_toolstate.py @@ -3,8 +3,7 @@ # This script computes the new "current" toolstate for the toolstate repo (not to be # confused with publishing the test results, which happens in `src/bootstrap/toolstate.rs`). -# It gets called from `src/ci/publish_toolstate.sh` when a new commit lands on `master` -# (i.e., after it passed all checks on `auto`). +# It gets called from `src/ci/publish_toolstate.sh` at the end of an `auto` build. from __future__ import print_function -- cgit 1.4.1-3-g733a5 From f63931bc1a8cc44e7fd5cea772da87dfac44bedc Mon Sep 17 00:00:00 2001 From: Chris Denton Date: Sun, 26 May 2024 22:00:43 +0000 Subject: Cleanup custom mingw in CI --- .github/workflows/ci.yml | 3 --- src/ci/github-actions/jobs.yml | 4 ---- src/ci/scripts/install-mingw.sh | 17 ++++------------- src/ci/scripts/install-msys2.sh | 27 --------------------------- 4 files changed, 4 insertions(+), 47 deletions(-) delete mode 100755 src/ci/scripts/install-msys2.sh (limited to '.github') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0551d44649c..3f9936dc5b2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -155,9 +155,6 @@ jobs: - name: checkout submodules run: src/ci/scripts/checkout-submodules.sh - - name: install MSYS2 - run: src/ci/scripts/install-msys2.sh - - name: install MinGW run: src/ci/scripts/install-mingw.sh diff --git a/src/ci/github-actions/jobs.yml b/src/ci/github-actions/jobs.yml index 05470eebf01..ca86f3f0110 100644 --- a/src/ci/github-actions/jobs.yml +++ b/src/ci/github-actions/jobs.yml @@ -378,7 +378,6 @@ auto: # We are intentionally allowing an old toolchain on this builder (and that's # incompatible with LLVM downloads today). NO_DOWNLOAD_CI_LLVM: 1 - CUSTOM_MINGW: 1 <<: *job-windows-8c - image: x86_64-mingw @@ -390,7 +389,6 @@ auto: # We are intentionally allowing an old toolchain on this builder (and that's # incompatible with LLVM downloads today). NO_DOWNLOAD_CI_LLVM: 1 - CUSTOM_MINGW: 1 <<: *job-windows-8c - image: dist-x86_64-msvc @@ -439,7 +437,6 @@ auto: # incompatible with LLVM downloads today). NO_DOWNLOAD_CI_LLVM: 1 SCRIPT: python x.py dist bootstrap --include-default-paths - CUSTOM_MINGW: 1 DIST_REQUIRE_ALL_TOOLS: 1 <<: *job-windows-8c @@ -453,7 +450,6 @@ auto: # We are intentionally allowing an old toolchain on this builder (and that's # incompatible with LLVM downloads today). NO_DOWNLOAD_CI_LLVM: 1 - CUSTOM_MINGW: 1 DIST_REQUIRE_ALL_TOOLS: 1 <<: *job-windows-8c diff --git a/src/ci/scripts/install-mingw.sh b/src/ci/scripts/install-mingw.sh index 45541b8b693..38af8b6aceb 100755 --- a/src/ci/scripts/install-mingw.sh +++ b/src/ci/scripts/install-mingw.sh @@ -1,8 +1,6 @@ #!/bin/bash # If we need to download a custom MinGW, do so here and set the path # appropriately. -# -# Otherwise install MinGW through `pacman` set -euo pipefail IFS=$'\n\t' @@ -16,19 +14,16 @@ if isWindows && isKnownToBeMingwBuild; then case "${CI_JOB_NAME}" in *i686*) bits=32 - arch=i686 mingw_archive="${MINGW_ARCHIVE_32}" ;; *x86_64*) bits=64 - arch=x86_64 mingw_archive="${MINGW_ARCHIVE_64}" ;; *aarch64*) # aarch64 is a cross-compiled target. Use the x86_64 # mingw, since that's the host architecture. bits=64 - arch=x86_64 mingw_archive="${MINGW_ARCHIVE_64}" ;; *) @@ -38,13 +33,9 @@ if isWindows && isKnownToBeMingwBuild; then ;; esac - if [[ "${CUSTOM_MINGW:-0}" == 0 ]]; then - pacman -S --noconfirm --needed mingw-w64-$arch-toolchain - else - mingw_dir="mingw${bits}" + mingw_dir="mingw${bits}" - curl -o mingw.7z "${MIRRORS_BASE}/${mingw_archive}" - 7z x -y mingw.7z > /dev/null - ciCommandAddPath "$(pwd)/${mingw_dir}/bin" - fi + curl -o mingw.7z "${MIRRORS_BASE}/${mingw_archive}" + 7z x -y mingw.7z > /dev/null + ciCommandAddPath "$(pwd)/${mingw_dir}/bin" fi diff --git a/src/ci/scripts/install-msys2.sh b/src/ci/scripts/install-msys2.sh deleted file mode 100755 index 968b1e572e4..00000000000 --- a/src/ci/scripts/install-msys2.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash -# Clean up and prepare the MSYS2 installation. -# MSYS2 is used by the MinGW toolchain for assembling things. - -set -euo pipefail -IFS=$'\n\t' - -source "$(cd "$(dirname "$0")" && pwd)/../shared.sh" -if isWindows; then - # Detect the native Python version installed on the agent. On GitHub - # Actions, the C:\hostedtoolcache\windows\Python directory contains a - # subdirectory for each installed Python version. - # - # The -V flag of the sort command sorts the input by version number. - native_python_version="$(ls /c/hostedtoolcache/windows/Python | sort -Vr | head -n 1)" - - # Make sure we use the native python interpreter instead of some msys equivalent - # one way or another. The msys interpreters seem to have weird path conversions - # baked in which break LLVM's build system one way or another, so let's use the - # native version which keeps everything as native as possible. - python_home="/c/hostedtoolcache/windows/Python/${native_python_version}/x64" - if ! [[ -f "${python_home}/python3.exe" ]]; then - cp "${python_home}/python.exe" "${python_home}/python3.exe" - fi - ciCommandAddPath "C:\\hostedtoolcache\\windows\\Python\\${native_python_version}\\x64" - ciCommandAddPath "C:\\hostedtoolcache\\windows\\Python\\${native_python_version}\\x64\\Scripts" -fi -- cgit 1.4.1-3-g733a5 From 19cfe8d9e6989c4ea49be203757cd086e0ab015c Mon Sep 17 00:00:00 2001 From: Chris Denton Date: Sun, 26 May 2024 22:01:26 +0000 Subject: Add "Setup Python" action to github-hosted runners --- .github/workflows/ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) (limited to '.github') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3f9936dc5b2..c9d6c56076a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -154,6 +154,12 @@ jobs: - name: checkout submodules run: src/ci/scripts/checkout-submodules.sh + + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: '3.x' + if: runner.environment == 'github-hosted' - name: install MinGW run: src/ci/scripts/install-mingw.sh -- cgit 1.4.1-3-g733a5 From 2fe41c68d3819a94a3f6a7773e109619bd4cc241 Mon Sep 17 00:00:00 2001 From: Jakub Beránek Date: Wed, 5 Jun 2024 16:41:59 +0200 Subject: Fix publishing of toolstate history --- .github/workflows/ci.yml | 3 ++- src/ci/github-actions/jobs.yml | 1 + src/ci/publish_toolstate.sh | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) (limited to '.github') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c9d6c56076a..d2d4a7e3d42 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,6 +38,8 @@ concurrency: cancel-in-progress: true env: TOOLSTATE_REPO: "https://github.com/rust-lang-nursery/rust-toolstate" + # This will be empty in PR jobs. + TOOLSTATE_REPO_ACCESS_TOKEN: ${{ secrets.TOOLSTATE_REPO_ACCESS_TOKEN }} jobs: # The job matrix for `calculate_matrix` is defined in src/ci/github-actions/jobs.yml. # It calculates which jobs should be executed, based on the data of the ${{ github }} context. @@ -242,6 +244,5 @@ jobs: shell: bash if: needs.calculate_matrix.outputs.run_type == 'auto' env: - TOOLSTATE_REPO_ACCESS_TOKEN: ${{ secrets.TOOLSTATE_REPO_ACCESS_TOKEN }} TOOLSTATE_ISSUES_API_URL: https://api.github.com/repos/rust-lang/rust/issues TOOLSTATE_PUBLISH: 1 diff --git a/src/ci/github-actions/jobs.yml b/src/ci/github-actions/jobs.yml index ca86f3f0110..45c3fb4b2cd 100644 --- a/src/ci/github-actions/jobs.yml +++ b/src/ci/github-actions/jobs.yml @@ -58,6 +58,7 @@ envs: CACHES_AWS_ACCESS_KEY_ID: AKIA46X5W6CZI5DHEBFL ARTIFACTS_AWS_ACCESS_KEY_ID: AKIA46X5W6CZN24CBO55 AWS_REGION: us-west-1 + TOOLSTATE_PUBLISH: 1 try: <<: *production diff --git a/src/ci/publish_toolstate.sh b/src/ci/publish_toolstate.sh index 691df04e754..e828365c416 100755 --- a/src/ci/publish_toolstate.sh +++ b/src/ci/publish_toolstate.sh @@ -24,8 +24,8 @@ cd rust-toolstate FAILURE=1 for RETRY_COUNT in 1 2 3 4 5; do # The purpose of this is to publish the new "current" toolstate in the toolstate repo. - # This happens post-landing, on master. - # (Publishing the per-commit test results happens pre-landing in src/bootstrap/toolstate.rs). + # This happens at the end of auto builds. + # (Publishing the per-commit test results happens in src/bootstrap/toolstate.rs). "$(ciCheckoutPath)/src/tools/publish_toolstate.py" "$GIT_COMMIT" \ "$GIT_COMMIT_MSG" \ "$MESSAGE_FILE" \ -- cgit 1.4.1-3-g733a5 From 9ce12c4cab44c2ce5356daf07bdc21fc56e2c48f Mon Sep 17 00:00:00 2001 From: Jakub Beránek Date: Fri, 7 Jun 2024 11:26:36 +0200 Subject: CI: remove `Setup Python` action --- .github/workflows/ci.yml | 6 ------ 1 file changed, 6 deletions(-) (limited to '.github') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d2d4a7e3d42..521f8ef0f5a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -156,12 +156,6 @@ jobs: - name: checkout submodules run: src/ci/scripts/checkout-submodules.sh - - - name: Setup Python - uses: actions/setup-python@v5 - with: - python-version: '3.x' - if: runner.environment == 'github-hosted' - name: install MinGW run: src/ci/scripts/install-mingw.sh -- cgit 1.4.1-3-g733a5 From 48d342536421b6806dcfe3c0c76718249dbea6bc Mon Sep 17 00:00:00 2001 From: Chris Denton Date: Wed, 12 Jun 2024 17:33:52 +0000 Subject: Remove some msys2 utils --- .github/workflows/ci.yml | 2 -- 1 file changed, 2 deletions(-) (limited to '.github') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 521f8ef0f5a..4cf0e5fba53 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -95,8 +95,6 @@ jobs: path-type: inherit install: > make - dos2unix - diffutils - name: disable git crlf conversion run: git config --global core.autocrlf false -- cgit 1.4.1-3-g733a5 From c006748f6272c19cedb67d25b4444bb07cc5ce12 Mon Sep 17 00:00:00 2001 From: Rémy Rakic Date: Fri, 14 Jun 2024 21:52:25 +0000 Subject: make bors ignore comments in PR template --- .github/pull_request_template.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to '.github') diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index ca704082a3f..fd54a153a16 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,3 +1,4 @@ + \ No newline at end of file +--> + -- cgit 1.4.1-3-g733a5