-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
26 additions
and
44 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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/ |