From 8a1d49f18595a5f1f46d2bb86c0024c274302dd2 Mon Sep 17 00:00:00 2001 From: Nikolay Edigaryev Date: Tue, 9 Apr 2024 17:34:04 +0400 Subject: [PATCH] cURL benchmark --- .github/workflows/cache-benchmark.yml | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/.github/workflows/cache-benchmark.yml b/.github/workflows/cache-benchmark.yml index f91efdf..c950b0b 100644 --- a/.github/workflows/cache-benchmark.yml +++ b/.github/workflows/cache-benchmark.yml @@ -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 @@ -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 }}"