Merge 659e93c27d8bdb88afec8452da45ca294e4942be into 2bc375f95009e600ba8d584a88a2b59da7c0e8ef

This commit is contained in:
Palash Tyagi 2025-05-05 21:57:47 +01:00 committed by GitHub
commit 53b4833ae9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 110 additions and 2 deletions

71
.github/htmldocs/index.html vendored Normal file
View File

@ -0,0 +1,71 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Rustframe</title>
<link rel="icon" type="image/png" href="../rustframe_logo.png">
<style>
body {
font-family: Arial, sans-serif;
background-color: #2b2b2b;
color: #d4d4d4;
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
main {
text-align: center;
padding: 20px;
background-color: #3c3c3c;
border-radius: 10px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
max-width: 600px;
}
img {
max-width: 100px;
margin-bottom: 20px;
}
h1 {
/* logo is b35f20 */
color: #f8813f;
}
a {
color: #ff9a60;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
</style>
</head>
<body>
<main>
<h1>
<img src="../rustframe_logo.png" alt="Rustframe Logo"><br>
Rustframe
</h1>
<h2>A lightweight dataframe & math toolkit for Rust</h2>
<p>
📚 <a href="https://magnus167.github.io/rustframe/">Docs</a>
<br><br>
🦀 <a href="https://crates.io/crates/rustframe">Crates.io</a> |
🔖 <a href="https://docs.rs/rustframe/latest/rustframe/">docs.rs</a>
<br><br>
🐙 <a href="https://github.com/Magnus167/rustframe">GitHub</a> |
🌐 <a href="https://gitea.nulltech.uk/Magnus167/rustframe">Gitea mirror</a>
</p>
</main>
</body>
</html>

View File

@ -15,6 +15,12 @@ RUN apt install -y --no-install-recommends \
# Rust and Cargo dependencies # Rust and Cargo dependencies
gcc cmake 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 # Install Rust and Cargo
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y

View File

@ -6,10 +6,14 @@ concurrency:
on: on:
push: push:
branches: [main] branches: [main, docs_page]
# pull_request: # pull_request:
# branches: [main] # branches: [main]
workflow_dispatch: workflow_dispatch:
workflow_run:
workflows: ["run-benchmarks"]
types:
- completed
permissions: permissions:
contents: read contents: read
@ -100,6 +104,30 @@ jobs:
<(echo '{}') \ <(echo '{}') \
> last-commit-date.json > 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 "<meta http-equiv=\"refresh\" content=\"0; url=report/index.html\">" > benchmark-report/index.html
- name: Copy files to output directory - name: Copy files to output directory
run: | run: |
# mkdir docs # mkdir docs
@ -116,6 +144,9 @@ jobs:
echo "<meta http-equiv=\"refresh\" content=\"0; url=docs\">" > target/doc/index.html echo "<meta http-equiv=\"refresh\" content=\"0; url=docs\">" > target/doc/index.html
touch target/doc/.nojekyll 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 # verify that logo exists in the output directory
- name: Verify logo directory - name: Verify logo directory
run: | run: |

View File

@ -1,4 +1,4 @@
name: Run benchmarks name: run-benchmarks
on: on:
workflow_dispatch: workflow_dispatch: