Version 0.0.6 #207
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build | |
| on: [push, pull_request] | |
| jobs: | |
| build_wheels: | |
| name: Build wheels on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| # os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-13, macos-latest] | |
| # os: [ubuntu-latest] | |
| # os: [windows-2019] #latest] | |
| # os: [macos-latest] | |
| # os: [macos-13] | |
| os: [ubuntu-latest, windows-2022, ubuntu-24.04-arm, macos-15-intel, macos-latest] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install bootstrap Python (macOS only) | |
| if: runner.os == 'macOS' | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.11' | |
| # Apply patch only on Windows | |
| - name: Apply header patch on Windows | |
| if: matrix.os == 'windows-2022' | |
| run: | | |
| # Patch MinGW-w64 header files currently causing troubles for eC compiler (C99 .namedmembers assignments in AVX files, and re-defnitions of function type typedef in winbase.h) | |
| #git apply --directory=mingw64 '${{ github.workspace }}\patches\mingw64-gcc-12.2.0-patches.patch' | |
| cd C:\ | |
| copy ${{ github.workspace }}\patches\lib\gcc\x86_64-w64-mingw32\12.2.0\include\avx512fp16intrin.h C:\mingw64\lib\gcc\x86_64-w64-mingw32\14.2.0\include\avx512fp16intrin.h | |
| copy ${{ github.workspace }}\patches\lib\gcc\x86_64-w64-mingw32\12.2.0\include\avx512fp16vlintrin.h C:\mingw64\lib\gcc\x86_64-w64-mingw32\14.2.0\include\avx512fp16vlintrin.h | |
| copy ${{ github.workspace }}\patches\x86_64-w64-mingw32\include\winbase.h C:\mingw64\x86_64-w64-mingw32\include\winbase.h | |
| # Used to host cibuildwheel | |
| - uses: actions/setup-python@v5 | |
| - name: Initialize submodules | |
| run: git submodule update --init --recursive | |
| - name: Install cibuildwheel | |
| run: python3 -m pip install cibuildwheel==2.23.3 | |
| - name: Build wheels | |
| run: python3 -m cibuildwheel --output-dir wheelhouse | |
| env: | |
| CIBW_BUILD: "cp* pp*" | |
| # Windows PyPy 3.8 build is currently failing due to https://github.com/python-cffi/cffi/issues/170 | |
| # 32-bit builds on Windows are not supported because the MinGW-w64 does not have multilib enabled | |
| CIBW_SKIP: "*-win32 pp*-win*" | |
| # This ensures WIN_SHELL_COMMANDS does not get defined on Windows in crossplatform.mk, which breaks deep directory creations | |
| # since commands are executed in a UNIX-like shell expecting 'mkdir -p' | |
| CIBW_ENVIRONMENT: 'MSYSCON=y PIP_FIND_LINKS="https://pypi.org/simple/ecrt https://pypi.org/simple/ecdev"' | |
| CIBW_BUILD_VERBOSITY: 1 | |
| CIBW_REPAIR_WHEEL_COMMAND_LINUX: 'auditwheel repair -w {dest_dir} {wheel} --exclude libecrt.so' | |
| # CIBW_REPAIR_WHEEL_COMMAND_MACOS: 'delocate-wheel -w {dest_dir} -v {wheel}' | |
| CIBW_REPAIR_WHEEL_COMMAND_MACOS: > | |
| sh -c ' | |
| set -e | |
| TMP_DIR=$(mktemp -d); | |
| unzip -q {wheel} -d "$TMP_DIR"; | |
| otool -L "$TMP_DIR"/dggal/lib/libdggal.dylib; | |
| otool -l "$TMP_DIR"/dggal/lib/libdggal.dylib; | |
| otool -L "$TMP_DIR"/dggal/bin/dgg; | |
| otool -l "$TMP_DIR"/dggal/bin/dgg; | |
| rm -r "$TMP_DIR" | |
| cp {wheel} {dest_dir} | |
| ' | |
| # CIBW_SOME_OPTION: value | |
| # CIBW_BEFORE_BUILD: | | |
| # python3 -c "print('setuptools version:', setuptools.__version__)" | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} | |
| path: ./wheelhouse/*.whl |