Skip to content

Commit 785d04e

Browse files
committed
test auto build
1 parent 1d67944 commit 785d04e

File tree

2 files changed

+6
-21
lines changed

2 files changed

+6
-21
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,8 @@ jobs:
234234
fi
235235
exit ${STATUS}
236236
env:
237-
AWS_ACCESS_KEY_ID: ${{ env.CACHES_AWS_ACCESS_KEY_ID }}
238-
AWS_SECRET_ACCESS_KEY: ${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.CACHES_AWS_ACCESS_KEY_ID)] }}
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)] }}
239239

240240
- name: create github artifacts
241241
run: src/ci/scripts/create-doc-artifacts.sh
@@ -257,8 +257,8 @@ jobs:
257257
- name: upload artifacts to S3
258258
run: src/ci/scripts/upload-artifacts.sh
259259
env:
260-
AWS_ACCESS_KEY_ID: ${{ env.ARTIFACTS_AWS_ACCESS_KEY_ID }}
261-
AWS_SECRET_ACCESS_KEY: ${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.ARTIFACTS_AWS_ACCESS_KEY_ID)] }}
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)] }}
262262
# Adding a condition on DEPLOY=1 or DEPLOY_ALT=1 is not needed as all deploy
263263
# builders *should* have the AWS credentials available. Still, explicitly
264264
# adding the condition is helpful as this way CI will not silently skip
@@ -307,20 +307,5 @@ jobs:
307307
# !cancelled() executes the job regardless of whether the previous jobs passed or failed
308308
if: ${{ !cancelled() && contains(fromJSON('["auto", "try"]'), needs.calculate_matrix.outputs.run_type) }}
309309
steps:
310-
- name: checkout the source code
311-
uses: actions/checkout@v4
312-
with:
313-
fetch-depth: 2
314-
# Calculate the exit status of the whole CI workflow.
315-
# If all dependent jobs were successful, this exits with 0 (and the outcome job continues successfully).
316-
# If a some dependent job has failed, this exits with 1.
317310
- name: calculate the correct exit status
318-
run: jq --exit-status 'all(.result == "success" or .result == "skipped")' <<< '${{ toJson(needs) }}'
319-
# Publish the toolstate if an auto build succeeds (just before push to master)
320-
- name: publish toolstate
321-
run: src/ci/publish_toolstate.sh
322-
shell: bash
323-
if: needs.calculate_matrix.outputs.run_type == 'auto'
324-
env:
325-
TOOLSTATE_ISSUES_API_URL: https://api.github.com/repos/rust-lang/rust/issues
326-
TOOLSTATE_PUBLISH: 1
311+
run: exit 1 # invalidate auto build

src/ci/github-actions/jobs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ auto:
228228
- name: dist-x86_64-linux
229229
env:
230230
CODEGEN_BACKENDS: llvm,cranelift
231-
<<: *job-linux-36c-codebuild
231+
<<: *job-linux-16c
232232

233233
- name: dist-x86_64-linux-alt
234234
env:

0 commit comments

Comments
 (0)