cURL benchmark #18
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Cache Benchmark | ||
on: | ||
push: | ||
env: | ||
CACHE_BUSTER: 7 | ||
NUM_OF_1K_BLOCKS: 1536000 | ||
jobs: | ||
actions-cache: | ||
name: "${{ matrix.runs_on.name }} + actions/cache" | ||
strategy: | ||
matrix: | ||
runs_on: | ||
- name: gh-ubuntu | ||
image: "ubuntu-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 | ||
wget: | ||
name: "${{ matrix.runs_on.name }} + wget" | ||
strategy: | ||
matrix: | ||
runs_on: | ||
- 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: Generate binary | ||
run: dd if=/dev/urandom of=binary.bin bs=1024 count=${{ env.NUM_OF_1K_BLOCKS }} | ||
- name: Upload Binary | ||
run: wget --quiet --method POST --body-file binary.bin "${{ jobs.wget.env.CACHE_ENTRY_URL }}" | ||
Check failure on line 65 in .github/workflows/cache-benchmark.yml GitHub Actions / Cache BenchmarkInvalid workflow file
|
||
- name: Remove binary to save space | ||
run: rm binary.bin | ||
- name: Download binary | ||
run: wget --quiet -O downloaded-binary.bin "${{ jobs.wget.env.CACHE_ENTRY_URL }}" | ||
env: | ||
CACHE_ENTRY_URL: "http://$CIRRUS_HTTP_CACHE_HOST/binary-${{ matrix.runs_on.name }}-${{ env.CACHE_BUSTER }}" |