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 <root@stephanos.io>
This commit is contained in:
parent
9a491a1b5b
commit
3d8e651992
2
.github/workflows/clang.yaml
vendored
2
.github/workflows/clang.yaml
vendored
|
@ -38,7 +38,7 @@ jobs:
|
|||
- name: Clone cached Zephyr repository
|
||||
continue-on-error: true
|
||||
run: |
|
||||
git clone /github/cache/zephyrproject/zephyr .
|
||||
git clone --shared /github/cache/zephyrproject/zephyr .
|
||||
git remote set-url origin ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}
|
||||
|
||||
- name: Checkout
|
||||
|
|
2
.github/workflows/codecov.yaml
vendored
2
.github/workflows/codecov.yaml
vendored
|
@ -39,7 +39,7 @@ jobs:
|
|||
- name: Clone cached Zephyr repository
|
||||
continue-on-error: true
|
||||
run: |
|
||||
git clone /github/cache/zephyrproject/zephyr .
|
||||
git clone --shared /github/cache/zephyrproject/zephyr .
|
||||
git remote set-url origin ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}
|
||||
|
||||
- name: checkout
|
||||
|
|
4
.github/workflows/twister.yaml
vendored
4
.github/workflows/twister.yaml
vendored
|
@ -51,7 +51,7 @@ jobs:
|
|||
if: github.event_name == 'pull_request_target'
|
||||
continue-on-error: true
|
||||
run: |
|
||||
git clone /github/cache/zephyrproject/zephyr .
|
||||
git clone --shared /github/cache/zephyrproject/zephyr .
|
||||
git remote set-url origin ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}
|
||||
|
||||
- name: Checkout
|
||||
|
@ -146,7 +146,7 @@ jobs:
|
|||
- name: Clone cached Zephyr repository
|
||||
continue-on-error: true
|
||||
run: |
|
||||
git clone /github/cache/zephyrproject/zephyr .
|
||||
git clone --shared /github/cache/zephyrproject/zephyr .
|
||||
git remote set-url origin ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}
|
||||
|
||||
- name: Checkout
|
||||
|
|
Loading…
Reference in a new issue