From 4a0056649d0178a85ef08927425220b45652ff33 Mon Sep 17 00:00:00 2001 From: sikai zhang Date: Wed, 20 Aug 2025 15:32:57 +0800 Subject: [PATCH 1/7] MNT add asv preview --- .github/workflows/asv.yml | 29 +++++++++++++++++++---------- .github/workflows/emscripten.yml | 2 +- .github/workflows/wheel.yml | 2 +- 3 files changed, 21 insertions(+), 12 deletions(-) diff --git a/.github/workflows/asv.yml b/.github/workflows/asv.yml index df06c60..1086281 100644 --- a/.github/workflows/asv.yml +++ b/.github/workflows/asv.yml @@ -49,6 +49,8 @@ jobs: needs: run-benchmarks permissions: contents: write + pages: write + id-token: write steps: - uses: actions/checkout@v5 @@ -57,8 +59,7 @@ jobs: - name: Set up main branch if: github.event_name == 'pull_request' - run: | - git branch main origin/main + run: git branch main origin/main - name: Prepare previous ASV results uses: actions/checkout@v5 @@ -90,20 +91,28 @@ jobs: cache: true - name: Generate HTML report - run: | - pixi run asv-publish - + run: pixi run asv-publish + - name: Copy results to publish directory - run: | - cp -r asv_benchmarks/results asv_benchmarks/html/results + run: cp -r asv_benchmarks/results asv_benchmarks/html/results - - name: Deploy to GitHub Pages - uses: peaceiris/actions-gh-pages@v4 + - name: Upload artifact for PR preview + if: github.event_name == 'pull_request' + uses: actions/upload-pages-artifact@v4 + with: + path: asv_benchmarks/html + + - name: Deploy PR preview + if: github.event_name == 'pull_request' + uses: actions/deploy-pages@v4 + + - name: Deploy to GitHub Pages (main) if: github.event_name == 'push' + uses: peaceiris/actions-gh-pages@v4 with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: asv_benchmarks/html keep_files: true user_name: 'github-actions[bot]' user_email: 'github-actions[bot]@users.noreply.github.com' - commit_message: ${{ github.event.head_commit.message }} \ No newline at end of file + commit_message: ${{ github.event.head_commit.message }} diff --git a/.github/workflows/emscripten.yml b/.github/workflows/emscripten.yml index 507baa7..6ec2100 100644 --- a/.github/workflows/emscripten.yml +++ b/.github/workflows/emscripten.yml @@ -9,7 +9,7 @@ jobs: steps: - uses: actions/checkout@v5 - name: Build WASM wheel - uses: pypa/cibuildwheel@v3.1.3 + uses: pypa/cibuildwheel@v3.1.4 env: CIBW_PLATFORM: pyodide - name: Upload package diff --git a/.github/workflows/wheel.yml b/.github/workflows/wheel.yml index 9bd4ac8..4c8d192 100644 --- a/.github/workflows/wheel.yml +++ b/.github/workflows/wheel.yml @@ -33,7 +33,7 @@ jobs: steps: - uses: actions/checkout@v5 - name: Build wheels - uses: pypa/cibuildwheel@v3.1.3 + uses: pypa/cibuildwheel@v3.1.4 env: CIBW_SKIP: "*_i686 *_ppc64le *_s390x *_universal2 *-musllinux_* cp314*" CIBW_PROJECT_REQUIRES_PYTHON: ">=3.10" From 9148e0e4d2615dd7e069a5da1b9d8bf09f730d3d Mon Sep 17 00:00:00 2001 From: sikai zhang Date: Wed, 20 Aug 2025 15:44:56 +0800 Subject: [PATCH 2/7] add environment --- .github/workflows/asv.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/asv.yml b/.github/workflows/asv.yml index 1086281..53def3e 100644 --- a/.github/workflows/asv.yml +++ b/.github/workflows/asv.yml @@ -51,6 +51,9 @@ jobs: contents: write pages: write id-token: write + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} steps: - uses: actions/checkout@v5 @@ -98,12 +101,13 @@ jobs: - name: Upload artifact for PR preview if: github.event_name == 'pull_request' - uses: actions/upload-pages-artifact@v4 + uses: actions/upload-pages-artifact@v3 with: path: asv_benchmarks/html - name: Deploy PR preview if: github.event_name == 'pull_request' + id: deployment uses: actions/deploy-pages@v4 - name: Deploy to GitHub Pages (main) From 8f1273e4db43d46b21980d47381fde87190c619a Mon Sep 17 00:00:00 2001 From: sikai zhang Date: Wed, 20 Aug 2025 15:55:43 +0800 Subject: [PATCH 3/7] deploy by gh action --- .github/workflows/asv.yml | 16 ++++++++++------ README.rst | 2 +- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/asv.yml b/.github/workflows/asv.yml index 53def3e..a85d6f2 100644 --- a/.github/workflows/asv.yml +++ b/.github/workflows/asv.yml @@ -105,12 +105,7 @@ jobs: with: path: asv_benchmarks/html - - name: Deploy PR preview - if: github.event_name == 'pull_request' - id: deployment - uses: actions/deploy-pages@v4 - - - name: Deploy to GitHub Pages (main) + - name: Deploy history to gh-pages if: github.event_name == 'push' uses: peaceiris/actions-gh-pages@v4 with: @@ -120,3 +115,12 @@ jobs: user_name: 'github-actions[bot]' user_email: 'github-actions[bot]@users.noreply.github.com' commit_message: ${{ github.event.head_commit.message }} + + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: asv_benchmarks/html + + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/README.rst b/README.rst index c91e0e4..711dbc4 100644 --- a/README.rst +++ b/README.rst @@ -27,7 +27,7 @@ fastcan: A fast canonical-correlation-based greedy search algorithm :target: https://pixi.sh .. |asv| image:: https://img.shields.io/badge/benchmarked%20by-asv-blue.svg?style=flat - :target: http://contrib.scikit-learn.org/fastcan/ + :target: https://contrib.scikit-learn.org/fastcan/ fastcan is a greedy search algorithm that supports: From 0a1ecfa15717b7c429266d47aaee15fcb2b23ab2 Mon Sep 17 00:00:00 2001 From: sikai zhang Date: Wed, 20 Aug 2025 16:12:45 +0800 Subject: [PATCH 4/7] duplicated upload page --- .github/workflows/asv.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/asv.yml b/.github/workflows/asv.yml index a85d6f2..a3746ef 100644 --- a/.github/workflows/asv.yml +++ b/.github/workflows/asv.yml @@ -99,12 +99,6 @@ jobs: - name: Copy results to publish directory run: cp -r asv_benchmarks/results asv_benchmarks/html/results - - name: Upload artifact for PR preview - if: github.event_name == 'pull_request' - uses: actions/upload-pages-artifact@v3 - with: - path: asv_benchmarks/html - - name: Deploy history to gh-pages if: github.event_name == 'push' uses: peaceiris/actions-gh-pages@v4 From 8fdb45a674e6395ccb32b5eddf9d66667869ed8e Mon Sep 17 00:00:00 2001 From: sikai zhang Date: Wed, 20 Aug 2025 16:28:12 +0800 Subject: [PATCH 5/7] deployment page_url --- .github/workflows/asv.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/asv.yml b/.github/workflows/asv.yml index a3746ef..3c9a169 100644 --- a/.github/workflows/asv.yml +++ b/.github/workflows/asv.yml @@ -53,7 +53,6 @@ jobs: id-token: write environment: name: github-pages - url: ${{ steps.deployment.outputs.page_url }} steps: - uses: actions/checkout@v5 @@ -118,3 +117,6 @@ jobs: - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v4 + + - name: Print preview URL + run: echo "Preview available at ${{ steps.deployment.outputs.page_url }}" From 56e1c9e7b1641dd10459468edb3f7000247aa8d7 Mon Sep 17 00:00:00 2001 From: sikai zhang Date: Wed, 20 Aug 2025 16:40:03 +0800 Subject: [PATCH 6/7] preview true --- .github/workflows/asv.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/asv.yml b/.github/workflows/asv.yml index 3c9a169..3d33d76 100644 --- a/.github/workflows/asv.yml +++ b/.github/workflows/asv.yml @@ -53,6 +53,7 @@ jobs: id-token: write environment: name: github-pages + url: ${{ steps.deployment.outputs.page_url }} steps: - uses: actions/checkout@v5 @@ -117,6 +118,5 @@ jobs: - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v4 - - - name: Print preview URL - run: echo "Preview available at ${{ steps.deployment.outputs.page_url }}" + with: + preview: true From 043b0af0e1d8fd05a29bad63b3fb5e0bd8cef989 Mon Sep 17 00:00:00 2001 From: sikai zhang Date: Wed, 20 Aug 2025 16:47:51 +0800 Subject: [PATCH 7/7] deploy in push --- .github/workflows/asv.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/asv.yml b/.github/workflows/asv.yml index 3d33d76..20c5e22 100644 --- a/.github/workflows/asv.yml +++ b/.github/workflows/asv.yml @@ -117,6 +117,5 @@ jobs: - name: Deploy to GitHub Pages id: deployment + if: github.event_name == 'push' uses: actions/deploy-pages@v4 - with: - preview: true