Skip to content

Commit

Permalink
move travis-ci to tools, upload wheels
Browse files Browse the repository at this point in the history
  • Loading branch information
mattip committed Sep 26, 2023
1 parent 5b76f89 commit dcba54c
Show file tree
Hide file tree
Showing 14 changed files with 2,736 additions and 49 deletions.
47 changes: 17 additions & 30 deletions .github/workflows/posix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ jobs:
export SDKROOT=/Applications/Xcode_12.5.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk
clang --version
fi
source travis-ci/build_steps.sh
source tools/build_steps.sh
echo "------ BEFORE BUILD ---------"
before_build
if [[ "$NIGHTLY" = "true" ]]; then
Expand All @@ -110,15 +110,20 @@ jobs:
- name: Build and test wheel
run: |
if [[ "$NIGHTLY" = "true" ]]; then
# Set the pyproject.toml version
version = $(cd OpenBLAS && git describe --tags --abbrev=8 | sed -e "s/^v\(.*\)-g.*/\1/")
sed -e "s/^version = .*/version = ${version}/" -i.bak pyproject.toml
fi
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
source travis-ci/build_wheel.sh
source tools/build_wheel.sh
else
libc=${MB_ML_LIBC:-manylinux}
docker_image=quay.io/pypa/${libc}${MB_ML_VER}_${PLAT}
docker run --rm -e INTERFACE64="${INTERFACE64}" \
-e MB_ML_LIBC="${MB_ML_LIBC}" \
-v $(pwd):/openblas $docker_image \
/bin/bash -xe /openblas/travis-ci/build_wheel.sh
/bin/bash -xe /openblas/tools/build_wheel.sh
fi
- uses: actions/upload-artifact@v3
Expand All @@ -131,32 +136,14 @@ jobs:
name: wheels
path: dist/scipy_openblas*.whl

- uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: upload

- name: Upload
env:
ANACONDA_SCIENTIFIC_PYTHON_UPLOAD: ${{ secrets.ANACONDA_SCIENTIFIC_PYTHON_UPLOAD }}
run: |
set -ex
TOKEN=${{ secrets.ANACONDA_SCIENTIFIC_PYTHON_UPLOAD }}
if [ "$TOKEN" == "" ]; then
# The token is available when under the MacPython org, not on forks
echo "secrets.ANACONDA_SCIENTIFIC_PYTHON_UPLOAD is not defined: skipping";
else
# Pin urllib3<2 due to github.com/Anaconda-Platform/anaconda-client/issues/654
pip install "urllib3<2.0.0"
pip install git+https://github.com/Anaconda-Server/[email protected]
# The first -t option refers to the token, the second is the "type"
# option to the "upload" command
args=(
-t ${TOKEN} upload
--no-progress -u scientific-python-nightly-wheels
-t file -p "openblas-libs"
-d "OpenBLAS for multibuild wheels"
-s "OpenBLAS for multibuild wheels"
)
if [[ "$NIGHTLY" = "true" ]]; then
args+=(--force)
args+=(-v "HEAD")
else
args+=(--skip)
args+=(-v "$(cd OpenBLAS && git describe --tags --abbrev=8)")
fi
anaconda "${args[@]}" libs/openblas*.tar.gz
fi
# Pin urllib3<2 due to github.com/Anaconda-Platform/anaconda-client/issues/654
conda install "urllib3<2" anaconda-client
source tools/upload_to_anaconda_staging.sh
1 change: 1 addition & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ jobs:
# of a pyproject.toml project
sed -e "s/openblas64/openblas32/" -i pyproject.toml
sed -e "s/openblas_get_config64_/openblas_get_config/" -i local/scipy_openblas32/__init__.py
sed -e "s/openblas64/openblas32/" -i local/scipy_openblas32/__init__.py
sed -e "s/openblas64/openblas32/" -i local/scipy_openblas32/__main__.py
fi
cat tools/LICENSE_win32.txt >> LICENSE.txt
Expand Down
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ matrix:
- DOCKER_TEST_IMAGE=multibuild/xenial_{PLAT}

before_install:
- source travis-ci/build_steps.sh
- source tools/build_steps.sh
- before_build

install:
Expand All @@ -91,8 +91,8 @@ script:
- docker run --rm -e INTERFACE64="${INTERFACE64}" \
-e MB_ML_LIBC="${MB_ML_LIBC}" \
-v $(pwd):/openblas $docker_image \
/bin/bash -xe /openblas/travis-ci/build_wheel.sh
/bin/bash -xe /openblas/tools/build_wheel.sh

after_success:
# Upload libraries to the shared staging area on anaconda.org
- source tools/upload_to_anaconda_posix.sh
- source tools/upload_to_anaconda_staging.sh
2 changes: 1 addition & 1 deletion OpenBLAS
Loading

0 comments on commit dcba54c

Please sign in to comment.