Skip to content

Commit 3e8a479

Browse files
committed
Use checkout action throughout
1 parent f96c83b commit 3e8a479

File tree

1 file changed

+20
-6
lines changed

1 file changed

+20
-6
lines changed

.github/workflows/update-subtree.yml

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,27 @@ jobs:
1818
uses: actions/checkout@v4
1919
with:
2020
fetch-depth: 0
21+
path: verify-rust-std
2122

2223
- name: Checkout Kani
2324
uses: actions/checkout@v4
2425
with:
2526
repository: model-checking/kani
2627
path: kani-tmp
2728

29+
- name: Checkout Rust
30+
uses: actions/checkout@v4
31+
with:
32+
repository: rust-lang/rust
33+
fetch-depth: 0
34+
path: rust-tmp
35+
36+
- name: Checkout git-filter-repo
37+
uses: actions/checkout@v4
38+
with:
39+
repository: newren/git-filter-repo
40+
path: git-filter-repo
41+
2842
- name: Fetch Kani toolchain version
2943
run: |
3044
cd kani-tmp
@@ -38,14 +52,9 @@ jobs:
3852
echo "TOOLCHAIN_DATE=${TOOLCHAIN_DATE}" >> $GITHUB_ENV
3953
echo "Kani toolchain hash: ${COMMIT_HASH}"
4054
echo "COMMIT_HASH=${COMMIT_HASH}" >> $GITHUB_ENV
41-
cd ..
42-
rm -r kani-tmp
4355
4456
- name: Update subtree/library locally
4557
run: |
46-
pushd ..
47-
git clone [email protected]:newren/git-filter-repo
48-
git clone [email protected]:rust-lang/rust rust-tmp
4958
cd rust-tmp
5059
5160
# Ensure "upstream/master" branch contains the target commit
@@ -57,7 +66,8 @@ jobs:
5766
git checkout ${COMMIT_HASH}
5867
../git-filter-repo/git-filter-repo --subdirectory-filter library --force
5968
git checkout -b subtree/library
60-
popd
69+
70+
cd ../verify-rust-std
6171
git remote add rust-filtered ../rust-tmp/
6272
git fetch rust-filtered
6373
git checkout -b update-subtree/library rust-filtered/subtree/library
@@ -73,9 +83,11 @@ jobs:
7383
branch: update-subtree/library
7484
delete-branch: true
7585
base: subtree/library
86+
path: verify-rust-std
7687

7788
- name: Merge subtree/library changes
7889
run: |
90+
cd verify-rust-std
7991
SYNC_BRANCH="sync-$TOOLCHAIN_DATE"
8092
git checkout -t -b ${SYNC_BRANCH} origin/main
8193
git submodule update --init
@@ -101,6 +113,7 @@ jobs:
101113
up to and including ${{ env.COMMIT_HASH }} of ${{ env.TOOLCHAIN_DATE }}
102114
into main. This is a clean merge, no conflicts were detected.
103115
delete-branch: true
116+
path: verify-rust-std
104117

105118
- name: Create Pull Request with conflicts
106119
if: ${{ env.MERGE_CONFLICTS == 'yes' }}
@@ -113,3 +126,4 @@ jobs:
113126
into main. `git merge` resulted in conflicts, which require manual resolution.
114127
Files were commited with merge conflict markers.
115128
delete-branch: true
129+
path: verify-rust-std

0 commit comments

Comments
 (0)