Skip to content

Commit 4f95dd5

Browse files
committed
Add a changelog back one year, a script to build a new entry, and checks
1 parent f4a84ac commit 4f95dd5

4 files changed

Lines changed: 200 additions & 0 deletions

File tree

.github/workflows/checks.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Check Changelog
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
jobs:
9+
check:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v6.0.1
13+
with:
14+
fetch-depth: 0
15+
16+
- name: Check version differs from main
17+
run: |
18+
version=$(grep "^version = " pyproject.toml | sed 's/version = "//;s/"//')
19+
main_version=$(git show origin/main:pyproject.toml | grep "^version = " | sed 's/version = "//;s/"//')
20+
if [[ "$version" == "$main_version" ]]; then
21+
echo "ERROR: pyproject.toml version ($version) is the same as main ($main_version)"
22+
echo "Please bump the version before submitting a PR."
23+
exit 1
24+
fi
25+
echo "Version check passed: $version (main is $main_version)"
26+
27+
- name: Check changelog has entry for version
28+
run: |
29+
version=$(grep "^version = " pyproject.toml | sed 's/version = "//;s/"//')
30+
if ! grep -q "^### $version " CHANGELOG.md; then
31+
echo "ERROR: CHANGELOG.md has no entry for $version"
32+
echo "Please run tools/update_changelog.sh and edit the entry before submitting."
33+
exit 1
34+
fi
35+
echo "Changelog check passed: found entry for $version"

CHANGELOG.md

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
## OpenBLAS v0.3.31.126 (v0.3.31-126-g55b16e59)
2+
3+
### 0.3.31.126.6 (2026-03-17)
4+
- Replace the VERSION = in Makefile.rule with the one from pyproject.toml
5+
6+
### 0.3.31.126.5 (2026-03-12)
7+
- use single workflow step for publishing to PyPI
8+
9+
### 0.3.31.126.4 (2026-03-12)
10+
- refactor, add pypi publishing
11+
12+
### 0.3.31.126.3 (2026-03-10)
13+
- disambiguate bewteen a NIGHTLY build and a publish build
14+
15+
### 0.3.31.126.2 (2026-03-10)
16+
- Trusted publishing work
17+
18+
### 0.3.31.126.1 (2026-03-08)
19+
- fix bad re-zip: use 'w' not 'a'
20+
21+
### 0.3.31.126.0 (2026-03-06)
22+
- update to 0.3.31-126-g55b16e59
23+
24+
## OpenBLAS v0.3.31.22 (v0.3.31-22-g5ffbf38b)
25+
26+
### 0.3.31.22.1 (2026-02-01)
27+
- feat: build riscv64+glibc wheel
28+
29+
### 0.3.31.22.0 (2026-01-20)
30+
- update to v0.3.31-22-g5ffbf38b
31+
32+
## OpenBLAS v0.3.30.443 (v0.3.30-443-g52ec7faf)
33+
34+
### 0.3.30.443.1 (2026-01-14)
35+
- fix typo which created bad pkgconfig file on arm64 32-bit interface
36+
37+
### 0.3.30.443.0 (2026-01-11)
38+
- version
39+
40+
## OpenBLAS v0.3.30.359 (v0.3.30-359-g29fab2b9)
41+
42+
### 0.3.30.359.2 (2026-01-11)
43+
- update OpenBLAS version
44+
45+
### 0.3.30.359.1 (2025-12-17)
46+
- cleanup and single-use OPENBLAS_COMMIT via a file
47+
48+
### 0.3.30.359.0 (2025-11-30)
49+
- Use clang instead of gcc to build on Linux
50+
51+
## OpenBLAS v0.3.30.349
52+
53+
### 0.3.30.349.1 (2025-11-29)
54+
- Always use gfortran-11 on macos
55+
56+
### 0.3.30.349.0 (2025-11-17)
57+
- update OpenBLAS version to v0.3.30-322-gef6f9762
58+
59+
## OpenBLAS v0.3.30.0
60+
61+
### 0.3.30.0.7 (2025-11-03)
62+
- patch out extraneous lock/unlock
63+
64+
### 0.3.30.0.6 (2025-10-29)
65+
- use gfortran-11 on macos-x86_64 build
66+
67+
### 0.3.30.0.5 (2025-10-23)
68+
- cleanup clean_code, remove repo_dir, checkout OpenBLAS commit in ci-before-build.sh
69+
70+
### 0.3.30.0.4 (2025-10-22)
71+
- patch to remove OpenBLAS PR 4741, cleanup unused bash code
72+
73+
### 0.3.30.0.3 (2025-10-21)
74+
- Use cibuildwheel to replace multibuild
75+
76+
### 0.3.30.0.2 (2025-10-12)
77+
- Using USE_THREADS & NUM_THREADS while building openblas for win arm64
78+
79+
### 0.3.30.0.0 (2025-06-26)
80+
- update OpenBLAS to 0.3.30
81+
82+
## OpenBLAS v0.3.29.265
83+
84+
### 0.3.29.265.2 (2025-06-09)
85+
- fix cmake and README
86+
87+
### 0.3.29.265.1 (2025-06-06)
88+
- Refactor confusing BUILD_BITS variable in CI
89+
90+
### 0.3.29.265.0 (2025-06-04)
91+
- Refactor CI to produce 64-bit integer interface wheels for WoA
92+
93+
## OpenBLAS v0.3.29.0
94+
95+
### 0.3.29.0.0 (2025-04-03)
96+
- Add build script for Windows on ARM64

