diff --git a/.github/workflows/asv_check.yml b/.github/workflows/asv_check.yml new file mode 100644 index 0000000000..db0f11f4da --- /dev/null +++ b/.github/workflows/asv_check.yml @@ -0,0 +1,34 @@ +name: asv + +# CI ASV CHECK is aimed to verify that the benchmarks execute without error. +on: [pull_request, push] + +jobs: + quick: + runs-on: ubuntu-latest + defaults: + run: + shell: bash -el {0} + + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Install Python + uses: actions/setup-python@v3 + with: + python-version: '3.9.7' + + - name: Install asv + run: pip install asv==0.4.2 + + - name: Run asv benchmarks + run: | + cd benchmarks + asv machine --yes + asv run HEAD^! --quick --dry-run --show-stderr | sed "/failed$/ s/^/##[error]/" | tee benchmarks.log + if grep "failed" benchmarks.log > /dev/null ; then + exit 1 + fi + diff --git a/docs/sphinx/source/whatsnew/v0.9.2.rst b/docs/sphinx/source/whatsnew/v0.9.2.rst index d6bce8a5ac..594fd81d04 100644 --- a/docs/sphinx/source/whatsnew/v0.9.2.rst +++ b/docs/sphinx/source/whatsnew/v0.9.2.rst @@ -29,6 +29,7 @@ Documentation Benchmarking ~~~~~~~~~~~~~ * Updated version of numba in asv.conf from 0.36.1 to 0.40.0 to solve numba/numpy conflict. (:issue:`1439`, :pull:`1440`) +* Added a basic CI asv check (:issue:`1446`, :pull:`1454`) Requirements ~~~~~~~~~~~~ @@ -37,3 +38,4 @@ Requirements Contributors ~~~~~~~~~~~~ * Naman Priyadarshi (:ghuser:`Naman-Priyadarshi`) +* Chencheng Luo (:ghuser:`roger-lcc`)