Skip to content

Commit f88d83a

Browse files
committed
Initial commit
0 parents  commit f88d83a

549 files changed

Lines changed: 340222 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: Sync Boost Release
2+
3+
on:
4+
schedule:
5+
# 05:00 UTC = midnight EST (UTC-5); shifts to 01:00 EDT in summer — acceptable
6+
- cron: '0 5 * * *'
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: write
11+
12+
jobs:
13+
sync:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
20+
- name: Detect latest Boost production release
21+
id: detect
22+
env:
23+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24+
run: |
25+
# GitHub Tags API — most-recently-created tags first.
26+
# 50 entries is more than enough: Boost ships ~4 tags/year
27+
# (one beta + one production per release cycle).
28+
TAGS=$(curl -fsSL \
29+
-H "Authorization: Bearer $GH_TOKEN" \
30+
-H "Accept: application/vnd.github+json" \
31+
"https://api.github.com/repos/boostorg/boost/tags?per_page=50")
32+
33+
# Keep only clean production tags: boost-X.Y.Z (no .betaN or .rcN suffix)
34+
LATEST_TAG=$(echo "$TAGS" | jq -r \
35+
'[.[] | select(.name | test("^boost-[0-9]+\\.[0-9]+\\.[0-9]+$"))] | .[0].name')
36+
37+
if [ -z "$LATEST_TAG" ] || [ "$LATEST_TAG" = "null" ]; then
38+
echo "ERROR: Could not determine latest Boost production tag." >&2
39+
exit 1
40+
fi
41+
42+
echo "Latest production tag: $LATEST_TAG"
43+
44+
# Convert boost-1.90.0 → v1.90
45+
# Pattern: boost-<major>.<minor>.<patch> → v<major>.<minor>
46+
DIR=$(echo "$LATEST_TAG" | sed -E 's/^boost-([0-9]+)\.([0-9]+)\.[0-9]+$/v\1.\2/')
47+
48+
echo "Mapped directory name: $DIR"
49+
echo "dir=$DIR" >> "$GITHUB_OUTPUT"
50+
51+
if [ -d "$DIR" ]; then
52+
echo "Directory '$DIR' already exists — no action needed."
53+
echo "is_new=false" >> "$GITHUB_OUTPUT"
54+
else
55+
echo "New release detected — will create '$DIR'."
56+
echo "is_new=true" >> "$GITHUB_OUTPUT"
57+
fi
58+
59+
- name: Copy develop/ to versioned directory
60+
if: steps.detect.outputs.is_new == 'true'
61+
run: |
62+
DIR="${{ steps.detect.outputs.dir }}"
63+
cp -r develop/ "$DIR/"
64+
echo "Copied develop/ → $DIR/"
65+
66+
- name: Commit and push
67+
if: steps.detect.outputs.is_new == 'true'
68+
run: |
69+
DIR="${{ steps.detect.outputs.dir }}"
70+
git config user.name "github-actions[bot]"
71+
git config user.email "github-actions[bot]@users.noreply.github.com"
72+
git add "$DIR/"
73+
git commit -m "Add $DIR (snapshot from develop)"
74+
git push

.github/workflows/deploy.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Deploy to GCP
2+
3+
on:
4+
push:
5+
branches: [main]
6+
workflow_dispatch:
7+
8+
jobs:
9+
deploy:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Pull and optionally restart
13+
uses: appleboy/ssh-action@v1.2.0
14+
with:
15+
host: ${{ secrets.SERVER_HOST }}
16+
username: ${{ secrets.SERVER_USER }}
17+
key: ${{ secrets.SERVER_SSH_KEY }}
18+
script: |
19+
cd /opt/boost
20+
git fetch origin main
21+
CHANGED=$(git diff HEAD origin/main --name-only)
22+
git pull origin main
23+
if echo "$CHANGED" | grep -qE "^(Dockerfile|nginx\.conf|docker-compose\.yml)$"; then
24+
docker compose up -d --build
25+
fi

