Skip to content

Commit

Permalink
Merge pull request google#925 from proppy:bigger-runners
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 522667972
  • Loading branch information
copybara-github committed Apr 7, 2023
2 parents 2f15911 + d184eed commit 00ad2b6
Showing 1 changed file with 3 additions and 42 deletions.
45 changes: 3 additions & 42 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ on:
jobs:
build:
name: Bazel Test All (opt)
runs-on: ubuntu-20.04
runs-on:
labels: ubuntu-20.04-64core
timeout-minutes: 600
steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -53,44 +54,4 @@ jobs:
# Note: xlscc is excluded because it builds Clang, and that pushes us
# over 6 hours of build time.
run: |
"${GITHUB_WORKSPACE}/bin/bazel" test -c opt --test_output=errors -- //xls/... -//xls/contrib/xlscc/...
cleanup:
name: Bazel Cache Cleanup
needs: build
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
contents: read
actions: write
steps:
- uses: actions/checkout@v3
- name: Cleanup older Bazel Caches
# Per https://github.com/actions/cache/blob/main/tips-and-workarounds.md#force-deletion-of-caches-overriding-default-cache-eviction-policy
run: |
gh extension install actions/gh-actions-cache
REPO=${{ github.repository }}
BRANCH=${{ github.ref }}
echo "Fetching list of cache key"
gh actions-cache list -R $REPO -B $BRANCH
# Do not fail if unable to clean up (i.e. no cache were found).
set +e
caches_for_20_04=($(gh actions-cache list -R $REPO -B $BRANCH | cut -f 1 | grep "bazel-cache-20_04"))
# Delete all except for the latest cache.
older_caches_for_20_04=${caches_for_20_04[@]:1}
echo "Deleting caches..."
for key in ${older_caches_for_20_04[@]}; do
echo " ... deleting $key for $REPO and $BRANCH"
gh actions-cache delete $key -R $REPO -B $BRANCH --confirm
done
echo "Done"
set -e
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
"${GITHUB_WORKSPACE}/bin/bazel" test -c opt --test_output=errors -- //xls/...

0 comments on commit 00ad2b6

Please sign in to comment.