From ae29289f3c35f2f64f4f7c16b449322fa28952c2 Mon Sep 17 00:00:00 2001 From: workinright Date: Sat, 6 Sep 2025 18:05:51 +0200 Subject: [PATCH] commit --- .github/workflows/selfdrive_tests.yaml | 11 ++++++++ .github/workflows/setup-cache/action.yaml | 32 +++++++++++++++++++++++ .github/workflows/setup/action.yaml | 9 +------ 3 files changed, 44 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/setup-cache/action.yaml diff --git a/.github/workflows/selfdrive_tests.yaml b/.github/workflows/selfdrive_tests.yaml index 44ff010862..710d75e410 100644 --- a/.github/workflows/selfdrive_tests.yaml +++ b/.github/workflows/selfdrive_tests.yaml @@ -88,6 +88,17 @@ jobs: - uses: ./.github/workflows/compile-openpilot timeout-minutes: 30 + setup-cache: + name: setup cache + runs-on: ubuntu-24.04 + needs: ["build"] + steps: + - uses: actions/checkout@v4 + with: + submodules: true + - name: setup-cache + uses: ./.github/workflows/setup-cache + build_mac: name: build macOS if: false # temp disable since homebrew install is getting stuck diff --git a/.github/workflows/setup-cache/action.yaml b/.github/workflows/setup-cache/action.yaml new file mode 100644 index 0000000000..bd073c361e --- /dev/null +++ b/.github/workflows/setup-cache/action.yaml @@ -0,0 +1,32 @@ +name: 'setup-cache' + +inputs: + docker_hub_pat: + description: 'Auth token for Docker Hub, required for BuildJet jobs' + required: false + default: '' + sleep_time: + description: 'Time to sleep between retries' + required: false + default: 30 + +outputs: + duration: + description: 'Duration of the setup process in seconds' + value: ${{ steps.get_duration.outputs.duration }} + +runs: + using: "composite" + steps: + # build cache + - id: date + shell: bash + run: echo "CACHE_COMMIT_DATE=$(git log -1 --pretty='format:%cd' --date=format:'%Y-%m-%d-%H:%M')" >> $GITHUB_ENV ; echo "CACHE_FILE_HASHES=$(sha256sum selfdrive/test/build.sh tools/install_ubuntu_dependencies.sh tools/install_python_dependencies.sh | cut -d" " -f1 | tr '\n' '_')" >> $GITHUB_ENV + - shell: bash + run: echo "$CACHE_COMMIT_DATE" + - name: Save rootfs cache + uses: actions/upload-artifact@v4 + #if: github.ref == 'refs/heads/master' + with: + path: /tmp/rootfs_cache.tar + name: rootfs-${{ runner.arch }}-${{ env.CACHE_FILE_HASHES }} diff --git a/.github/workflows/setup/action.yaml b/.github/workflows/setup/action.yaml index fa925c7f85..f3d320de6a 100644 --- a/.github/workflows/setup/action.yaml +++ b/.github/workflows/setup/action.yaml @@ -55,11 +55,4 @@ runs: # build our rootfs image - shell: bash run: eval ${{ env.BUILD }} - # try to save rootfs image cache - - name: Save rootfs cache - uses: actions/upload-artifact@v4 - #if: github.ref == 'refs/heads/master' - with: - path: /tmp/rootfs_cache.tar - name: rootfs-${{ runner.arch }}-${{ env.CACHE_FILE_HASHES }} - continue-on-error: true +