[Trying] try build wheel using github actions #19
Workflow file for this run
This file contains 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: Wheel builder | |
on: | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
build_wheels: | |
name: Build wheel ${{ matrix.python }}-${{ matrix.buildplat[1] }} | |
runs-on: ${{ matrix.buildplat[0] }} | |
strategy: | |
fail-fast: false | |
matrix: | |
buildplat: | |
- [ubuntu-22.04, manylinux_x86_64] | |
# - [macos-13, macosx_x86_64] | |
# - [macos-14, macosx_arm64] | |
# - [windows-2019, win_amd64] | |
python: ["cp310"] # , "cp311", "cp312" | |
steps: | |
- name: Check out diffpy.pdffit2 | |
uses: actions/checkout@v4 | |
# - name: Setup macOS | |
# if: runner.os == 'macOS' | |
# - name: Setup Windows | |
# if: runner.os == 'windows' | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: 3.12 | |
- name: Install cibuildwheel | |
run: python -m pip install cibuildwheel==2.20.0 | |
- name: Build wheels | |
env: | |
CIBW_BUILD: ${{ matrix.python }}-${{ matrix.buildplat[1] }} | |
CIBW_BEFORE_ALL: >- | |
yum install -y wget tar gzip && | |
wget https://ftp.gnu.org/gnu/gsl/gsl-2.7.tar.gz && | |
tar -xzf gsl-2.7.tar.gz && | |
cd gsl-2.7 && | |
./configure --prefix=/usr/local && | |
make -j4 && | |
make install && | |
cd .. && | |
rm -rf gsl-2.7 gsl-2.7.tar.gz | |
CIBW_ENVIRONMENT: >- | |
CFLAGS="-I/usr/local/include" | |
CXXFLAGS="-I/usr/local/include" | |
LDFLAGS="-L/usr/local/lib" | |
LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH" | |
CIBW_REPAIR_WHEEL_COMMAND: >- | |
auditwheel repair -w {dest_dir} {wheel} | |
CIBW_BUILD_VERBOSITY: 1 | |
run: python -m cibuildwheel --output-dir wheelhouse | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.python }}-${{ matrix.buildplat[1] }} | |
path: ./wheelhouse/*.whl |