Commit c6fd7961 authored by Stephanos Ioannidis's avatar Stephanos Ioannidis
Browse files

ci: twister: Clone cached Zephyr repository

This commit updates the twister workflow to pre-clone the Zephyr
repository from the runner repository cache.

Note that the `origin` remote URL is reconfigured to that of the GitHub
Zephyr repository because the checkout action attempts to delete
everything and re-clone otherwise.

Signed-off-by: default avatarStephanos Ioannidis <root@stephanos.io>
parent 90eecd07
Loading
Loading
Loading
Loading
+13 −0
Changes for .github/workflows/twister.yaml: 13 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -44,6 +44,13 @@ jobs:
          # hotfix, until we have a better way to deal with existing data
          rm -rf zephyr zephyr-testing

      - name: Clone cached Zephyr repository
        if: github.event_name == 'pull_request_target'
        continue-on-error: true
        run: |
          git clone /github/cache/zephyrproject/zephyr .
          git remote set-url origin ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}

      - name: Checkout
        if: github.event_name == 'pull_request_target'
        uses: actions/checkout@v3
@@ -129,6 +136,12 @@ jobs:
          # hotfix, until we have a better way to deal with existing data
          rm -rf zephyr zephyr-testing

      - name: Clone cached Zephyr repository
        continue-on-error: true
        run: |
          git clone /github/cache/zephyrproject/zephyr .
          git remote set-url origin ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}

      - name: Checkout
        uses: actions/checkout@v3
        with: