diff --git a/.github/htmldocs/index.html b/.github/htmldocs/index.html
new file mode 100644
index 0000000..b39f850
--- /dev/null
+++ b/.github/htmldocs/index.html
@@ -0,0 +1,74 @@
+
+
+
+
+
+
+ Rustframe
+
+
+
+
+
+
+
+ 
+ Rustframe
+
+ A lightweight dataframe & math toolkit for Rust
+
+
+ 📚 Docs |
+ 📊 Benchmarks
+
+
+ 🦀 Crates.io |
+ 🔖 docs.rs
+
+ 🐙 GitHub |
+ 🌐 Gitea mirror
+
+
+
+
+
\ No newline at end of file
diff --git a/.github/runners/runner-x64/Dockerfile b/.github/runners/runner-x64/Dockerfile
index 79ee4e3..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
@@ -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
diff --git a/.github/workflows/docs-and-testcov.yml b/.github/workflows/docs-and-testcov.yml
index 8ace0a8..c845a1a 100644
--- a/.github/workflows/docs-and-testcov.yml
+++ b/.github/workflows/docs-and-testcov.yml
@@ -6,10 +6,14 @@ concurrency:
on:
push:
- branches: [main]
+ branches: [main, docs_page]
# pull_request:
# branches: [main]
workflow_dispatch:
+ workflow_run:
+ workflows: ["run-benchmarks"]
+ types:
+ - completed
permissions:
contents: read
@@ -100,6 +104,36 @@ 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.CUSTOM_GH_TOKEN }}" \
+ "$artifact_url" -o benchmark-report.zip
+
+
+
+ # 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
+ echo "benchmark-report.zip is invalid or corrupted!"
+ exit 1
+ fi
+
+ unzip -q benchmark-report.zip -d benchmark-report
+
+ echo "" > benchmark-report/index.html
+
- name: Copy files to output directory
run: |
# mkdir docs
@@ -113,16 +147,16 @@ jobs:
cp last-commit-date.json target/doc/docs/
# cp -r .github target/doc/docs
cp .github/rustframe_logo.png target/doc/docs/
- echo "" > target/doc/index.html
+ # echo "" > target/doc/index.html
touch target/doc/.nojekyll
- # verify that logo exists in the output directory
- - name: Verify logo directory
+ # copy the benchmark report to the output directory
+ cp -r benchmark-report target/doc/
+
+ - name: Add index.html to output directory
run: |
- if [ ! -f target/doc/docs/rustframe_logo.png ]; then
- echo "Logo not found in output directory!"
- exit 1
- fi
+ cp .github/htmldocs/index.html target/doc/index.html
+ cp .github/rustframe_logo.png target/doc/rustframe_logo.png
- name: Upload Pages artifact
# if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
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:
diff --git a/.gitignore b/.gitignore
index 665001e..ac6b27b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -14,4 +14,6 @@ data/
.venv/
.vscode/
-tarpaulin-report.*
\ No newline at end of file
+tarpaulin-report.*
+
+.github/htmldocs/rustframe_logo.png
\ No newline at end of file