From 62552b7ac8f2dd4d303e84e1e53a172f1679847c Mon Sep 17 00:00:00 2001 From: roger-lcc <953120129@qq.com> Date: Wed, 27 Apr 2022 19:51:57 +0800 Subject: [PATCH 1/6] CI asv check --- .github/workflows/asv_check.yml | 39 +++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/asv_check.yml diff --git a/.github/workflows/asv_check.yml b/.github/workflows/asv_check.yml new file mode 100644 index 0000000000..8c5cd32f46 --- /dev/null +++ b/.github/workflows/asv_check.yml @@ -0,0 +1,39 @@ +name: CI ASV CHECK + +# CI ASV CHECK is aimed to verify that the benchmarks execute without error. +on: [pull_request, push] + +jobs: + test: + 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 . + pip install ephem==3.7.6.0 + pip install numba==0.40.0 + pip install asv==0.4.2 + + - name: Run asv benchmarks + run: | + cd benchmarks + asv machine --yes + asv run --quick --dry-run --show-stderr --python=same\ + | sed "/failed$/ s/^/##[error]/" | tee benchmarks.log + if grep "failed" benchmarks.log > /dev/null ; then + exit 1 + fi + From 777e42ee45cd5edb06f94b6fe36a5dfb00470144 Mon Sep 17 00:00:00 2001 From: roger-lcc <953120129@qq.com> Date: Wed, 27 Apr 2022 21:14:25 +0800 Subject: [PATCH 2/6] added CI asv check --- docs/sphinx/source/whatsnew/v0.9.2.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/sphinx/source/whatsnew/v0.9.2.rst b/docs/sphinx/source/whatsnew/v0.9.2.rst index 1982759bf5..abe5c83a12 100644 --- a/docs/sphinx/source/whatsnew/v0.9.2.rst +++ b/docs/sphinx/source/whatsnew/v0.9.2.rst @@ -24,8 +24,10 @@ 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`) Requirements +* Added a basic CI asv check(:issue:`1446`, :pull:`1454`) ~~~~~~~~~~~~ Contributors ~~~~~~~~~~~~ * Naman Priyadarshi (:ghuser:`Naman-Priyadarshi`) +* Chencheng Luo (:ghuser:`roger-lcc`) From 47a4fd02f0213f31f9c986126628d63b38588292 Mon Sep 17 00:00:00 2001 From: roger-lcc <953120129@qq.com> Date: Wed, 27 Apr 2022 23:46:34 +0800 Subject: [PATCH 3/6] CI asv check --- .github/workflows/asv_check.yml | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/.github/workflows/asv_check.yml b/.github/workflows/asv_check.yml index 8c5cd32f46..4ac6b3724d 100644 --- a/.github/workflows/asv_check.yml +++ b/.github/workflows/asv_check.yml @@ -1,10 +1,10 @@ -name: CI ASV CHECK +name: asv # CI ASV CHECK is aimed to verify that the benchmarks execute without error. on: [pull_request, push] jobs: - test: + quick: runs-on: ubuntu-latest defaults: run: @@ -21,18 +21,13 @@ jobs: python-version: '3.9.7' - name: Install asv - run: | - pip install . - pip install ephem==3.7.6.0 - pip install numba==0.40.0 - pip install asv==0.4.2 + run: pip install asv==0.4.2 - name: Run asv benchmarks run: | cd benchmarks asv machine --yes - asv run --quick --dry-run --show-stderr --python=same\ - | sed "/failed$/ s/^/##[error]/" | tee benchmarks.log + asv run --quick --dry-run --show-stderr --python=same | sed "/failed$/ s/^/##[error]/" | tee benchmarks.log if grep "failed" benchmarks.log > /dev/null ; then exit 1 fi From 2bb9526f6a3b5cda42f1d43388717d17c96a8014 Mon Sep 17 00:00:00 2001 From: roger-lcc <953120129@qq.com> Date: Wed, 27 Apr 2022 23:47:49 +0800 Subject: [PATCH 4/6] CI asv check --- .github/workflows/asv_check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/asv_check.yml b/.github/workflows/asv_check.yml index 4ac6b3724d..61cd4964ec 100644 --- a/.github/workflows/asv_check.yml +++ b/.github/workflows/asv_check.yml @@ -27,7 +27,7 @@ jobs: run: | cd benchmarks asv machine --yes - asv run --quick --dry-run --show-stderr --python=same | sed "/failed$/ s/^/##[error]/" | tee benchmarks.log + asv run --quick --dry-run --show-stderr | sed "/failed$/ s/^/##[error]/" | tee benchmarks.log if grep "failed" benchmarks.log > /dev/null ; then exit 1 fi From 6991cd8809664d896c076a512dde3bfa09c3a516 Mon Sep 17 00:00:00 2001 From: roger-lcc <953120129@qq.com> Date: Thu, 28 Apr 2022 00:56:01 +0800 Subject: [PATCH 5/6] updated CI asv check --- .github/workflows/asv_check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/asv_check.yml b/.github/workflows/asv_check.yml index 61cd4964ec..db0f11f4da 100644 --- a/.github/workflows/asv_check.yml +++ b/.github/workflows/asv_check.yml @@ -27,7 +27,7 @@ jobs: run: | cd benchmarks asv machine --yes - asv run --quick --dry-run --show-stderr | sed "/failed$/ s/^/##[error]/" | tee benchmarks.log + 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 From 28d7f3c2de15391a1bcf5e9ab2426ad785ee7c16 Mon Sep 17 00:00:00 2001 From: roger-lcc <58332996+roger-lcc@users.noreply.github.com> Date: Thu, 28 Apr 2022 10:43:05 +0800 Subject: [PATCH 6/6] Update docs/sphinx/source/whatsnew/v0.9.2.rst updated v0.9.2.rst Co-authored-by: Kevin Anderson <57452607+kanderso-nrel@users.noreply.github.com> --- docs/sphinx/source/whatsnew/v0.9.2.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/sphinx/source/whatsnew/v0.9.2.rst b/docs/sphinx/source/whatsnew/v0.9.2.rst index abe5c83a12..f682645b65 100644 --- a/docs/sphinx/source/whatsnew/v0.9.2.rst +++ b/docs/sphinx/source/whatsnew/v0.9.2.rst @@ -23,8 +23,9 @@ 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 -* Added a basic CI asv check(:issue:`1446`, :pull:`1454`) ~~~~~~~~~~~~ Contributors