Skip to content

Commit

Permalink
retry fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
thesayyn committed Jul 2, 2024
1 parent 9ad2a21 commit b5e9899
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 16 deletions.
34 changes: 18 additions & 16 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name: CI
on:
workflow_dispatch: # Allow manual runs.
pull_request:
branches: [ 'main' ]
branches: ["main"]
push:
branches: [ 'main' ]
branches: ["main"]

permissions:
contents: read
Expand All @@ -19,12 +19,12 @@ jobs:
- name: Mount bazel caches
uses: actions/cache@v4
with:
path: |
~/.cache/bazel-repo
key: bazel-cache-deps-ci1-${{ github.sha }}
restore-keys: |
bazel-cache-deps-ci1-${{ github.sha }}
bazel-cache-deps-ci1-
path: |
~/.cache/bazel-repo
key: bazel-cache-deps-ci1-${{ github.sha }}
restore-keys: |
bazel-cache-deps-ci1-${{ github.sha }}
bazel-cache-deps-ci1-
- name: Free space
run: |
sudo apt-get remove -y '^dotnet-.*'
Expand Down Expand Up @@ -57,12 +57,12 @@ jobs:
- name: Mount bazel caches
uses: actions/cache@v4
with:
path: |
~/.cache/bazel-repo
key: bazel-cache-deps-ci2-${{ github.sha }}
restore-keys: |
bazel-cache-deps-ci2-${{ github.sha }}
bazel-cache-deps-ci2-
path: |
~/.cache/bazel-repo
key: bazel-cache-deps-ci2-${{ github.sha }}
restore-keys: |
bazel-cache-deps-ci2-${{ github.sha }}
bazel-cache-deps-ci2-
- name: Free space
run: |
sudo apt-get remove -y '^dotnet-.*'
Expand All @@ -72,10 +72,12 @@ jobs:
sudo apt-get autoremove -y
sudo apt-get clean
rm -rf /usr/share/dotnet/
- name: Fetch
run: |
for i in $(seq 5); do
bazel --bazelrc=$GITHUB_WORKSPACE/.github/workflows/ci.bazelrc fetch $(bazel query 'attr(tags, "amd64", ...)') && break || sleep 20;
for i in $(seq 10); do
bazel --bazelrc=$GITHUB_WORKSPACE/.github/workflows/ci.bazelrc cquery 'kind(merge_providers, deps(kind(oci_image, ...)))' --output=label --config=release && break || sleep 20;
done
- name: Image Tests
run: bazel --bazelrc=$GITHUB_WORKSPACE/.github/workflows/ci.bazelrc test $(bazel query 'attr(tags, "amd64", ...)')
6 changes: 6 additions & 0 deletions .github/workflows/image-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ jobs:
bazel-cache-deps-ci2-${{ github.sha }}
bazel-cache-deps-ci2-
- name: Fetch
run: |
for i in $(seq 10); do
bazel --bazelrc=$GITHUB_WORKSPACE/.github/workflows/ci.bazelrc cquery 'kind(merge_providers, deps(kind(oci_image, ...)))' --output=label --config=release && break || sleep 20;
done
- name: Build all images
run: bazel build //:sign_and_push

Expand Down

0 comments on commit b5e9899

Please sign in to comment.