Skip to content

feat: use GitHub Actions cache to persist the CernVM-FS cache #37

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/workflows/cache.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: cache
on:
push:
pull_request:
schedule:
- cron: '44 4 * * *'
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04]
steps:
- uses: actions/checkout@v4
- run: mkdir -p ${{ github.workspace }}/.cvmfs
- uses: ./
with:
actions_cache: true
cvmfs_cache_base: ${{ github.workspace }}/.cvmfs
- name: Test CernVM-FS
run: |
source /cvmfs/sft.cern.ch/lcg/views/LCG_107/x86_64-ubuntu2404-gcc13-opt/setup.sh
root -l -q -b
10 changes: 10 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ inputs:
description: 'Location (directory) of the user-space apt cache.'
required: false
default: 'apt_cache'
actions_cache:
description: 'Enable a GitHub Actions cache for the CernVM cache.'
required: false
default: 'false'
cvmfs_alien_cache:
description: 'If set, use an alien cache at the given location.'
required: false
Expand Down Expand Up @@ -351,6 +355,12 @@ runs:
key: cvmfs-apt-cache-${{ steps.lsb-release.outputs.id-release }}-${{ steps.lsb-release.outputs.arch }}-${{ hashFiles('action.yml') }}
path: |
${{ inputs.apt_cache }}
- uses: actions/cache@v4
if: ${{ inputs.actions_cache == 'true' }}
with:
key: cvmfs-cache-${{ steps.lsb-release.outputs.id-release }}-${{ steps.lsb-release.outputs.arch }}-${{ hashFiles('action.yml') }}
path: |
${{ inputs.cvmfs_cache_base }}
- run: |
${{ github.action_path }}/setup-cvmfs.sh
shell: bash
Expand Down
Loading