From 6c3ddcd9aeb852bd54b8d02b19a95590e0090caa 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 | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/.github/workflows/cache-benchmark.yml b/.github/workflows/cache-benchmark.yml index f91efdf..8e2af7a 100644 --- a/.github/workflows/cache-benchmark.yml +++ b/.github/workflows/cache-benchmark.yml @@ -4,7 +4,7 @@ on: push: env: - CACHE_BUSTER: 5 + CACHE_BUSTER: 6 NUM_OF_1K_BLOCKS: 2560000 jobs: @@ -16,10 +16,6 @@ jobs: 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 }} @@ -44,13 +40,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 +58,11 @@ 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: 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 -v --data-binary testfile "http://$CIRRUS_HTTP_CACHE_HOST/binary-${{ env.CACHE_BUSTER }}" + + - name: Download binary + run: curl -v -o downloaded-binary.bin "http://$CIRRUS_HTTP_CACHE_HOST/binary-${{ env.CACHE_BUSTER }}" || true