Skip to content

Commit aca77cd

Browse files
committed
Auto merge of #74565 - pietroalbini:build-on-gha, r=Mark-Simulacrum
Upload builds from GHA instead of Azure Pipelines This PR does two things: * Enables RLA comments on PRs (needed after the switch to GHA in RLA). * Switches GitHub Actions as the CI authorized to upload non-macOS builds. Note that Docker/LLVM caches will likely be busted. r? @Mark-Simulacrum
2 parents 8ad7bc3 + 750ad20 commit aca77cd

File tree

5 files changed

+78
-31
lines changed

5 files changed

+78
-31
lines changed

.github/workflows/ci.yml

+44-24
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ jobs:
3232
name: PR
3333
env:
3434
CI_JOB_NAME: "${{ matrix.name }}"
35-
SCCACHE_BUCKET: rust-lang-gha-caches
36-
TOOLSTATE_REPO: "https://github.com/pietroalbini/rust-toolstate"
37-
CACHE_DOMAIN: ci-caches-gha.rust-lang.org
35+
SCCACHE_BUCKET: rust-lang-ci-sccache2
36+
TOOLSTATE_REPO: "https://github.com/rust-lang-nursery/rust-toolstate"
37+
CACHE_DOMAIN: ci-caches.rust-lang.org
3838
if: "github.event_name == 'pull_request'"
3939
strategy:
4040
matrix:
@@ -63,6 +63,11 @@ jobs:
6363
with:
6464
github_token: "${{ secrets.github_token }}"
6565
if: "success() && !env.SKIP_JOB && github.ref != 'refs/heads/try'"
66+
- name: configure the PR in which the error message will be posted
67+
run: "echo \"[CI_PR_NUMBER=$num]\""
68+
env:
69+
num: "${{ github.event.number }}"
70+
if: "success() && !env.SKIP_JOBS && github.event_name == 'pull_request'"
6671
- name: add extra environment variables
6772
run: src/ci/scripts/setup-environment.sh
6873
env:
@@ -133,14 +138,14 @@ jobs:
133138
name: try
134139
env:
135140
CI_JOB_NAME: "${{ matrix.name }}"
136-
SCCACHE_BUCKET: rust-lang-gha-caches
137-
DEPLOY_BUCKET: rust-lang-gha
138-
TOOLSTATE_REPO: "https://github.com/pietroalbini/rust-toolstate"
139-
TOOLSTATE_ISSUES_API_URL: "https://api.github.com/repos/pietroalbini/rust-toolstate/issues"
141+
SCCACHE_BUCKET: rust-lang-ci-sccache2
142+
DEPLOY_BUCKET: rust-lang-ci2
143+
TOOLSTATE_REPO: "https://github.com/rust-lang-nursery/rust-toolstate"
144+
TOOLSTATE_ISSUES_API_URL: "https://api.github.com/repos/rust-lang/rust/issues"
140145
TOOLSTATE_PUBLISH: 1
141-
CACHES_AWS_ACCESS_KEY_ID: AKIA46X5W6CZOMUQATD5
142-
ARTIFACTS_AWS_ACCESS_KEY_ID: AKIA46X5W6CZH5AYXDVF
143-
CACHE_DOMAIN: ci-caches-gha.rust-lang.org
146+
CACHES_AWS_ACCESS_KEY_ID: AKIA46X5W6CZI5DHEBFL
147+
ARTIFACTS_AWS_ACCESS_KEY_ID: AKIA46X5W6CZN24CBO55
148+
CACHE_DOMAIN: ci-caches.rust-lang.org
144149
if: "github.event_name == 'push' && github.ref == 'refs/heads/try' && github.repository == 'rust-lang-ci/rust'"
145150
strategy:
146151
matrix:
@@ -162,6 +167,11 @@ jobs:
162167
with:
163168
github_token: "${{ secrets.github_token }}"
164169
if: "success() && !env.SKIP_JOB && github.ref != 'refs/heads/try'"
170+
- name: configure the PR in which the error message will be posted
171+
run: "echo \"[CI_PR_NUMBER=$num]\""
172+
env:
173+
num: "${{ github.event.number }}"
174+
if: "success() && !env.SKIP_JOBS && github.event_name == 'pull_request'"
165175
- name: add extra environment variables
166176
run: src/ci/scripts/setup-environment.sh
167177
env:
@@ -232,14 +242,14 @@ jobs:
232242
name: auto
233243
env:
234244
CI_JOB_NAME: "${{ matrix.name }}"
235-
SCCACHE_BUCKET: rust-lang-gha-caches
236-
DEPLOY_BUCKET: rust-lang-gha
237-
TOOLSTATE_REPO: "https://github.com/pietroalbini/rust-toolstate"
238-
TOOLSTATE_ISSUES_API_URL: "https://api.github.com/repos/pietroalbini/rust-toolstate/issues"
245+
SCCACHE_BUCKET: rust-lang-ci-sccache2
246+
DEPLOY_BUCKET: rust-lang-ci2
247+
TOOLSTATE_REPO: "https://github.com/rust-lang-nursery/rust-toolstate"
248+
TOOLSTATE_ISSUES_API_URL: "https://api.github.com/repos/rust-lang/rust/issues"
239249
TOOLSTATE_PUBLISH: 1
240-
CACHES_AWS_ACCESS_KEY_ID: AKIA46X5W6CZOMUQATD5
241-
ARTIFACTS_AWS_ACCESS_KEY_ID: AKIA46X5W6CZH5AYXDVF
242-
CACHE_DOMAIN: ci-caches-gha.rust-lang.org
250+
CACHES_AWS_ACCESS_KEY_ID: AKIA46X5W6CZI5DHEBFL
251+
ARTIFACTS_AWS_ACCESS_KEY_ID: AKIA46X5W6CZN24CBO55
252+
CACHE_DOMAIN: ci-caches.rust-lang.org
243253
if: "github.event_name == 'push' && github.ref == 'refs/heads/auto' && github.repository == 'rust-lang-ci/rust'"
244254
strategy:
245255
matrix:
@@ -479,6 +489,11 @@ jobs:
479489
with:
480490
github_token: "${{ secrets.github_token }}"
481491
if: "success() && !env.SKIP_JOB && github.ref != 'refs/heads/try'"
492+
- name: configure the PR in which the error message will be posted
493+
run: "echo \"[CI_PR_NUMBER=$num]\""
494+
env:
495+
num: "${{ github.event.number }}"
496+
if: "success() && !env.SKIP_JOBS && github.event_name == 'pull_request'"
482497
- name: add extra environment variables
483498
run: src/ci/scripts/setup-environment.sh
484499
env:
@@ -604,6 +619,11 @@ jobs:
604619
with:
605620
github_token: "${{ secrets.github_token }}"
606621
if: "success() && !env.SKIP_JOB && github.ref != 'refs/heads/try'"
622+
- name: configure the PR in which the error message will be posted
623+
run: "echo \"[CI_PR_NUMBER=$num]\""
624+
env:
625+
num: "${{ github.event.number }}"
626+
if: "success() && !env.SKIP_JOBS && github.event_name == 'pull_request'"
607627
- name: add extra environment variables
608628
run: src/ci/scripts/setup-environment.sh
609629
env:
@@ -674,14 +694,14 @@ jobs:
674694
name: master
675695
runs-on: ubuntu-latest
676696
env:
677-
SCCACHE_BUCKET: rust-lang-gha-caches
678-
DEPLOY_BUCKET: rust-lang-gha
679-
TOOLSTATE_REPO: "https://github.com/pietroalbini/rust-toolstate"
680-
TOOLSTATE_ISSUES_API_URL: "https://api.github.com/repos/pietroalbini/rust-toolstate/issues"
697+
SCCACHE_BUCKET: rust-lang-ci-sccache2
698+
DEPLOY_BUCKET: rust-lang-ci2
699+
TOOLSTATE_REPO: "https://github.com/rust-lang-nursery/rust-toolstate"
700+
TOOLSTATE_ISSUES_API_URL: "https://api.github.com/repos/rust-lang/rust/issues"
681701
TOOLSTATE_PUBLISH: 1
682-
CACHES_AWS_ACCESS_KEY_ID: AKIA46X5W6CZOMUQATD5
683-
ARTIFACTS_AWS_ACCESS_KEY_ID: AKIA46X5W6CZH5AYXDVF
684-
CACHE_DOMAIN: ci-caches-gha.rust-lang.org
702+
CACHES_AWS_ACCESS_KEY_ID: AKIA46X5W6CZI5DHEBFL
703+
ARTIFACTS_AWS_ACCESS_KEY_ID: AKIA46X5W6CZN24CBO55
704+
CACHE_DOMAIN: ci-caches.rust-lang.org
685705
if: "github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository == 'rust-lang-ci/rust'"
686706
steps:
687707
- name: checkout the source code

