mirror of
https://github.com/Chia-Network/chia-blockchain.git
synced 2026-09-05 02:24:21 -05:00
78 lines
1.9 KiB
YAML
78 lines
1.9 KiB
YAML
name: Benchmarks
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- 'long_lived/**'
|
|
- main
|
|
- 'release/**'
|
|
tags:
|
|
- '**'
|
|
pull_request:
|
|
branches:
|
|
- '**'
|
|
|
|
concurrency:
|
|
# SHA is added to the end if on `main` to let all main workflows run
|
|
group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/heads/long_lived/')) && github.sha || '' }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
build:
|
|
name: Benchmarks
|
|
runs-on: benchmark
|
|
timeout-minutes: 30
|
|
strategy:
|
|
fail-fast: false
|
|
max-parallel: 4
|
|
matrix:
|
|
python-version: [ 3.9 ]
|
|
env:
|
|
CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet
|
|
|
|
steps:
|
|
- name: Clean workspace
|
|
uses: Chia-Network/actions/clean-workspace@main
|
|
|
|
- name: Checkout Code
|
|
uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Setup Python environment
|
|
uses: actions/setup-python@v3
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
- name: Get pip cache dir
|
|
id: pip-cache
|
|
run: |
|
|
echo "::set-output name=dir::$(pip cache dir)"
|
|
|
|
- name: Cache pip
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: ${{ steps.pip-cache.outputs.dir }}
|
|
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-pip-
|
|
|
|
- name: Checkout test blocks and plots
|
|
uses: actions/checkout@v3
|
|
with:
|
|
repository: 'Chia-Network/test-cache'
|
|
path: '.chia'
|
|
ref: '0.29.0'
|
|
fetch-depth: 1
|
|
|
|
- name: Run install script
|
|
env:
|
|
INSTALL_PYTHON_VERSION: ${{ matrix.python-version }}
|
|
run: |
|
|
sh install.sh -d
|
|
|
|
- name: pytest
|
|
run: |
|
|
. ./activate
|
|
./venv/bin/py.test -n 0 --capture no -m benchmark tests
|