|
| 1 | +# |
| 2 | +# Licensed to the Apache Software Foundation (ASF) under one or more |
| 3 | +# contributor license agreements. See the NOTICE file distributed with |
| 4 | +# this work for additional information regarding copyright ownership. |
| 5 | +# The ASF licenses this file to You under the Apache License, Version 2.0 |
| 6 | +# (the "License"); you may not use this file except in compliance with |
| 7 | +# the License. You may obtain a copy of the License at |
| 8 | +# |
| 9 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +# |
| 11 | +# Unless required by applicable law or agreed to in writing, software |
| 12 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | +# See the License for the specific language governing permissions and |
| 15 | +# limitations under the License. |
| 16 | +# |
| 17 | +# |
| 18 | +name: Benchmarks |
| 19 | + |
| 20 | +on: |
| 21 | + push: |
| 22 | + branches: [master] |
| 23 | + |
| 24 | +jobs: |
| 25 | + Benchmarks: |
| 26 | + runs-on: ubuntu-latest |
| 27 | + |
| 28 | + steps: |
| 29 | + - uses: actions/checkout@v3 |
| 30 | + with: |
| 31 | + fetch-depth: 0 |
| 32 | + - name: Install python |
| 33 | + uses: actions/setup-python@v2 |
| 34 | + with: |
| 35 | + python-version: 3.8 |
| 36 | + - name: Install Ray Beam Runner |
| 37 | + run: | |
| 38 | + pip install -e .[test] |
| 39 | + - name: Install dependencies |
| 40 | + run: | |
| 41 | + python -m pip install --upgrade pip |
| 42 | + pip install -r requirements_dev.txt |
| 43 | + pip install -U "ray @ https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-3.0.0.dev0-cp38-cp38-manylinux2014_x86_64.whl" |
| 44 | + - name: Run Benchmark |
| 45 | + run: | |
| 46 | + pytest benchmark/simple.py --benchmark-only --benchmark-json bm-result.json |
| 47 | + - name: Store benchmark result |
| 48 | + uses: benchmark-action/github-action-benchmark@v1 |
| 49 | + with: |
| 50 | + name: Python Benchmark with pytest-benchmark |
| 51 | + tool: 'pytest' |
| 52 | + output-file-path: bm-result.json |
| 53 | + github-token: ${{ secrets.GITHUB_TOKEN }} |
| 54 | + auto-push: true |
| 55 | + # Show alert with commit comment on detecting possible performance regression |
| 56 | + alert-threshold: '200%' |
| 57 | + comment-on-alert: true |
| 58 | + fail-on-alert: true |
0 commit comments