Speed benchmarks #603
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: Speed benchmarks | |
on: | |
schedule: | |
- cron: '0 23 * * SUN-THU' | |
jobs: | |
speed-benchmarks: | |
runs-on: ubuntu-latest | |
# Not intended for forks. | |
if: github.repository == 'optuna/optuna' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Python3.11 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.11 | |
- name: Setup cache | |
uses: actions/cache@v3 | |
env: | |
cache-name: speed-benchmarks | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-3.11-${{ env.cache-name }}-${{ hashFiles('**/pyproject.toml') }}-v1 | |
restore-keys: | | |
${{ runner.os }}-3.11-${{ env.cache-name }}-${{ hashFiles('**/pyproject.toml') }} | |
- name: Install | |
run: | | |
python -m pip install --upgrade pip | |
pip install --progress-bar off -U setuptools | |
# Install minimal dependencies and confirm that `import optuna` is successful. | |
pip install --progress-bar off . | |
python -c 'import optuna' | |
optuna --version | |
pip install --progress-bar off .[benchmark] | |
asv machine --yes | |
- name: Output installed packages | |
run: | | |
pip freeze --all | |
- name: Output dependency tree | |
run: | | |
pip install pipdeptree | |
pipdeptree | |
- name: Speed benchmarks | |
run: | | |
asv run --strict |