about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJakub Beránek <berykubik@gmail.com>2025-07-12 22:30:19 +0200
committerGitHub <noreply@github.com>2025-07-12 20:30:19 +0000
commit7a1593c597ba733260db2d17ddad8fd11db7ad29 (patch)
tree2771c434777a23a910af6d77f964c35481dd8ae3
parentf5c9403551435781afd651d62cb700eb4e81321e (diff)
downloadrust-7a1593c597ba733260db2d17ddad8fd11db7ad29.tar.gz
rust-7a1593c597ba733260db2d17ddad8fd11db7ad29.zip
Add CI workflow for automatically performing subtree sync pulls
This CI workflow will run the https://github.com/rust-lang/josh-sync
tool on Mondays and Thursdays. It will try to do a pull (sync stdarch
changes from rust-lang/rust into this repository). When it runs, three
things can happen:
- There are no rustc changes to be pulled, the bot does nothing.
- There are some new changes to be pulled. In that case, the bot will
either open or update an existing PR titled "Rustc pull update" on this
repository with the changes. After the PR is merged, we should ideally
do the opposite sync (push) manually.
- The pull fails (usually because of a merge conflict), or the bot
determines that a pull PR has been opened for more than a week without
being merged. In that case, it will post a ping to
https://rust-lang.zulipchat.com/#narrow/channel/219381-t-libs/topic/compiler-builtins.20subtree.20sync.20automation/with/528482375.
-rw-r--r--library/compiler-builtins/.github/workflows/rustc-pull.yml23
1 files changed, 23 insertions, 0 deletions
diff --git a/library/compiler-builtins/.github/workflows/rustc-pull.yml b/library/compiler-builtins/.github/workflows/rustc-pull.yml
new file mode 100644
index 00000000000..ba698492e42
--- /dev/null
+++ b/library/compiler-builtins/.github/workflows/rustc-pull.yml
@@ -0,0 +1,23 @@
+# Perform a subtree sync (pull) using the josh-sync tool once every few days (or on demand).
+name: rustc-pull
+
+on:
+  workflow_dispatch:
+  schedule:
+    # Run at 04:00 UTC every Monday and Thursday
+    - cron: '0 4 * * 1,4'
+
+jobs:
+  pull:
+    if: github.repository == 'rust-lang/compiler-builtins'
+    uses: rust-lang/josh-sync/.github/workflows/rustc-pull.yml@main
+    with:
+      # https://rust-lang.zulipchat.com/#narrow/channel/219381-t-libs/topic/compiler-builtins.20subtree.20sync.20automation/with/528482375
+      zulip-stream-id: 219381
+      zulip-topic: 'compiler-builtins subtree sync automation'
+      zulip-bot-email:  "compiler-builtins-ci-bot@rust-lang.zulipchat.com"
+      pr-base-branch: master
+      branch-name: rustc-pull
+    secrets:
+      zulip-api-token: ${{ secrets.ZULIP_API_TOKEN }}
+      token: ${{ secrets.GITHUB_TOKEN }}