mirror of
https://github.com/Chia-Network/chia-blockchain.git
synced 2026-08-24 10:05:29 -05:00
* Bump actions/cache from 2.1.6 to 3 Bumps [actions/cache](https://github.com/actions/cache) from 2.1.6 to 3. - [Release notes](https://github.com/actions/cache/releases) - [Commits](https://github.com/actions/cache/compare/v2.1.6...v3) --- updated-dependencies: - dependency-name: actions/cache dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * Update actions in templates also Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Gene Hoffman <hoffmang@hoffmang.com>
70 lines
1.7 KiB
YAML
70 lines
1.7 KiB
YAML
name: Benchmarks
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
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' && 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 ]
|
|
|
|
steps:
|
|
- name: Checkout Code
|
|
uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Setup Python environment
|
|
uses: actions/setup-python@v2
|
|
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: Install ubuntu dependencies
|
|
run: |
|
|
sudo apt-get install software-properties-common
|
|
sudo add-apt-repository ppa:deadsnakes/ppa
|
|
sudo apt-get update
|
|
sudo apt-get install python${{ matrix.python-version }}-venv python${{ matrix.python-version }}-distutils git -y
|
|
|
|
- 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 -m benchmark tests
|