[cicd] try to fix bazel cache #55
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: test-opensrc | |
| permissions: | |
| contents: read | |
| on: | |
| push: | |
| branches: [ "ci/direct-cache" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| workflow_dispatch: | |
| jobs: | |
| # unit_test: | |
| # runs-on: ubuntu-latest | |
| # container: | |
| # image: ghcr.io/alibaba/tair-kvcache-kvcm-dev:2026_02_03_13_26_feea140 | |
| # steps: | |
| # - uses: actions/checkout@v4 | |
| # - uses: bazel-contrib/setup-bazel@0.18.0 | |
| # with: | |
| # bazelisk-cache: true | |
| # disk-cache: ${{ runner.os }}-${{ github.workflow }}-unit_test | |
| # repository-cache: true | |
| # cache-save: ${{ github.event_name != 'pull_request' }} | |
| # - name: bazel_test | |
| # run: | | |
| # set -x | |
| # set -e | |
| # bazelisk test //kv_cache_manager/... --cache_test_results=no --test_output=errors | |
| # - name: create_archive | |
| # if: failure() | |
| # run: | | |
| # set -x | |
| # set -e | |
| # test -a bazel-out.tar && rm -f bazel-out.tar | |
| # find bazel-out/k8-opt/bin/ '(' -name 'kv_cache_manager.log' -o -name 'access.log' -o -name 'metrics.log' -o -name 'stdout' -o -name 'stderr' ')' -a -exec 'tar' '-r' '-f' 'bazel-out.tar' '{}' ';' | |
| # find bazel-out/k8-opt/bin/ -name 'core-*' -a -type f -a -exec 'tar' '-r' '-f' 'bazel-out.tar' '{}' ';' | |
| # tar -r -f bazel-out.tar bazel-out/k8-opt/testlogs/ | |
| # gzip -f bazel-out.tar | |
| # - uses: actions/upload-artifact@v6 | |
| # if: failure() | |
| # with: | |
| # name: unit_test-bazel-out.tar.gz | |
| # path: ./bazel-out.tar.gz | |
| # overwrite: true | |
| integration_test: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: ghcr.io/alibaba/tair-kvcache-kvcm-dev:2026_02_03_13_26_feea140 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Restore cache | |
| id: cache-restore | |
| uses: actions/cache/restore@v5 | |
| with: | |
| path: | | |
| /root/.cache/ | |
| key: ${{ runner.os }}-unittest-cache | |
| # - uses: bazel-contrib/setup-bazel@0.18.0 | |
| # with: | |
| # bazelisk-cache: true | |
| # disk-cache: ${{ runner.os }}-${{ github.workflow }}-integration_test | |
| # repository-cache: true | |
| # cache-save: ${{ github.event_name != 'pull_request' }} | |
| - name: bazel_test | |
| run: | | |
| set -x | |
| set -e | |
| bazelisk test //integration_test/... --cache_test_results=no --test_output=errors | |
| ls -alh ./ | |
| du -h -d 3 /root/.cache/ | |
| df -h | |
| # - name: Save cache | |
| # id: cache-restore | |
| # if: ${{ github.event_name != 'pull_request' }} | |
| # uses: actions/cache/save@v5 | |
| # with: | |
| # path: | | |
| # /root/.cache/ | |
| # key: ${{ runner.os }}-unittest-cache | |
| # - name: create_archive | |
| # if: failure() | |
| # run: | | |
| # set -x | |
| # set -e | |
| # test -a bazel-out.tar && rm -f bazel-out.tar | |
| # find bazel-out/k8-opt/bin/ '(' -name 'kv_cache_manager.log' -o -name 'access.log' -o -name 'metrics.log' -o -name 'stdout' -o -name 'stderr' ')' -a -exec 'tar' '-r' '-f' 'bazel-out.tar' '{}' ';' | |
| # find bazel-out/k8-opt/bin/ -name 'core-*' -a -type f -a -exec 'tar' '-r' '-f' 'bazel-out.tar' '{}' ';' | |
| # tar -r -f bazel-out.tar bazel-out/k8-opt/testlogs/ | |
| # gzip -f bazel-out.tar | |
| # - uses: actions/upload-artifact@v6 | |
| # if: failure() | |
| # with: | |
| # name: integration_test-bazel-out.tar.gz | |
| # path: ./bazel-out.tar.gz | |
| # overwrite: true |