From 4d4b6d1656037e4e88f36db9cad446a7a56f39d7 Mon Sep 17 00:00:00 2001 From: Palash Tyagi <23239946+Magnus167@users.noreply.github.com> Date: Mon, 5 May 2025 21:05:48 +0100 Subject: [PATCH 01/17] Add initial HTML landing page --- .github/htmldocs/index.html | 71 +++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 .github/htmldocs/index.html diff --git a/.github/htmldocs/index.html b/.github/htmldocs/index.html new file mode 100644 index 0000000..eb43b87 --- /dev/null +++ b/.github/htmldocs/index.html @@ -0,0 +1,71 @@ + + + + + + + Rustframe + + + + + +
+

+ Rustframe Logo
+ Rustframe +

+

A lightweight dataframe & math toolkit for Rust

+

+ ๐Ÿ“š Docs +

+ ๐Ÿฆ€ Crates.io | + ๐Ÿ”– docs.rs +

+ ๐Ÿ™ GitHub | + ๐ŸŒ Gitea mirror +

+
+ + + \ No newline at end of file From d8154a117537b717e3a3b6c81e4b9745ddf28741 Mon Sep 17 00:00:00 2001 From: Palash Tyagi <23239946+Magnus167@users.noreply.github.com> Date: Mon, 5 May 2025 21:32:51 +0100 Subject: [PATCH 02/17] Enhance CI workflow to download and include benchmark reports in documentation output --- .github/workflows/docs-and-testcov.yml | 31 ++++++++++++++++++++++++++ .github/workflows/run-benchmarks.yml | 2 +- 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docs-and-testcov.yml b/.github/workflows/docs-and-testcov.yml index 8ace0a8..2f1f92e 100644 --- a/.github/workflows/docs-and-testcov.yml +++ b/.github/workflows/docs-and-testcov.yml @@ -10,6 +10,10 @@ on: # pull_request: # branches: [main] workflow_dispatch: + workflow_run: + workflows: ["run-benchmarks"] + types: + - completed permissions: contents: read @@ -100,6 +104,30 @@ jobs: <(echo '{}') \ > last-commit-date.json + - name: Download last available benchmark report + run: | + artifact_url=$(gh api -H "Accept: application/vnd.github+json" \ + /repos/${{ github.repository }}/actions/artifacts \ + | jq -r '.artifacts[] | select(.name | startswith("benchmark-reports")) | .archive_download_url' | head -n 1) + + if [ -z "$artifact_url" ]; then + echo "No benchmark artifact found!" + exit 1 + fi + + curl -L -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ + -o benchmark-report.zip "$artifact_url" + + mkdir -p benchmark-report + unzip benchmark-report.zip -d benchmark-report + # there will be a tar file in the benchmark-report directory + # called artifact.tar. unzip it into the benchmark-report + tar -xvf benchmark-report/artifact.tar -C benchmark-report + # remove the artifact.tar file + rm benchmark-report/artifact.tar + # add an index.html that points to benchmark-report/report/index.html + echo "" > benchmark-report/index.html + - name: Copy files to output directory run: | # mkdir docs @@ -116,6 +144,9 @@ jobs: echo "" > target/doc/index.html touch target/doc/.nojekyll + # copy the benchmark report to the output directory + cp -r benchmark-report target/doc/ + # verify that logo exists in the output directory - name: Verify logo directory run: | diff --git a/.github/workflows/run-benchmarks.yml b/.github/workflows/run-benchmarks.yml index 50ec98c..baea81a 100644 --- a/.github/workflows/run-benchmarks.yml +++ b/.github/workflows/run-benchmarks.yml @@ -1,4 +1,4 @@ -name: Run benchmarks +name: run-benchmarks on: workflow_dispatch: From db8b756a748d1e7a65b063d92c96e7fb09095b27 Mon Sep 17 00:00:00 2001 From: Palash Tyagi <23239946+Magnus167@users.noreply.github.com> Date: Mon, 5 May 2025 21:33:35 +0100 Subject: [PATCH 03/17] Update push trigger to include 'docs_page' branch in CI workflow --- .github/workflows/docs-and-testcov.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs-and-testcov.yml b/.github/workflows/docs-and-testcov.yml index 2f1f92e..81a184f 100644 --- a/.github/workflows/docs-and-testcov.yml +++ b/.github/workflows/docs-and-testcov.yml @@ -6,7 +6,7 @@ concurrency: on: push: - branches: [main] + branches: [main, docs_page] # pull_request: # branches: [main] workflow_dispatch: From f520f29f11f9882a54450e48ce576738ffd2fedb Mon Sep 17 00:00:00 2001 From: Palash Tyagi <23239946+Magnus167@users.noreply.github.com> Date: Mon, 5 May 2025 21:55:56 +0100 Subject: [PATCH 04/17] Add installation of GitHub CLI in Dockerfile --- .github/runners/runner-x64/Dockerfile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/runners/runner-x64/Dockerfile b/.github/runners/runner-x64/Dockerfile index 79ee4e3..ee137b2 100644 --- a/.github/runners/runner-x64/Dockerfile +++ b/.github/runners/runner-x64/Dockerfile @@ -15,6 +15,12 @@ RUN apt install -y --no-install-recommends \ # Rust and Cargo dependencies gcc cmake +# Install GitHub CLI +RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \ + && chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg \ + && echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null \ + && apt update -y && apt install -y gh \ + && rm -rf /var/lib/apt/lists/* # Install Rust and Cargo RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y From 659e93c27d8bdb88afec8452da45ca294e4942be Mon Sep 17 00:00:00 2001 From: Palash Tyagi <23239946+Magnus167@users.noreply.github.com> Date: Mon, 5 May 2025 21:57:43 +0100 Subject: [PATCH 05/17] testing runners From 054b3c828e2cb3ed3bb2c7e441163c461cc10bea Mon Sep 17 00:00:00 2001 From: Palash Tyagi <23239946+Magnus167@users.noreply.github.com> Date: Mon, 5 May 2025 22:00:23 +0100 Subject: [PATCH 06/17] Add 'unzip' to the list of installed packages in Dockerfile --- .github/runners/runner-x64/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/runners/runner-x64/Dockerfile b/.github/runners/runner-x64/Dockerfile index ee137b2..de3cb24 100644 --- a/.github/runners/runner-x64/Dockerfile +++ b/.github/runners/runner-x64/Dockerfile @@ -7,7 +7,7 @@ ARG DEBIAN_FRONTEND=noninteractive RUN apt update -y && apt upgrade -y && useradd -m docker RUN apt install -y --no-install-recommends \ - curl jq git \ + curl jq git unzip \ # dev dependencies build-essential libssl-dev libffi-dev python3 python3-venv python3-dev python3-pip \ # dot net core dependencies From aec6278a50fb8bb271ed4fac3772137ef9794bb5 Mon Sep 17 00:00:00 2001 From: Palash Tyagi <23239946+Magnus167@users.noreply.github.com> Date: Mon, 5 May 2025 22:22:50 +0100 Subject: [PATCH 07/17] Add debugging output for benchmark report extraction in CI workflow --- .github/workflows/docs-and-testcov.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/docs-and-testcov.yml b/.github/workflows/docs-and-testcov.yml index 81a184f..53a3495 100644 --- a/.github/workflows/docs-and-testcov.yml +++ b/.github/workflows/docs-and-testcov.yml @@ -119,6 +119,8 @@ jobs: -o benchmark-report.zip "$artifact_url" mkdir -p benchmark-report + # print ls -a + echo "$( ls -a benchmark-report )" unzip benchmark-report.zip -d benchmark-report # there will be a tar file in the benchmark-report directory # called artifact.tar. unzip it into the benchmark-report From bbcdbb4151cd65c4d32ccdfae2177e7beb1b441c Mon Sep 17 00:00:00 2001 From: Palash Tyagi <23239946+Magnus167@users.noreply.github.com> Date: Mon, 5 May 2025 22:28:14 +0100 Subject: [PATCH 08/17] Add error handling for missing benchmark report zip file in CI workflow --- .github/workflows/docs-and-testcov.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docs-and-testcov.yml b/.github/workflows/docs-and-testcov.yml index 53a3495..cef1082 100644 --- a/.github/workflows/docs-and-testcov.yml +++ b/.github/workflows/docs-and-testcov.yml @@ -118,9 +118,13 @@ jobs: curl -L -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ -o benchmark-report.zip "$artifact_url" - mkdir -p benchmark-report - # print ls -a - echo "$( ls -a benchmark-report )" + + # check if there is a benchmark-report.zip file + if [ ! -f benchmark-report.zip ]; then + echo "benchmark-report.zip not found!" + exit 1 + fi + unzip benchmark-report.zip -d benchmark-report # there will be a tar file in the benchmark-report directory # called artifact.tar. unzip it into the benchmark-report From f0de677b6984c5b2f82ea1cf29df88f493dd704b Mon Sep 17 00:00:00 2001 From: Palash Tyagi <23239946+Magnus167@users.noreply.github.com> Date: Mon, 5 May 2025 22:31:31 +0100 Subject: [PATCH 09/17] Add validation for benchmark report zip file and list directory contents --- .github/workflows/docs-and-testcov.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/docs-and-testcov.yml b/.github/workflows/docs-and-testcov.yml index cef1082..215926c 100644 --- a/.github/workflows/docs-and-testcov.yml +++ b/.github/workflows/docs-and-testcov.yml @@ -118,13 +118,16 @@ jobs: curl -L -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ -o benchmark-report.zip "$artifact_url" - - # check if there is a benchmark-report.zip file - if [ ! -f benchmark-report.zip ]; then - echo "benchmark-report.zip not found!" + # check if the zip file is valid + if ! unzip -tq benchmark-report.zip; then + echo "benchmark-report.zip is invalid or corrupted!" exit 1 fi - + + # Print all files in the current directory + echo "Files in the current directory:" + ls -al + unzip benchmark-report.zip -d benchmark-report # there will be a tar file in the benchmark-report directory # called artifact.tar. unzip it into the benchmark-report From 33fea1d126612c240c9bd470d678cd0d278a8fc3 Mon Sep 17 00:00:00 2001 From: Palash Tyagi <23239946+Magnus167@users.noreply.github.com> Date: Mon, 5 May 2025 22:33:25 +0100 Subject: [PATCH 10/17] Refactor benchmark report download step to improve error handling and add directory listing --- .github/workflows/docs-and-testcov.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/docs-and-testcov.yml b/.github/workflows/docs-and-testcov.yml index 215926c..ad6fe1e 100644 --- a/.github/workflows/docs-and-testcov.yml +++ b/.github/workflows/docs-and-testcov.yml @@ -115,8 +115,13 @@ jobs: exit 1 fi - curl -L -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ - -o benchmark-report.zip "$artifact_url" + curl -L -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" "$artifact_url" + + + + # Print all files in the current directory + echo "Files in the current directory:" + ls -al # check if the zip file is valid if ! unzip -tq benchmark-report.zip; then @@ -124,10 +129,6 @@ jobs: exit 1 fi - # Print all files in the current directory - echo "Files in the current directory:" - ls -al - unzip benchmark-report.zip -d benchmark-report # there will be a tar file in the benchmark-report directory # called artifact.tar. unzip it into the benchmark-report From efe44c7399b1fc28c8f9bf74d7aaa228b89da437 Mon Sep 17 00:00:00 2001 From: Palash Tyagi <23239946+Magnus167@users.noreply.github.com> Date: Mon, 5 May 2025 22:34:41 +0100 Subject: [PATCH 11/17] Update benchmark report download step to use custom GitHub token for authorization --- .github/workflows/docs-and-testcov.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs-and-testcov.yml b/.github/workflows/docs-and-testcov.yml index ad6fe1e..2d4f7ee 100644 --- a/.github/workflows/docs-and-testcov.yml +++ b/.github/workflows/docs-and-testcov.yml @@ -115,7 +115,7 @@ jobs: exit 1 fi - curl -L -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" "$artifact_url" + curl -L -H "Authorization: Bearer ${{ secrets.CUSTOM_GH_TOKEN }}" "$artifact_url" From eab1c5eec1da096f7b504b287f26efb62cb960a7 Mon Sep 17 00:00:00 2001 From: Palash Tyagi <23239946+Magnus167@users.noreply.github.com> Date: Mon, 5 May 2025 22:36:00 +0100 Subject: [PATCH 12/17] Download benchmark report zip file in CI workflow --- .github/workflows/docs-and-testcov.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docs-and-testcov.yml b/.github/workflows/docs-and-testcov.yml index 2d4f7ee..1d0fbde 100644 --- a/.github/workflows/docs-and-testcov.yml +++ b/.github/workflows/docs-and-testcov.yml @@ -115,7 +115,8 @@ jobs: exit 1 fi - curl -L -H "Authorization: Bearer ${{ secrets.CUSTOM_GH_TOKEN }}" "$artifact_url" + curl -L -H "Authorization: Bearer ${{ secrets.CUSTOM_GH_TOKEN }}" \ + "$artifact_url" -o benchmark-report.zip From eeabfcfff6f14d8a2083198cf480ccd037ba64e2 Mon Sep 17 00:00:00 2001 From: Palash Tyagi <23239946+Magnus167@users.noreply.github.com> Date: Mon, 5 May 2025 22:37:25 +0100 Subject: [PATCH 13/17] Simplify benchmark report extraction process by using quiet unzip and removing unnecessary steps --- .github/workflows/docs-and-testcov.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/docs-and-testcov.yml b/.github/workflows/docs-and-testcov.yml index 1d0fbde..193ea12 100644 --- a/.github/workflows/docs-and-testcov.yml +++ b/.github/workflows/docs-and-testcov.yml @@ -130,13 +130,8 @@ jobs: exit 1 fi - unzip benchmark-report.zip -d benchmark-report - # there will be a tar file in the benchmark-report directory - # called artifact.tar. unzip it into the benchmark-report - tar -xvf benchmark-report/artifact.tar -C benchmark-report - # remove the artifact.tar file - rm benchmark-report/artifact.tar - # add an index.html that points to benchmark-report/report/index.html + unzip -q benchmark-report.zip -d benchmark-report + echo "" > benchmark-report/index.html - name: Copy files to output directory From b3b0e5e3ae977f71d2d30c1b03f8242a5f42748f Mon Sep 17 00:00:00 2001 From: Palash Tyagi <23239946+Magnus167@users.noreply.github.com> Date: Mon, 5 May 2025 23:21:33 +0100 Subject: [PATCH 14/17] Update index.html to enhance documentation links and add benchmarks section --- .github/htmldocs/index.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/htmldocs/index.html b/.github/htmldocs/index.html index eb43b87..cfcda2f 100644 --- a/.github/htmldocs/index.html +++ b/.github/htmldocs/index.html @@ -56,8 +56,11 @@ Rustframe

A lightweight dataframe & math toolkit for Rust

+

- ๐Ÿ“š Docs + ๐Ÿ“š Docs | + ๐Ÿ“Š Benchmarks +

๐Ÿฆ€ Crates.io | ๐Ÿ”– docs.rs From bca112100402cea7c15f1ecddbff9355c238d9ed Mon Sep 17 00:00:00 2001 From: Palash Tyagi <23239946+Magnus167@users.noreply.github.com> Date: Mon, 5 May 2025 23:27:18 +0100 Subject: [PATCH 15/17] Fix icon path in index.html and update .gitignore to include extra copies rustframe_logo.png --- .github/htmldocs/index.html | 4 ++-- .gitignore | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/htmldocs/index.html b/.github/htmldocs/index.html index cfcda2f..b39f850 100644 --- a/.github/htmldocs/index.html +++ b/.github/htmldocs/index.html @@ -5,7 +5,7 @@ Rustframe - +