Skip to content

Commit 3d8e651

Browse files
committed
ci: Clone cached Zephyr repository with shared objects
In the new ephemeral Zephyr runners, the cached repository files are located in a foreign file system and Git clone operation cannot create hard-links to the cached repository objects, which forces the Git clone operation to copy the objects from the cache file system to the runner container file system. This commit updates the CI workflows to instead perform a "shared clone" of the cached repository, which allows the cloned repository to utilise the object database of the cached repository. While "shared clone" can be often dangerous because the source repository objects can be deleted, in this case, the source repository (i.e. cached repository) is mounted as read-only and immutable. Signed-off-by: Stephanos Ioannidis <[email protected]>
1 parent 9a491a1 commit 3d8e651

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

.github/workflows/clang.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
- name: Clone cached Zephyr repository
3939
continue-on-error: true
4040
run: |
41-
git clone /github/cache/zephyrproject/zephyr .
41+
git clone --shared /github/cache/zephyrproject/zephyr .
4242
git remote set-url origin ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}
4343
4444
- name: Checkout

.github/workflows/codecov.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
- name: Clone cached Zephyr repository
4040
continue-on-error: true
4141
run: |
42-
git clone /github/cache/zephyrproject/zephyr .
42+
git clone --shared /github/cache/zephyrproject/zephyr .
4343
git remote set-url origin ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}
4444
4545
- name: checkout

.github/workflows/twister.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
if: github.event_name == 'pull_request_target'
5252
continue-on-error: true
5353
run: |
54-
git clone /github/cache/zephyrproject/zephyr .
54+
git clone --shared /github/cache/zephyrproject/zephyr .
5555
git remote set-url origin ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}
5656
5757
- name: Checkout
@@ -146,7 +146,7 @@ jobs:
146146
- name: Clone cached Zephyr repository
147147
continue-on-error: true
148148
run: |
149-
git clone /github/cache/zephyrproject/zephyr .
149+
git clone --shared /github/cache/zephyrproject/zephyr .
150150
git remote set-url origin ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}
151151
152152
- name: Checkout

0 commit comments

Comments
 (0)