src/ci/azure-pipelines/auto.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ trigger:
1818
- auto
1919

2020
variables:
21-
- group: prod-credentials
21+
- group: dummy-credentials
2222

2323
jobs:
2424
- job: Linux
@@ -79,6 +79,9 @@ jobs:
7979
vmImage: macos-10.15
8080
steps:
8181
- template: steps/run.yml
82+
variables:
83+
# We're still uploading macOS builds from Azure Pipelines.
84+
- group: prod-credentials
8285
strategy:
8386
matrix:
8487
# OSX builders running tests, these run the full test suite.

src/ci/azure-pipelines/master.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ trigger:
1818
- master
1919

2020
variables:
21-
- group: prod-credentials
21+
- group: dummy-credentials
2222

2323
pool:
2424
vmImage: ubuntu-16.04

src/ci/azure-pipelines/try.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ trigger:
1414
- try
1515

1616
variables:
17-
- group: prod-credentials
17+
- group: dummy-credentials
1818

1919
jobs:
2020
- job: Linux

src/ci/github-actions/ci.yml

+28-4
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,26 @@ x--expand-yaml-anchors--remove:
3535
CI_JOB_NAME: ${{ matrix.name }}
3636

3737
- &public-variables
38-
SCCACHE_BUCKET: rust-lang-gha-caches
39-
TOOLSTATE_REPO: https://github.com/pietroalbini/rust-toolstate
40-
CACHE_DOMAIN: ci-caches-gha.rust-lang.org
38+
SCCACHE_BUCKET: rust-lang-ci-sccache2
39+
TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
40+
CACHE_DOMAIN: ci-caches.rust-lang.org
4141

