Update wheels.yml: Adding CXXFLAGS #52
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: Build wheels | |
on: [push, pull_request] | |
jobs: | |
build_wheels: | |
name: Build wheels on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
steps: | |
## Used to host cibuildwheel | |
# - uses: actions/setup-python@v5 | |
- name: Checkout self | |
uses: actions/checkout@v4 | |
- name: Checkout ughub | |
run: | | |
git clone https://github.com/UG4/ughub.git | |
- name: Install UG4 packages | |
run: | | |
python3 ughub/ughub.py init | |
python3 ughub/ughub.py install ConvectionDiffusion | |
python3 ughub/ughub.py install PybindForUG4 | |
python3 ughub/ughub.py git submodule init | |
python3 ughub/ughub.py git submodule update | |
- name: Switch to Pybind feature branch(es), if any. | |
run: python3 ughub/ughub.py git checkout feature-pybind11 | |
continue-on-error: true | |
#- name: Checkout ugcore | |
# uses: actions/checkout@v4 | |
# with: | |
# repository: UG4/ugcore | |
# path: ugcore | |
- name: Build wheels | |
uses: pypa/[email protected] | |
env: | |
CIBW_BUILD_VERBOSITY: 1 | |
CIBW_REPAIR_WHEEL_COMMAND: '' | |
CIBW_BUILD: cp310-* | |
# Skip builds for 32-bit builds and some others... | |
CIBW_SKIP: "*-win32 *-musllinux_* *linux_i686 *linux_s390x *linux_aarch64 *linux_s390x" | |
# Environment variables. | |
# https://pip.pypa.io/en/stable/topics/configuration/#environment-variables | |
# CIBW_ENVIRONMENT: PIP_GLOBAL_OPTION="build_ext -j4" | |
# Set two flags on linux only | |
CIBW_ENVIRONMENT_LINUX: CFLAGS="-fPIC -fvisibility=hidden" CXXFLAGS="-fPIC -fvisibility=hidden" | |
with: | |
package-dir: . | |
output-dir: wheelhouse | |
# config-file: "pyproject.toml" | |
config-file: "{package}/pyproject.toml" | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} | |
path: ./wheelhouse/*.whl | |