diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index 60a2eecc..b8797284 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -8,12 +8,13 @@ on: pull_request: env: + DEEPLINK_PATH: /mnt/cache/share/deeplinkci/github/${{ github.repository }} ENV_SOURCE: /mnt/cache/share/platform/env/dipu_latest PROXY_SOURCE: /mnt/cache/share/platform/env/proxy - WORKSPACE: /mnt/cache/share/deeplinkci/github/${{ github.repository }}/${{ github.run_number }} - CODE_SOURCE: source - CLANGD_TIDY_SOURCE: clangd-tidy CLANGD_EXEC: /mnt/cache/share/platform/dep/clang-17/bin/clangd + WORKSPACE: /mnt/cache/share/deeplinkci/github/${{ github.repository }}/${{ github.run_number }} + CODE_SOURCE: /mnt/cache/share/deeplinkci/github/${{ github.repository }}/${{ github.run_number }}/source + CLANGD_TIDY_SOURCE: /mnt/cache/share/deeplinkci/github/${{ github.repository }}/${{ github.run_number }}/clangd-tidy concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} @@ -24,6 +25,13 @@ jobs: name: checkout code runs-on: tps-sco-ci steps: + - name: clean obsolete workspaces + run: | + set -euxo pipefail + ls -la ${DEEPLINK_PATH} + rm -rf ${WORKSPACE} + find ${DEEPLINK_PATH} -maxdepth 1 -mmin +60 -type d -exec bash -c 'echo clean "$1" && echo "$1" ok' {} \; + false - name: prepare workspace run: | set -euxo pipefail