4242
- &prod-variables
43+
SCCACHE_BUCKET: rust-lang-ci-sccache2
44+
DEPLOY_BUCKET: rust-lang-ci2
45+
TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
46+
TOOLSTATE_ISSUES_API_URL: https://api.github.com/repos/rust-lang/rust/issues
47+
TOOLSTATE_PUBLISH: 1
48+
# AWS_SECRET_ACCESS_KEYs are stored in GitHub's secrets storage, named
49+
# AWS_SECRET_ACCESS_KEY_<keyid>. Including the key id in the name allows to
50+
# rotate them in a single branch while keeping the old key in another
51+
# branch, which wouldn't be possible if the key was named with the kind
52+
# (caches, artifacts...).
53+
CACHES_AWS_ACCESS_KEY_ID: AKIA46X5W6CZI5DHEBFL
54+
ARTIFACTS_AWS_ACCESS_KEY_ID: AKIA46X5W6CZN24CBO55
55+
CACHE_DOMAIN: ci-caches.rust-lang.org
56+
57+
- &dummy-variables
4358
SCCACHE_BUCKET: rust-lang-gha-caches
4459
DEPLOY_BUCKET: rust-lang-gha
4560
TOOLSTATE_REPO: https://github.com/pietroalbini/rust-toolstate
@@ -92,6 +107,15 @@ x--expand-yaml-anchors--remove:
92107
if: success() && !env.SKIP_JOB && github.ref != 'refs/heads/try'
93108
<<: *step
94109

110+
# Rust Log Analyzer can't currently detect the PR number of a GitHub
111+
# Actions build on its own, so a hint in the log message is needed to
112+
# point it in the right direction.
113+
- name: configure the PR in which the error message will be posted
114+
run: echo "[CI_PR_NUMBER=$num]"
115+
env:
116+
num: ${{ github.event.number }}
117+
if: success() && !env.SKIP_JOBS && github.event_name == 'pull_request'
118+
95119
- name: add extra environment variables
96120
run: src/ci/scripts/setup-environment.sh
97121
env:
@@ -556,7 +580,7 @@ jobs:
556580
<<: *base-ci-job
557581
name: auto-fallible
558582
env:
559-
<<: [*shared-ci-variables, *prod-variables]
583+
<<: [*shared-ci-variables, *dummy-variables]
560584
if: github.event_name == 'push' && github.ref == 'refs/heads/auto' && github.repository == 'rust-lang-ci/rust'
561585
strategy:
562586
matrix:

0 commit comments

Comments
 (0)