|
72 | 72 | submodules: recursive
|
73 | 73 | fetch-depth: 0
|
74 | 74 | - name: Set up Python 3.8
|
75 |
| - uses: actions/setup-python@v2 |
| 75 | + uses: actions/setup-python@v4 |
76 | 76 | with:
|
77 | 77 | python-version: 3.8
|
78 | 78 | - name: Set extra env
|
|
93 | 93 | echo "DOCKER_TEST_IMAGE: ${DOCKER_TEST_IMAGE}"
|
94 | 94 | - name: Install VirtualEnv
|
95 | 95 | run: |
|
96 |
| - python -m pip install --upgrade pip |
| 96 | + python3 -m pip install --upgrade pip |
97 | 97 | pip install virtualenv
|
98 | 98 | - name: Build OpenBLAS
|
99 | 99 | run: |
|
@@ -121,22 +121,30 @@ jobs:
|
121 | 121 | - name: Build wheel
|
122 | 122 | run: |
|
123 | 123 | mkdir -p local/openblas
|
| 124 | + # This will fail if there is more than one file in libs |
124 | 125 | tar -C local/openblas --strip-components=2 -xf libs/openblas*.tar.gz
|
125 |
| - cp local/openblas/lib/libopenblas64_.so local/openblas/libopenblas_python.so |
126 |
| - # do not package the static libs and symlinks, they are ~55MB |
127 |
| - rm -rf local/openblas/lib/* |
| 126 | + # do not package the static libs and symlinks |
| 127 | + cp $(find local/openblas/lib -maxdepth 1 -size +1M -executable) local/openblas/libopenblas_python.so |
| 128 | + rm -rf local/openblas/lib/lib* |
128 | 129 | mv local/openblas/libopenblas_python.so local/openblas/lib/
|
129 | 130 |
|
130 |
| - cat <<EOF > run_in_docker.sh |
131 |
| - cd /openblas |
132 |
| - patchelf --set-soname libopenblas_python.so local/openblas/lib/libopenblas_python.so |
133 |
| - python3.7 -m pip wheel -w /tmp/wheelhouse -vv . |
134 |
| - auditwheel repair -w dist/ /tmp/wheelhouse/openblas-*.whl |
135 |
| - python3.10 -m pip install dist/openblas-*.whl |
136 |
| - python3.10 -m openblas |
137 |
| - EOF |
| 131 | + if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then |
| 132 | + patchelf --set-soname libopenblas_python.so local/openblas/lib/libopenblas_python.so |
| 133 | + python3 -m pip install wheel auditwheel |
| 134 | + python3 -m pip wheel -w /tmp/wheelhouse -vv . |
| 135 | + auditwheel repair -w dist/ /tmp/wheelhouse/openblas-*.whl |
| 136 | + |
| 137 | + else |
| 138 | + cat <<EOF > run_in_docker.sh |
| 139 | + cd /openblas |
| 140 | + patchelf --set-soname libopenblas_python.so local/openblas/lib/libopenblas_python.so |
| 141 | + python3.7 -m pip wheel -w /tmp/wheelhouse -vv . |
| 142 | + auditwheel repair -w dist/ /tmp/wheelhouse/openblas-*.whl |
| 143 | + python3.10 -m pip install dist/openblas-*.whl |
| 144 | + python3.10 -m openblas |
| 145 | + EOF |
138 | 146 |
|
139 |
| - docker run --rm -v $(pwd):/openblas quay.io/pypa/manylinux2014_x86_64 /bin/bash -xe /openblas/run_in_docker.sh |
| 147 | + docker run --rm -v $(pwd):/openblas quay.io/pypa/manylinux2014_x86_64 /bin/bash -xe /openblas/run_in_docker.sh |
140 | 148 |
|
141 | 149 | - uses: actions/upload-artifact@v3
|
142 | 150 | with:
|
|
0 commit comments