-
Notifications
You must be signed in to change notification settings - Fork 114
50 lines (48 loc) · 1.51 KB
/
benchmark.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Benchmark
on:
push:
branches:
- main
pull_request:
env:
DOCKER_BUILDKIT: 1
jobs:
hello-bench:
runs-on: ubuntu-24.04
name: HelloBench
env:
BENCHMARK_LOG_DIR: ${{ github.workspace }}/log/
BENCHMARK_RESULT_DIR: ${{ github.workspace }}/benchmark/
BENCHMARK_REGISTRY: ghcr.io
BENCHMARK_USER: stargz-containers
BENCHMARK_TARGETS: python:3.10 gcc:11.2.0 postgres:14.2 tomcat:10.1.0-jdk17-openjdk-bullseye
BENCHMARK_SAMPLES_NUM: 5
BENCHMARK_PERCENTILE: 95
BENCHMARK_PERCENTILES_GRANULARITY: 25
strategy:
fail-fast: false
max-parallel: 1
matrix:
runtime: ["podman", "containerd"]
steps:
- name: Install tools
run: |
sudo apt-get update && \
sudo apt-get install -y gnuplot python3-numpy
- uses: actions/checkout@v4
- name: Prepare directories
run: mkdir "${BENCHMARK_RESULT_DIR}" "${BENCHMARK_LOG_DIR}"
- name: Get instance information
run: |
curl -H "Metadata:true" "http://169.254.169.254/metadata/instance?api-version=2019-11-01" | \
jq '{ location : .compute.location, vmSize : .compute.vmSize }' | \
tee ${{ env.BENCHMARK_RESULT_DIR }}/instance.json
- name: Run benchmark
env:
BENCHMARK_RUNTIME_MODE: ${{ matrix.runtime }}
run: make benchmark
- uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: benchmarking-result-${{ matrix.runtime }}
path: ${{ env.BENCHMARK_RESULT_DIR }}