Skip to content

2.5 GB cache, fixed cache buster (7) #25

2.5 GB cache, fixed cache buster (7)

2.5 GB cache, fixed cache buster (7) #25

name: Cache Benchmark
on:
push:
env:
CACHE_BUSTER: 7
NUM_OF_1K_BLOCKS: 2560000
jobs:
actions-cache:
name: "${{ matrix.runs_on.name }} + actions/cache"
strategy:
matrix:
runs_on:
- name: github-ubuntu-amd64
image: "ubuntu-latest"
- name: cirrus-ubuntu-amd64
image: "ghcr.io/cirruslabs/ubuntu-runner-amd64:22.04-sm"
- name: cirrus-ubuntu-arm64
image: "ghcr.io/cirruslabs/ubuntu-runner-amd64:22.04-sm"
- name: cirrus-macos-arm64
image: "ghcr.io/cirruslabs/macos-sonoma-xcode:latest"
runs-on: ${{ matrix.runs_on.image }}
steps:
- name: Cache Binary
id: cache
uses: actions/cache@v4
with:
path: testfile
key: "actions-cache-${{ matrix.runs_on.name }}-attempt-${{ env.CACHE_BUSTER }}"
- name: Generate Binary
if: steps.cache.outputs.cache-hit != 'true'
run: dd if=/dev/urandom of=testfile bs=1024 count=${{ env.NUM_OF_1K_BLOCKS }}
cirruslabs-cache:
name: "${{ matrix.runs_on.name }} + cirruslabs/cache"
strategy:
matrix:
runs_on:
- name: github-ubuntu-amd64
image: "ubuntu-latest"
- name: cirrus-ubuntu-amd64
image: "ghcr.io/cirruslabs/ubuntu-runner-amd64:22.04-sm"
- name: cirrus-ubuntu-arm64
image: "ghcr.io/cirruslabs/ubuntu-runner-amd64:22.04-sm"
- name: cirrus-macos-arm64
image: "ghcr.io/cirruslabs/macos-sonoma-xcode:latest"
runs-on: ${{ matrix.runs_on.image }}
steps:
- name: Cache Binary
id: cache
uses: cirruslabs/cache@v4
with:
path: testfile
key: "cirruslabs-cache-${{ matrix.runs_on.name }}-attempt-${{ env.CACHE_BUSTER }}"
- name: Generate Binary
if: steps.cache.outputs.cache-hit != 'true'
run: dd if=/dev/urandom of=testfile bs=1024 count=${{ env.NUM_OF_1K_BLOCKS }}