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 fe0d526
Show file tree
Hide file tree
Showing 13 changed files with 2,735 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/anaconda-client@1.8.0
# 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
bash -c tools/upload_to_anaconda_staging.sh
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
- bash -c tools/upload_to_anaconda_staging.sh
2 changes: 1 addition & 1 deletion OpenBLAS
Loading

0 comments on commit fe0d526

Please sign in to comment.