Skip to content

Commit

Permalink
cURL benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
edigaryev committed Apr 9, 2024
1 parent fb7ccdc commit 8a1d49f
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions .github/workflows/cache-benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,11 @@ jobs:
run: stat testfile

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

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
Expand All @@ -64,16 +62,13 @@ jobs:
- 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: Download binary
run: |
curl -o downloaded-binary.bin "http://$CIRRUS_HTTP_CACHE_HOST/binary-${{ env.CACHE_BUSTER }}" || true
- 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
- name: Upload Binary
run: |
curl -X POST --data-binary testfile "http://$CIRRUS_HTTP_CACHE_HOST/binary-${{ env.CACHE_BUSTER }}"

0 comments on commit 8a1d49f

Please sign in to comment.