[Trying] try build wheel using github actions #18
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 Linux | |
if: runner.os == 'Linux' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libgsl-dev | |
echo "CFLAGS=-I/usr/include" >> $GITHUB_ENV | |
echo "CXXFLAGS=-I/usr/include" >> $GITHUB_ENV | |
echo "LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH" >> $GITHUB_ENV | |
# - 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_ENVIRONMENT: >- | |
CFLAGS="-I/usr/include" | |
CXXFLAGS="-I/usr/include" | |
LD_LIBRARY_PATH="/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH" | |
run: python -m cibuildwheel --output-dir wheelhouse | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.python }}-${{ matrix.buildplat[1] }} | |
path: ./wheelhouse/*.whl |