Compare commits
2
Commits
v0.1.0-rc.1
...
next
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a2ef500560 | ||
|
|
35c38eaf89 |
@@ -21,6 +21,8 @@ jobs:
|
||||
run: python3 -m unittest discover -s ci -p 'test_*.py'
|
||||
- name: Validate published Pages snapshot
|
||||
run: python3 ci/check_published.py
|
||||
- name: Verify live Pages and source isolation
|
||||
run: python3 ci/check_live_pages.py
|
||||
- name: Publish measured repository badges
|
||||
env:
|
||||
GITEA_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
@@ -11,31 +11,21 @@
|
||||

|
||||

|
||||
|
||||
Public, generated microbenchmark history for Alkane SDK, OS, and Toolkit.
|
||||
Public [benchmark history](https://blueflare.gitea.bluefla.re/alkane-benchmarks/)
|
||||
for Alkane SDK, OS, and Toolkit. Scheduled publishers copy measured host data
|
||||
after CI. Source repositories remain private. These results do not measure
|
||||
miner boards or qualify a release.
|
||||
|
||||
[View the benchmark site](https://blueflare.gitea.bluefla.re/alkane-benchmarks/).
|
||||
No Gitea login is required. The `gh-pages` branch contains only static pages.
|
||||
The source repositories remain private; their main CI workflows update the
|
||||
respective site paths after measurement.
|
||||
|
||||
These are host microbenchmarks. They do not show miner board performance or release qualification.
|
||||
The site repository has no microbenchmarks of its own, so its bench and bench
|
||||
coverage badges read `n/a`. Its coverage badge measures executed statement
|
||||
lines in the site validator and version selector under the guard tests.
|
||||
This site has no microbenchmarks of its own, so its bench badges read `n/a`.
|
||||
Its coverage badge measures the site validator and version selector.
|
||||
|
||||
## Branches
|
||||
|
||||
`main` validates the public Pages snapshot and runs the site guard tests.
|
||||
`next` validates the snapshot before making a release candidate. The
|
||||
`gh-pages` branch contains generated output only. Neither workflow copies
|
||||
source repositories into Pages.
|
||||
|
||||
CI creates `vX.Y.Z` releases from passing `main` runs and `-rc.N` releases
|
||||
from passing `next` runs. Edit `ci/version-x.txt` to change X. Changes to
|
||||
the site validator increment Y; documentation and CI fixes increment Z.
|
||||
The release tags identify site configuration, while benchmark measurements
|
||||
continue to update on `gh-pages`.
|
||||
`main` runs the site guards and publishes `vX.Y.Z` releases. `next` checks
|
||||
the snapshot and publishes `-rc.N` candidates. `gh-pages` holds generated
|
||||
pages only. Edit `ci/version-x.txt` to change X.
|
||||
Validator changes increment Y; documentation and CI changes increment Z.
|
||||
|
||||
## License
|
||||
|
||||
The site layout is [MIT licensed](LICENSE). Benchmark measurements are factual data from CI.
|
||||
The site layout is [MIT licensed](LICENSE).
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
#!/usr/bin/env python3
|
||||
# SPDX-License-Identifier: MIT
|
||||
"""Check that benchmark Pages are public and source repository Pages stay closed."""
|
||||
|
||||
from urllib.error import HTTPError, URLError
|
||||
from urllib.request import HTTPRedirectHandler, Request, build_opener
|
||||
|
||||
|
||||
BASE = "https://blueflare.gitea.bluefla.re"
|
||||
PUBLIC = (
|
||||
"/alkane-benchmarks/",
|
||||
"/alkane-benchmarks/sdk/",
|
||||
"/alkane-benchmarks/os/",
|
||||
"/alkane-benchmarks/toolkit/",
|
||||
)
|
||||
PRIVATE = ("/alkane-sdk/", "/alkane-os/", "/alkane-toolkit/")
|
||||
|
||||
|
||||
class NoRedirect(HTTPRedirectHandler):
|
||||
def redirect_request(self, request, response, code, message, headers, url):
|
||||
return None
|
||||
|
||||
|
||||
def status(opener, path: str) -> int:
|
||||
request = Request(BASE + path, headers={"User-Agent": "alkane-pages-gate/1"})
|
||||
try:
|
||||
with opener.open(request, timeout=15) as response:
|
||||
return response.status
|
||||
except HTTPError as error:
|
||||
return error.code
|
||||
|
||||
|
||||
def main() -> int:
|
||||
opener = build_opener(NoRedirect)
|
||||
failed = False
|
||||
for path in PUBLIC + PRIVATE:
|
||||
expected = 200 if path in PUBLIC else 404
|
||||
try:
|
||||
actual = status(opener, path)
|
||||
except URLError as error:
|
||||
print(f"FAIL {path}: {error.reason}")
|
||||
failed = True
|
||||
continue
|
||||
if actual != expected:
|
||||
print(f"FAIL {path}: HTTP {actual}; expected {expected}")
|
||||
failed = True
|
||||
else:
|
||||
print(f"PASS {path}: HTTP {actual}")
|
||||
return int(failed)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
Reference in New Issue
Block a user