Skip to content

MACOSX_DEPLOYMENT_TARGET=13.6 #11

MACOSX_DEPLOYMENT_TARGET=13.6

MACOSX_DEPLOYMENT_TARGET=13.6 #11

Workflow file for this run

name: Wheels
# https://github.com/scikit-learn/scikit-learn/blob/main/.github/workflows/wheels.yml as template
on:
workflow_dispatch:
push:
branches: [main]
env:
GEANT4_VERSION: 11.1.3
XERCES_VERSION: 3.2.4
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
sdist:
name: Source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Build sdist
run: |
python -m pip install build
python -m build --sdist .
- uses: actions/upload-artifact@v3
with:
name: sdist
path: dist/*.tar.gz
wheel:
name:
Build wheel for cp${{ matrix.python }}-${{ matrix.platform_id }}-${{
matrix.manylinux_image }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
python: 38
platform_id: manylinux_x86_64
manylinux_image: manylinux2014
- os: ubuntu-latest
python: 39
platform_id: manylinux_x86_64
manylinux_image: manylinux2014
- os: ubuntu-latest
python: 310
platform_id: manylinux_x86_64
manylinux_image: manylinux2014
- os: ubuntu-latest
python: 311
platform_id: manylinux_x86_64
manylinux_image: manylinux2014
- os: macos-latest
python: 38
platform_id: macosx_x86_64
- os: macos-latest
python: 39
platform_id: macosx_x86_64
- os: macos-latest
python: 310
platform_id: macosx_x86_64
- os: macos-latest
python: 311
platform_id: macosx_x86_64
- os: macos-latest
python: 312
platform_id: macosx_x86_64
- os: macos-latest
python: 38
platform_id: macosx_arm64
- os: macos-latest
python: 39
platform_id: macosx_arm64
- os: macos-latest
python: 310
platform_id: macosx_arm64
- os: macos-latest
python: 311
platform_id: macosx_arm64
steps:
- uses: actions/checkout@v4
- uses: lukka/get-cmake@latest
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.11
- uses: pypa/[email protected]
env:
CIBW_TEST_REQUIRES: pytest
CIBW_TEST_COMMAND: python -m pytest {project}/tests
CIBW_ENVIRONMENT:
SKLEARN_SKIP_NETWORK_TESTS=1 SKLEARN_BUILD_PARALLEL=3
CIBW_BUILD: cp${{ matrix.python }}-${{ matrix.platform_id }}
CIBW_ARCHS: all
CIBW_MANYLINUX_X86_64_IMAGE: ${{ matrix.manylinux_image }}
CIBW_MANYLINUX_I686_IMAGE: ${{ matrix.manylinux_image }}
CIBW_BEFORE_ALL_LINUX: |
python3 -m pip install cmake ninja
git clone https://github.com/apache/xerces-c.git /tmp/xerces
git -C /tmp/xerces checkout tags/v${{ env.XERCES_VERSION }}
cmake -G Ninja -B /tmp/xerces/build -S /tmp/xerces -DCMAKE_CXX_STANDARD=20 -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -Dnetwork-accessor=socket -Dtranscoder=iconv -DCMAKE_CXX_FLAGS=-fPIC -DCMAKE_C_FLAGS=-fPIC
cmake --build /tmp/xerces/build -j$(nproc) --target install > /dev/null 2>&1
rm -rf /tmp/xerces
git clone https://github.com/Geant4/geant4.git /tmp/geant4 --branch=v${{ env.GEANT4_VERSION }} --depth=1
cmake -G Ninja -B /tmp/geant4/build -S /tmp/geant4 -DCMAKE_CXX_STANDARD=20 -DCMAKE_BUILD_TYPE=Release -DGEANT4_USE_GDML=ON -DGEANT4_INSTALL_EXAMPLES=OFF -DGEANT4_INSTALL_DATA=OFF -DGEANT4_BUILD_TLS_MODEL=global-dynamic -DCMAKE_CXX_FLAGS=-fPIC -DCMAKE_C_FLAGS=-fPIC -DGEANT4_USE_SYSTEM_EXPAT=OFF -DBUILD_STATIC_LIBS=ON -DBUILD_SHARED_LIBS=OFF
cmake --build /tmp/geant4/build -j$(nproc) --target install > /dev/null 2>&1
rm -rf /tmp/geant4
CIBW_ENVIRONMENT_MACOS: |
MACOSX_DEPLOYMENT_TARGET=13.6
CIBW_BEFORE_ALL_MACOS: |
python3 -m pip install cmake ninja
git clone https://github.com/apache/xerces-c.git /tmp/xerces
git -C /tmp/xerces checkout tags/v${{ env.XERCES_VERSION }}
cmake -G Ninja -B /tmp/xerces/build -S /tmp/xerces -DCMAKE_CXX_STANDARD=20 -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -Dnetwork-accessor=socket -Dtranscoder=iconv -DCMAKE_CXX_FLAGS=-fPIC -DCMAKE_C_FLAGS=-fPIC
cmake --build /tmp/xerces/build -j$(nproc) --target install > /dev/null 2>&1
rm -rf /tmp/xerces
git clone https://github.com/Geant4/geant4.git /tmp/geant4 --branch=v${{ env.GEANT4_VERSION }} --depth=1
cmake -G Ninja -B /tmp/geant4/build -S /tmp/geant4 -DCMAKE_CXX_STANDARD=20 -DCMAKE_BUILD_TYPE=Release -DGEANT4_USE_GDML=ON -DGEANT4_INSTALL_EXAMPLES=OFF -DGEANT4_INSTALL_DATA=OFF -DGEANT4_BUILD_TLS_MODEL=global-dynamic -DCMAKE_CXX_FLAGS=-fPIC -DCMAKE_C_FLAGS=-fPIC -DGEANT4_USE_SYSTEM_EXPAT=OFF -DBUILD_STATIC_LIBS=ON -DBUILD_SHARED_LIBS=OFF
cmake --build /tmp/geant4/build -j$(nproc) --target install > /dev/null 2>&1
rm -rf /tmp/geant4
- name: Upload Wheels
uses: actions/upload-artifact@v3
with:
path: wheelhouse/*.whl