Skip to content

Commit

Permalink
Test Cirrus Runners Cache
Browse files Browse the repository at this point in the history
  • Loading branch information
edigaryev committed Apr 9, 2024
0 parents commit fb7ccdc
Showing 1 changed file with 79 additions and 0 deletions.
79 changes: 79 additions & 0 deletions .github/workflows/cache-benchmark.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: Cache Benchmark

on:
push:

env:
CACHE_BUSTER: 5
NUM_OF_1K_BLOCKS: 2560000

jobs:
actions-cache:
name: "${{ matrix.runs_on.name }} + actions/cache"

strategy:
matrix:
runs_on:
- name: gh-ubuntu
image: "ubuntu-latest"
- name: cl-ubuntu-amd64
image: "ghcr.io/cirruslabs/ubuntu-runner-amd64:22.04-sm"
- name: cl-macos-arm64
image: "ghcr.io/cirruslabs/macos-sonoma-xcode:latest"

runs-on: ${{ matrix.runs_on.image }}

steps:
- uses: actions/checkout@v4

- name: Print environment
run: env

- 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 }}

- name: Stat Binary
run: stat testfile

cirruslabs-cache:
name: "${{ matrix.runs_on.name }} + cirruslabs/cache"

strategy:
matrix:
runs_on:
- name: gh-ubuntu
image: "ubuntu-latest"
- name: cl-ubuntu-amd64
image: "ghcr.io/cirruslabs/ubuntu-runner-amd64:22.04-sm"
- name: cl-macos-arm64
image: "ghcr.io/cirruslabs/macos-sonoma-xcode:latest"

runs-on: ${{ matrix.runs_on.image }}

steps:
- uses: actions/checkout@v4

- name: Print environment
run: env

- 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 }}

- name: Stat Binary
run: stat testfile

0 comments on commit fb7ccdc

Please sign in to comment.