.github/workflows/pages.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Deploy GitHub Pages (redirect only)
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- 'index.html'
8+
- '404.html'
9+
workflow_dispatch:
10+
11+
permissions:
12+
contents: read
13+
pages: write
14+
id-token: write
15+
16+
concurrency:
17+
group: pages
18+
cancel-in-progress: true
19+
20+
jobs:
21+
deploy:
22+
environment:
23+
name: github-pages
24+
url: ${{ steps.deployment.outputs.page_url }}
25+
runs-on: ubuntu-latest
26+
steps:
27+
- name: Checkout
28+
uses: actions/checkout@v4
29+
30+
- name: Prepare redirect-only artifact
31+
run: |
32+
mkdir _pages
33+
cp index.html _pages/
34+
cp 404.html _pages/
35+
36+
- name: Setup Pages
37+
uses: actions/configure-pages@v5
38+
39+
- name: Upload Pages artifact
40+
uses: actions/upload-pages-artifact@v3
41+
with:
42+
path: _pages
43+
44+
- name: Deploy to GitHub Pages
45+
id: deployment
46+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
._*

.nojekyll

Whitespace-only changes.

404.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>Redirecting...</title>
7+
<script>
8+
window.location.replace(
9+
'https://dev.cppdigest.org/boost' + window.location.pathname
10+
);
11+
</script>
12+
</head>
13+
<body>
14+
<p>Redirecting to <a href="https://dev.cppdigest.org/boost/">dev.cppdigest.org/boost/</a>&hellip;</p>
15+
</body>
16+
</html>

Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
FROM nginx:alpine
2+
COPY nginx.conf /etc/nginx/conf.d/default.conf

README.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# Boost Library Usage Analysis
2+
3+
This repository hosts comprehensive analysis and statistics of Boost C++ Library usage across GitHub repositories, organized by Boost version.
4+
5+
## Repository Structure
6+
7+
```
8+
.
9+
├── index.html # Version selector (root landing page)
10+
├── v1.90/ # Boost 1.90 analysis
11+
│ ├── index.html # Main dashboard
12+
│ ├── bsl_analysis.html # BSL-1.0 license analysis
13+
│ ├── data_to_release_note.html # Release notes data
14+
│ ├── dashboard_data.json # Dashboard data
15+
│ └── libraries/ # Individual library detail pages
16+
│ ├── algorithm.html
17+
│ ├── asio.html
18+
│ └── ...
19+
├── v1.91/ # Boost 1.91 analysis (when available)
20+
│ └── ...
21+
└── _config.yml # Jekyll configuration
22+
```
23+
24+
## Adding a New Version
25+
26+
When a new Boost version (e.g., 1.91) becomes available:
27+
28+
1. **Create the version directory:**
29+
```bash
30+
mkdir v1.91
31+
```
32+
33+
2. **Copy the structure from the previous version:**
34+
```bash
35+
cp -r v1.90/* v1.91/
36+
```
37+
38+
3. **Update the files in v1.91/** with new data:
39+
- Update `index.html` with new statistics
40+
- Update `bsl_analysis.html` with new BSL-1.0 data
41+
- Update `data_to_release_note.html` with new release notes
42+
- Update `dashboard_data.json` with new dashboard data
43+
- Update all library detail pages in `libraries/` with new data
44+
45+
4. **Update the root `index.html`:**
46+
- Add a new version card for v1.91
47+
- Mark it as "Latest" (remove "Latest" from previous version)
48+
- Update the JavaScript `latestVersion` variable if auto-redirect is enabled
49+
50+
5. **Update version references:**
51+
- Search and replace version numbers in the new version's files
52+
- Update any hardcoded version references (e.g., "Latest Version: 1.90.0" → "1.91.0")
53+
54+
## File Organization
55+
56+
- **Root `index.html`**: Landing page with version selector
57+
- **Version directories (`v1.90/`, `v1.91/`, etc.)**: Each contains a complete set of analysis pages for that version
58+
- **Library detail pages**: Located in `v{version}/libraries/` directory
59+
60+
## Navigation
61+
62+
- Users land on the root `index.html` and select a version
63+
- Within each version, navigation links are relative (no version prefix needed)
64+
- Library pages link back to their version's dashboard using `../index.html`
65+
- All version pages include a "Back to Version Selector" link
66+
67+
## Notes
68+
69+
- All internal links within a version directory use relative paths
70+
- The root index.html uses absolute paths with version prefixes (e.g., `v1.90/index.html`)
71+
- When adding new versions, ensure all links are updated correctly
72+

_config.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
title: Boost Library Usage Analysis
2+
description: |
3+
Comprehensive analysis and statistics of Boost C++ Library usage across GitHub repositories.<br />
4+
Explore usage trends, library popularity, repository statistics, and BSL-1.0 license analysis.
5+
6+
show_downloads: false

0 commit comments

Comments
 (0)