tools/local_build.bat

Whitespace-only changes.

tools/update_changelog.sh

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
#!/bin/bash
2+
set -euo pipefail
3+
4+
REPO_DIR=$(git rev-parse --show-toplevel)
5+
CHANGELOG="$REPO_DIR/CHANGELOG.md"
6+
PYPROJECT="pyproject.toml"
7+
OPENBLAS_COMMIT_FILE="openblas_commit.txt"
8+
9+
# ── Get current version ───────────────────────────────────────────────────
10+
version=$(grep "^version = " "$PYPROJECT" | sed 's/version = "//;s/"//')
11+
12+
# ── Check version is different from main ─────────────────────────────────
13+
main_version=$(git show origin/main:"$PYPROJECT" | grep "^version = " | sed 's/version = "//;s/"//')
14+
if [[ "$version" == "$main_version" ]]; then
15+
echo "ERROR: pyproject.toml version ($version) is the same as main."
16+
echo "Please bump the version before submitting a PR."
17+
exit 1
18+
fi
19+
20+
# ── Guard: skip if version already in changelog ───────────────────────────
21+
if grep -q "^### $version " "$CHANGELOG" 2>/dev/null; then
22+
echo "CHANGELOG.md already contains $version — skipping."
23+
exit 0
24+
fi
25+
26+
# ── Get OpenBLAS info ─────────────────────────────────────────────────────
27+
openblas_raw=$(cat "$OPENBLAS_COMMIT_FILE")
28+
openblas_tag=$(echo "$openblas_raw" | sed 's/^\(v[0-9]*\.[0-9]*\.[0-9]*\)-\([0-9]*\).*/\1.\2/')
29+
30+
# ── Detect if OpenBLAS version changed vs main ────────────────────────────
31+
main_openblas_raw=$(git show origin/main:"$OPENBLAS_COMMIT_FILE" 2>/dev/null || true)
32+
33+
# ── Get date ──────────────────────────────────────────────────────────────
34+
date_str=$(date +%Y-%m-%d)
35+
36+
# ── Get first meaningful commit message ───────────────────────────────────
37+
merge_base=$(git merge-base origin/main HEAD)
38+
first_commit_msg=$(git log "$merge_base"..HEAD --format="%s" --reverse \
39+
| grep -iv "^typo\|^fix test\|^wip\|^minor\|^cleanup\|^merge" \
40+
| head -1 || true)
41+
[[ -z "$first_commit_msg" ]] && first_commit_msg="(no description)"
42+
43+
# ── Build new entry ───────────────────────────────────────────────────────
44+
new_entry=""
45+
if [[ -n "$main_openblas_raw" && "$openblas_raw" != "$main_openblas_raw" ]]; then
46+
new_entry="## OpenBLAS $openblas_tag ($openblas_raw)\n\n"
47+
fi
48+
new_entry+="### $version ($date_str)\n- $first_commit_msg\n\n"
49+
50+
# ── Prepend to changelog ──────────────────────────────────────────────────
51+
existing=$(cat "$CHANGELOG" 2>/dev/null || true)
52+
53+
if [[ -n "$main_openblas_raw" && "$openblas_raw" != "$main_openblas_raw" ]]; then
54+
# New OpenBLAS header + entry go at the very top
55+
printf "%b%s" "$new_entry" "$existing" > "$CHANGELOG"
56+
else
57+
# Insert ### entry after the existing ## OpenBLAS header
58+
printf "%b" "$existing" | awk -v entry="### $version ($date_str)\n- $first_commit_msg\n" '
59+
/^### /{
60+
if (!inserted) {
61+
printf "%s\n", entry
62+
inserted=1
63+
}
64+
}
65+
{ print }
66+
' > "$CHANGELOG"
67+
fi
68+
echo "Changelog updated: $version"
69+
echo "Please review and edit CHANGELOG.md before committing."

0 commit comments

Comments
 (0)