Skip to content

Commit 0dfedf0

Browse files
authored
Merge pull request #245 from mattip/cleanup3
cleanup and single-use OPENBLAS_COMMIT via a file
2 parents 202309a + 28aad69 commit 0dfedf0

19 files changed

+38
-195
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
- [ ] I updated the package version in pyproject.toml and made sure the first 3 numbers match `git describe --tags --abbrev=8` in OpenBLAS at the `OPENBLAS_COMMIT`. If I did not update `OPENBLAS_COMMIT`, I incremented the wheel build number (i.e. 0.3.29.0.0 to 0.3.29.0.1)
1+
- [ ] I updated the package version in pyproject.toml and made sure the first 3 numbers match `./openblas_commit.txt`. If I did not update `./openblas_commit.txt`, I incremented the wheel build number (i.e. 0.3.29.0.0 to 0.3.29.0.1)
2+
3+
Note: update `./openblas_commit.txt` with `cd OpenBLAS; git describe --tags --abbrev=8 > ../openblas_commit.txt`

.github/workflows/posix.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ on:
1111
schedule:
1212
- cron: '0 0 * * 0'
1313

14-
env:
15-
OPENBLAS_COMMIT: "v0.3.30-359-g29fab2b9"
16-
1714
jobs:
1815
build:
1916
runs-on: ${{ matrix.os }}
@@ -118,12 +115,6 @@ jobs:
118115
path: dist/scipy_openblas*.whl
119116

120117

121-
- name: Upload openblas to artifacts
122-
uses: actions/upload-artifact@v4.3.0
123-
with:
124-
name: openblas-${{ matrix.os }}-${{ matrix.PLAT }}-${{ matrix.INTERFACE64 }}-${{ matrix.MB_ML_LIBC }}-${{ matrix.MB_ML_VER }}
125-
path: dist/openblas*.tar.gz
126-
127118
- uses: conda-incubator/setup-miniconda@v3.2.0
128119
with:
129120
channels: conda-forge

.github/workflows/windows-arm.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ on:
99
- maintenance/**
1010

1111
env:
12-
OPENBLAS_COMMIT: "v0.3.30-359-g29fab2b9"
1312
OPENBLAS_ROOT: "c:\\opt"
1413
# Preserve working directory for calls into bash
1514
# Without this, invoking bash will cd to the home directory

.github/workflows/windows.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ on:
1010
workflow_dispatch: null
1111

1212
env:
13-
OPENBLAS_COMMIT: "v0.3.30-359-g29fab2b9"
1413
OPENBLAS_ROOT: "c:\\opt"
1514
# Preserve working directory for calls into bash
1615
# Without this, invoking bash will cd to the home directory
@@ -71,7 +70,7 @@ jobs:
7170
- name: Build
7271
run: |
7372
git submodule update --init --recursive
74-
& $env:BASH_PATH -lc tools/build_openblas.sh
73+
& $env:BASH_PATH -lc tools/build_steps_windows.sh
7574
7675
- name: Test
7776
run: |
@@ -148,11 +147,6 @@ jobs:
148147
name: wheels-${{matrix.plat }}-${{ matrix.INTERFACE64 }}
149148
path: dist/scipy_openblas*.whl
150149

151-
- uses: actions/upload-artifact@v4.3.0
152-
with:
153-
name: openblas-${{matrix.plat }}-${{ matrix.INTERFACE64 }}
154-
path: builds/openblas*.zip
155-
156150
- name: Test 64-bit interface wheel
157151
if: matrix.INTERFACE64 == '1'
158152
run: |

.gitmodules

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
11
[submodule "OpenBLAS"]
22
path = OpenBLAS
33
url = https://github.com/xianyi/OpenBLAS.git
4-
[submodule "gfortran-install"]
5-
path = gfortran-install
6-
url = https://github.com/MacPython/gfortran-install.git

OpenBLAS

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
2121
# OpenBLAS library build process
2222

23-
First, tarballs are built using `do_build_lib` in `tools/build_steps.sh` (on
24-
posix in a docker and drectly on macos) or `build_openblas.sh` on windows.
23+
First, tarballs are built using `build_lib` in `tools/build_steps.sh` (on
24+
posix in a docker and drectly on macos) or `tools/build_steps_windows.sh` on windows.
2525

2626
Then the shared object and header files from the tarball are used to build the
2727
wheel via `tools/build_wheel.sh`, and the wheels uploaded to

build-openblas.sh

Lines changed: 4 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,11 @@
11
#! /bin/bash
22

3-
4-
# Most of the content in this file comes from https://github.com/multi-build/multibuild, with some modifications
5-
# Follow the license below
6-
7-
8-
9-
# .. _license:
10-
11-
# *********************
12-
# Copyright and License
13-
# *********************
14-
15-
# The multibuild package, including all examples, code snippets and attached
16-
# documentation is covered by the 2-clause BSD license.
17-
18-
# Copyright (c) 2013-2024, Matt Terry and Matthew Brett; all rights
19-
# reserved.
20-
21-
# Redistribution and use in source and binary forms, with or without
22-
# modification, are permitted provided that the following conditions are
23-
# met:
24-
25-
# 1. Redistributions of source code must retain the above copyright notice,
26-
# this list of conditions and the following disclaimer.
27-
28-
# 2. Redistributions in binary form must reproduce the above copyright
29-
# notice, this list of conditions and the following disclaimer in the
30-
# documentation and/or other materials provided with the distribution.
31-
32-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
33-
# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
34-
# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
35-
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
36-
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
37-
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
38-
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
39-
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
40-
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
41-
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
42-
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
43-
44-
453
set -xeo pipefail
464
source tools/build_steps.sh
475
echo "------ BEFORE BUILD ---------"
486
before_build
497

50-
if [[ "$NIGHTLY" = "true" ]]; then
51-
echo "------ CLEAN CODE --------"
52-
clean_code develop
53-
echo "------ BUILD LIB --------"
54-
build_lib "$PLAT" "$INTERFACE64" "1"
55-
else
56-
echo "------ CLEAN CODE --------"
57-
clean_code $OPENBLAS_COMMIT
58-
echo "------ BUILD LIB --------"
59-
build_lib "$PLAT" "$INTERFACE64" "0"
60-
fi
8+
echo "------ CLEAN CODE --------"
9+
clean_code $OPENBLAS_COMMIT
10+
echo "------ BUILD LIB --------"
11+
build_lib "$PLAT" "$INTERFACE64"

ci-before-build.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,13 @@ set -xe
4444
if [[ "$NIGHTLY" = "true" ]]; then
4545
pushd OpenBLAS
4646
git checkout develop
47+
export OPENBLAS_COMMIT=$(git describe --tags --abbrev=8)
4748
# Set the pyproject.toml version: convert v0.3.24-30-g138ed79f to 0.3.34.30
48-
version=$(git describe --tags --abbrev=8 | sed -e "s/^v\(.*\)-g.*/\1/" | sed -e "s/-/./g")
49+
version=$(echo $OPENBLAS_COMMIT | sed -e "s/^v\(.*\)-g.*/\1/" | sed -e "s/-/./g")
4950
popd
5051
sed -e "s/^version = .*/version = \"${version}\"/" -i.bak pyproject.toml
52+
else
53+
export OPENBLAS_COMMIT=$(cat openblas_commit.txt)
5154
fi
5255

5356
if [ "$(uname)" != "Darwin" ]; then

gfortran-install

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)