Skip to content
This repository has been archived by the owner on Oct 21, 2024. It is now read-only.

Commit

Permalink
Merge branch 'main' into tedi/mockpluginrunner
Browse files Browse the repository at this point in the history
  • Loading branch information
tedim52 authored Aug 22, 2024
2 parents 2190d68 + fbcfc10 commit 938e2f1
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 3 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/cache-clean-up.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: cleanup caches by a branch
on:
pull_request:
types:
- closed

jobs:
cleanup:
runs-on: ubuntu-latest
steps:
- name: Cleanup
run: |
gh extension install actions/gh-actions-cache
echo "Fetching list of cache key"
cacheKeysForPR=$(gh actions-cache list -R $REPO -B $BRANCH | cut -f 1 )
## Setting this to not fail the workflow while deleting cache keys.
set +e
echo "Deleting caches..."
for cacheKey in $cacheKeysForPR
do
gh actions-cache delete $cacheKey -R $REPO -B $BRANCH --confirm
done
echo "Done"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPO: ${{ github.repository }}
BRANCH: refs/pull/${{ github.event.pull_request.number }}/merge
7 changes: 4 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ jobs:
strategy:
matrix:
component: [kontrol-service, kontrol-frontend]
# arch: [amd64, arm64]
# Skipping arm64 builds due GH cache rate limit casue by the
# number of cache entries generated by pkgsCross builds
arch: [amd64]
steps:
- name: Git checkout
Expand All @@ -77,14 +78,14 @@ jobs:
# relax sandbox due impure kontrol-service tests during build
extra_nix_config: |
sandbox = relaxed
# extra-platforms = aarch64-linux
extra-platforms = aarch64-linux
- name: Magic cache
uses: DeterminateSystems/magic-nix-cache-action@v7

- name: Build ${{ matrix.component }}
run: |
nix build .#${{ matrix.component }} --print-build-logs
nix build .#${{ matrix.component }} --no-link --print-out-paths --print-build-logs
- name: Build ${{ matrix.component }} for ${{ matrix.arch }}
run: |
Expand Down

0 comments on commit 938e2f1

Please sign in to comment.