diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 20cab9c..ef7cd12 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -56,7 +56,7 @@ jobs: key: ${{ runner.os }}-conda-${{ matrix.python-version}}-${{ env.CACHE_NUMBER }} - name: Configure conda - uses: conda-incubator/setup-miniconda@v2 + uses: conda-incubator/setup-miniconda@v3 with: activate-environment: test channels: conda-forge diff --git a/.github/workflows/distribution.yml b/.github/workflows/distribution.yml index bdffda0..2a57182 100644 --- a/.github/workflows/distribution.yml +++ b/.github/workflows/distribution.yml @@ -9,7 +9,7 @@ jobs: strategy: matrix: # Needs some work to make wheels also on macos - os: [ubuntu-20.04] + os: [macos-12] steps: - uses: actions/checkout@v2 @@ -17,7 +17,7 @@ jobs: fetch-depth: 0 - uses: actions/setup-python@v2 - name: Install cibuildwheel - run: python -m pip install cibuildwheel==1.9.0 + run: python -m pip install cibuildwheel==2.17.0 - name: Build wheels run: python -m cibuildwheel --output-dir wheelhouse @@ -27,10 +27,10 @@ jobs: # pip is hard to link against. This symlinks it into /usr/lib so # that it can be found. CIBW_BEFORE_BUILD: bash tools/cibuildwheel_prep.sh - CIBW_BUILD: cp36-* cp37-* cp38-* cp39-* + CIBW_BUILD: cp36-manylinux* cp37-manylinux* cp38-manylinux* cp39-manylinux* cp310-manylinux* cp311-manylinux* cp312-manylinux* cp36-macosx* cp37-macosx* cp39-macosx* CIBW_ARCHS: auto64 - CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 - CIBW_MANYLINUX_PYPY_X86_64_IMAGE: manylinux2014 + CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28 + CIBW_MANYLINUX_PYPY_X86_64_IMAGE: manylinux_2_28 - uses: actions/upload-artifact@v2 with: path: ./wheelhouse/*.whl diff --git a/tools/cibuildwheel_prep.sh b/tools/cibuildwheel_prep.sh index 44c06ef..5648382 100644 --- a/tools/cibuildwheel_prep.sh +++ b/tools/cibuildwheel_prep.sh @@ -1,6 +1,27 @@ set -e # This is used in github actions when building the wheels for distribution. -# Do not run this outside of that! +# DO NOT RUN THIS SCRIPT OUTSIDE OF THAT!!! pip install lalsuite -cp `python -c 'import sys; print (sys.path[-1])'`/lalsuite.libs/lib*so* /usr/lib -ln -sf `python -c 'import sys; print (sys.path[-1])'`/lalsuite.libs/liblal-*so* /usr/lib/liblal.so +# DEBUG COMMAND BELOW. THIS MUST BE REMOVED +#pip install --upgrade git+https://github.com/spxiwh/delocate.git + +if [[ "$OSTYPE" == "linux-gnu"* ]]; then + # Needed for linux + cp `python -c 'import sys; print (sys.path[-1])'`/lalsuite.libs/lib*so* /usr/lib + ln -sf `python -c 'import sys; print (sys.path[-1])'`/lalsuite.*libs/liblal-*so* /usr/lib/liblal.so +elif [[ "$OSTYPE" == "darwin"* ]]; then + # Mac names are quite different + #sudo conda install -c conda-forge liblal + #conda init + #source ~/.bashrc + #conda activate root + #echo "conda activate root" >> ~/.bashrc + #echo `python -c 'import sys; print (sys.path[-1])'`/lalsuite.dylibs/ + #sudo echo `python -c 'import sys; print (sys.path[-1])'`/lalsuite.dylibs/ + #sudo ls `python -c 'import sys; print (sys.path[-1])'`/lalsuite.dylibs/ + #export DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:`python -c 'import sys; print (sys.path[-1])'`/lalsuite.dylibs/ + #echo "export DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:`python -c 'import sys; print (sys.path[-1])'`/lalsuite.dylibs/" >> ~/.bashrc + sudo cp `python -c 'import sys; print (sys.path[-1])'`/lalsuite.dylibs/lib*dylib /usr/local/lib + sudo cp `python -c 'import sys; print (sys.path[-1])'`/lalsuite.dylibs/liblal.*.dylib /usr/local/lib/liblal.dylib + +fi # Don't consider anything else at present