From 5fa74038cb81ef76d1a7de74db8ccc037ae390d1 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sun, 2 Jul 2023 11:38:37 +0200 Subject: [PATCH] cronjob auto-PR: make sure we are on a branch --- src/tools/miri/.github/workflows/ci.yml | 6 +++++- src/tools/miri/miri | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/tools/miri/.github/workflows/ci.yml b/src/tools/miri/.github/workflows/ci.yml index 90bd33f9817..39b49f2eaec 100644 --- a/src/tools/miri/.github/workflows/ci.yml +++ b/src/tools/miri/.github/workflows/ci.yml @@ -11,6 +11,7 @@ on: - 'master' schedule: - cron: '6 6 * * *' # At 6:06 UTC every day. + - cron: '42 * * * *' # Also each hour, for testing env: CARGO_UNSTABLE_SPARSE_REGISTRY: 'true' @@ -196,7 +197,10 @@ jobs: git config --global user.name 'The Miri Conjob Bot' git config --global user.email 'miri@cron.bot' - name: get changes from rustc - run: ./miri rustc-pull + run: | + git status # just to see more of what is happening + git checkout master # by default we are not on a branch + ./miri rustc-pull - name: Install rustup-toolchain-install-master run: cargo install -f rustup-toolchain-install-master - name: format changes (if any) diff --git a/src/tools/miri/miri b/src/tools/miri/miri index 7cda995879c..3ab7cc25dec 100755 --- a/src/tools/miri/miri +++ b/src/tools/miri/miri @@ -124,7 +124,7 @@ rustc-pull) git commit rust-version -m "Preparing for merge from rustc" || (echo "FAILED to commit rust-version file, something went wrong"; exit 1) # Fetch given rustc commit and note down which one that was git fetch http://localhost:8000/rust-lang/rust.git@$FETCH_COMMIT$JOSH_FILTER.git || (echo "FAILED to fetch new commits, something went wrong"; exit 1) - git merge FETCH_HEAD --no-ff -m "Merge from rustc" || (echo "FAILED to merge new commits, something went wrong"; exit 1) + git merge FETCH_HEAD --no-ff -m "Merge from rustc" || (echo "FAILED to merge new commits ($(git rev-parse FETCH_HEAD)), something went wrong"; exit 1) exit 0 ;; rustc-push)