Skip to content

Commit 0fc6f16

Browse files
committed
Auto merge of rust-lang#141634 - Kobzol:try-perf, r=pietroalbini
Fix CI for unrolled builds on the `try-perf` branch That branch is essentially the same as the `try` branch, it also needs S3 permissions. While at it, I cleaned up secret loading a bit. Long term, we should move rollup unrolling from rustc-perf to bors, so that we can have only a single try branch. The AWS Terraform configuration will also have to be changed to provide the secrets (the `bors` environment) also for the `try-perf` branch. r? `@marcoieni`
2 parents d76fe15 + 7fae5ef commit 0fc6f16

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,8 @@ jobs:
7979
# This also ensures that PR CI (which doesn't get write access to S3) works, as it cannot
8080
# access the environment.
8181
#
82-
# We only enable the environment for the rust-lang/rust repository, so that rust-lang-ci/rust
83-
# CI works until we migrate off it (since that repository doesn't contain the environment).
84-
environment: ${{ ((github.repository == 'rust-lang/rust' && (github.ref == 'refs/heads/try' || github.ref == 'refs/heads/auto')) && 'bors') || '' }}
82+
# We only enable the environment for the rust-lang/rust repository, so that CI works on forks.
83+
environment: ${{ ((github.repository == 'rust-lang/rust' && (github.ref == 'refs/heads/try' || github.ref == 'refs/heads/try-perf' || github.ref == 'refs/heads/auto')) && 'bors') || '' }}
8584
env:
8685
CI_JOB_NAME: ${{ matrix.name }}
8786
CI_JOB_DOC_URL: ${{ matrix.doc_url }}
@@ -234,8 +233,8 @@ jobs:
234233
fi
235234
exit ${STATUS}
236235
env:
237-
AWS_ACCESS_KEY_ID: ${{ (github.repository == 'rust-lang/rust' && secrets.CACHES_AWS_ACCESS_KEY_ID) || env.CACHES_AWS_ACCESS_KEY_ID }}
238-
AWS_SECRET_ACCESS_KEY: ${{ (github.repository == 'rust-lang/rust' && secrets.CACHES_AWS_SECRET_ACCESS_KEY) || secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.CACHES_AWS_ACCESS_KEY_ID)] }}
236+
AWS_ACCESS_KEY_ID: ${{ secrets.CACHES_AWS_ACCESS_KEY_ID }}
237+
AWS_SECRET_ACCESS_KEY: ${{ secrets.CACHES_AWS_SECRET_ACCESS_KEY }}
239238

240239
- name: create github artifacts
241240
run: src/ci/scripts/create-doc-artifacts.sh
@@ -257,8 +256,8 @@ jobs:
257256
- name: upload artifacts to S3
258257
run: src/ci/scripts/upload-artifacts.sh
259258
env:
260-
AWS_ACCESS_KEY_ID: ${{ (github.repository == 'rust-lang/rust' && secrets.ARTIFACTS_AWS_ACCESS_KEY_ID) || env.ARTIFACTS_AWS_ACCESS_KEY_ID }}
261-
AWS_SECRET_ACCESS_KEY: ${{ (github.repository == 'rust-lang/rust' && secrets.ARTIFACTS_AWS_SECRET_ACCESS_KEY) || secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.ARTIFACTS_AWS_ACCESS_KEY_ID)] }}
259+
AWS_ACCESS_KEY_ID: ${{ secrets.ARTIFACTS_AWS_ACCESS_KEY_ID }}
260+
AWS_SECRET_ACCESS_KEY: ${{ secrets.ARTIFACTS_AWS_SECRET_ACCESS_KEY }}
262261
# Adding a condition on DEPLOY=1 or DEPLOY_ALT=1 is not needed as all deploy
263262
# builders *should* have the AWS credentials available. Still, explicitly
264263
# adding the condition is helpful as this way CI will not silently skip

0 commit comments

Comments
 (0)