Merge pull request #1369 from containerd/dependabot/docker/golang-1.2… #2746
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: Benchmark | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
env: | |
DOCKER_BUILDKIT: 1 | |
jobs: | |
hello-bench: | |
runs-on: ubuntu-22.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 --no-install-recommends install -y gnuplot | |
pip install 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@v3 | |
if: ${{ always() }} | |
with: | |
name: benchmarking-result-${{ matrix.runtime }} | |
path: ${{ env.BENCHMARK_RESULT_DIR }} |