From 046e90607a40379e288faa56aaf199295b464798 Mon Sep 17 00:00:00 2001 From: Ed Morley <501702+edmorley@users.noreply.github.com> Date: Wed, 10 Apr 2024 00:27:14 +0100 Subject: [PATCH] zstd benchmarking --- .github/workflows/ci.yml | 70 +++++++++++++++------------------------- 1 file changed, 26 insertions(+), 44 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 42f3f96e5..3f4a60475 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,56 +1,38 @@ name: CI -on: - push: - # Avoid duplicate builds on PRs. - branches: - - main - pull_request: +on: push permissions: contents: read jobs: - lint: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Install Ruby and dependencies - uses: ruby/setup-ruby@v1 - with: - bundler-cache: true - ruby-version: "3.3" - - name: Run ShellCheck - run: make lint-scripts - - name: Run Rubocop - run: bundle exec rubocop - - integration-test: - runs-on: ubuntu-latest + zstd-benchmarking: + runs-on: pub-hk-ubuntu-22.04-xlarge strategy: - fail-fast: false matrix: - stack: ["heroku-20", "heroku-22"] - env: - HATCHET_APP_LIMIT: 200 - HATCHET_DEFAULT_STACK: ${{ matrix.stack }} - HATCHET_EXPENSIVE_MODE: 1 - HATCHET_RETRIES: 2 - HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }} - HEROKU_API_USER: ${{ secrets.HEROKU_API_USER }} - HEROKU_DISABLE_AUTOUPDATE: 1 - PARALLEL_SPLIT_TEST_PROCESSES: 60 + stack_version: ["20", "22", "24"] steps: - name: Checkout uses: actions/checkout@v4 - - name: Install Ruby and dependencies - uses: ruby/setup-ruby@v1 - with: - bundler-cache: true - ruby-version: "3.3" - - name: Hatchet setup - run: bundle exec hatchet ci:setup - - name: Run Hatchet integration tests - # parallel_split_test runs rspec in parallel, with concurrency equal to PARALLEL_SPLIT_TEST_PROCESSES. - run: bundle exec parallel_split_test spec/hatchet/ + - name: Run Docker image + run: | + docker run --rm --user root --volume="${PWD}/upload:/tmp/upload" -w /tmp/upload heroku/heroku:${{matrix.stack_version}}-build bash -c ' + set -ex + curl -o python.tar.gz https://heroku-buildpack-python.s3.us-east-1.amazonaws.com/heroku-22/runtimes/python-3.12.2.tar.gz + gzip -d python.tar.gz + time zstd --long -19 python.tar -v -o python-19.tar.zst + # time zstd --long -19 -T0 python.tar -v -o python-19-T0.tar.zst + # time zstd --long -22 --ultra python.tar -v -o python-22.tar.zst + # time zstd --long -22 --ultra -T0 python.tar -v -o python-22-T0.tar.zst + ' + - run: ls -al upload/ + - name: Compress on host + run: | + set -ex + cd upload/ + time zstd --long -19 python.tar -v -o python-19-host.tar.zst + # time zstd --long -19 -T0 python.tar -v -o python-19-T0-host.tar.zst + # time zstd --long -22 --ultra python.tar -v -o python-22-host.tar.zst + # time zstd --long -22 --ultra -T0 python.tar -v -o python-22-T0-host.tar.zst + - name: Compare sizes + run: ls -al upload/