Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/build_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ jobs:
- RelNoOpenMP
- RelWithDebInfo
steps:
- name: Set up QEMU
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v2
with:
platforms: arm64
- name: checkout
uses: actions/checkout@v4
with:
Expand Down
23 changes: 15 additions & 8 deletions .github/workflows/conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,23 @@ on:

jobs:
conda-build:
name: Build Conda Package on ${{ matrix.os }} for Python ${{ matrix.python }}
name: Build Conda Package on ${{ matrix.os }} for Python ${{ matrix.pyver }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-15-intel, macos-15]
python: [ "3.9", "3.10", "3.11", "3.12", "3.13" ]
os: [windows-latest, macos-15, macos-15-intel, ubuntu-latest]
pyver: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]

defaults:
run:
shell: bash -el {0}

steps:
- name: Set up QEMU
if: matrix.os == 'ubuntu-latest'
uses: docker/setup-qemu-action@v2
with:
platforms: arm64
- uses: actions/checkout@v4
with:
fetch-depth: 0
Expand All @@ -31,16 +38,16 @@ jobs:
python-version: 3.11
environment-file: conda-recipes/devtools.yml
show-channel-urls: true
conda-remove-defaults: 'true'
conda-remove-defaults: "true"
- name: Build conda packages
run: |
conda build --python ${{ matrix.python }} --output-folder ../conda_packages smurff
conda build --python ${{ matrix.pyver }} --output-folder ../conda_packages smurff
working-directory: conda-recipes
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: conda-${{ matrix.os }}-${{ matrix.python }}
path: conda_packages/*
name: conda-${{ matrix.os }}-${{ matrix.pyver }}
path: conda_packages/*

merge:
name: Merge all Conda artifacts
Expand All @@ -50,4 +57,4 @@ jobs:
- name: Merge Artifacts
uses: actions/upload-artifact/merge@v4
with:
name: all-conda-packages
name: all-conda-packages
28 changes: 19 additions & 9 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,38 +11,48 @@ on:

jobs:
build_wheels:
name: wheel ${{ matrix.pyver }}-${{ matrix.os }}
name: Build wheel ${{ matrix.pyver }}-${{ matrix.os }}-${{ matrix.arch }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-15-intel, macos-15]
pyver: [cp39, cp310, cp311, cp312, cp313]
pyver: [cp39, cp310, cp311, cp312, cp313, cp314]
include:
- os: windows-latest
arch: "native"
- os: macos-15
arch: "native"
- os: macos-15-intel
arch: "native"
- os: ubuntu-latest
arch: "native"
- os: ubuntu-latest
arch: "aarch64"

steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
submodules: "true"
fetch-depth: 0

# Used to host cibuildwheel
- uses: actions/setup-python@v5
with:
python-version: '3.x'
python-version: "3.x"

- name: Install cibuildwheel
run: python -m pip install cibuildwheel

- name: Build wheels
env:
CIBW_BUILD: ${{matrix.pyver}}-*
CIBW_BUILD: ${{ matrix.pyver }}-*
CIBW_ARCHS: ${{ matrix.arch }}
run: python -m cibuildwheel --output-dir wheelhouse

- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ matrix.pyver }}
name: cibw-wheels-${{ matrix.os }}-${{ matrix.pyver }}-${{ matrix.arch }}
path: ./wheelhouse/*.whl


merge:
name: merge all wheel artifacts
runs-on: ubuntu-latest
Expand All @@ -51,4 +61,4 @@ jobs:
- name: Merge Artifacts
uses: actions/upload-artifact/merge@v4
with:
name: all-wheels
name: all-wheels
28 changes: 2 additions & 26 deletions ci/docker/Dockerfile.manylinux
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,5 @@ FROM quay.io/pypa/manylinux_2_28_x86_64
RUN yum -y install wget openblas-devel hdf5-devel && \
yum clean all


#install Eigen
RUN wget -O Eigen.tar.gz https://gitlab.com/libeigen/eigen/-/archive/3.4.1/eigen-3.4.1.tar.gz && \
tar xzf Eigen.tar.gz && \
rm Eigen.tar.gz && \
cd eigen* && \
mkdir build && \
cd build && \
cmake .. && \
make -j2 && \
make install && \
cd ../.. && \
rm -r eigen*

#install HighFive
RUN wget -O HighFive.tar.gz https://github.com/BlueBrain/HighFive/archive/v2.10.1.tar.gz && \
tar xzf HighFive.tar.gz && \
rm HighFive.tar.gz && \
cd HighFive* && \
mkdir build && \
cd build && \
cmake .. -DHIGHFIVE_USE_BOOST=OFF && \
make -j2 && \
make install && \
cd ../.. && \
rm -r HighFive*
COPY install_dependencies.sh /tmp/install_dependencies.sh
RUN chmod +x /tmp/install_dependencies.sh && /tmp/install_dependencies.sh && rm /tmp/install_dependencies.sh
7 changes: 7 additions & 0 deletions ci/docker/Dockerfile.manylinux.aarch64
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM quay.io/pypa/manylinux_2_28_aarch64

RUN yum -y install wget openblas-devel hdf5-devel && \
yum clean all

COPY install_dependencies.sh /tmp/install_dependencies.sh
RUN chmod +x /tmp/install_dependencies.sh && /tmp/install_dependencies.sh && rm /tmp/install_dependencies.sh
14 changes: 2 additions & 12 deletions ci/docker/Dockerfile.musllinux
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,5 @@ FROM quay.io/pypa/musllinux_1_2_x86_64

RUN apk add wget eigen-dev openblas-dev hdf5-dev

#install HighFive
RUN wget -O HighFive.tar.gz https://github.com/BlueBrain/HighFive/archive/v2.10.1.tar.gz && \
tar xzf HighFive.tar.gz && \
rm HighFive.tar.gz && \
cd HighFive* && \
mkdir build && \
cd build && \
cmake .. -DHIGHFIVE_USE_BOOST=OFF && \
make -j2 && \
make install && \
cd ../.. && \
rm -r HighFive*
COPY install_dependencies.sh /tmp/install_dependencies.sh
RUN chmod +x /tmp/install_dependencies.sh && /tmp/install_dependencies.sh && rm /tmp/install_dependencies.sh
36 changes: 36 additions & 0 deletions ci/docker/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
.PHONY: all alpine manylinux manylinux-aarch64 musllinux ubuntu clean push push-manylinux push-manylinux-aarch64 push-musllinux

MANYLINUX_X86_64_IMAGE = vanderaa/manylinux_2_28_x86_64_smurff
MANYLINUX_AARCH64_IMAGE = vanderaa/manylinux_2_28_aarch64_smurff
MUSLLINUX_X86_64_IMAGE = vanderaa/musllinux_1_2_x86_64_smurff

all: alpine manylinux manylinux-aarch64 musllinux ubuntu

push: push-manylinux push-manylinux-aarch64 push-musllinux

alpine:
docker build -f Dockerfile.alpine -t smurff:alpine .

manylinux:
docker build -f Dockerfile.manylinux -t $(MANYLINUX_X86_64_IMAGE) .

push-manylinux:
docker push $(MANYLINUX_X86_64_IMAGE)

manylinux-aarch64:
docker build -f Dockerfile.manylinux.aarch64 -t $(MANYLINUX_AARCH64_IMAGE) .

push-manylinux-aarch64:
docker push $(MANYLINUX_AARCH64_IMAGE)

musllinux:
docker build -f Dockerfile.musllinux -t $(MUSLLINUX_X86_64_IMAGE) .

push-musllinux:
docker push $(MUSLLINUX_X86_64_IMAGE)

ubuntu:
docker build -f Dockerfile.ubuntu -t smurff:ubuntu .

clean:
docker rmi smurff:alpine $(MANYLINUX_X86_64_IMAGE) $(MANYLINUX_AARCH64_IMAGE) $(MUSLLINUX_X86_64_IMAGE) smurff:ubuntu 2>/dev/null || true
32 changes: 32 additions & 0 deletions ci/docker/install_dependencies.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash
set -e

# Install Eigen
echo "Installing Eigen..."
wget -O Eigen.tar.gz https://gitlab.com/libeigen/eigen/-/archive/3.4.1/eigen-3.4.1.tar.gz
tar xzf Eigen.tar.gz
rm Eigen.tar.gz
cd eigen*
mkdir build
cd build
cmake ..
make -j2
make install
cd ../..
rm -r eigen*

# Install HighFive
echo "Installing HighFive..."
wget -O HighFive.tar.gz https://github.com/BlueBrain/HighFive/archive/v2.10.1.tar.gz
tar xzf HighFive.tar.gz
rm HighFive.tar.gz
cd HighFive*
mkdir build
cd build
cmake .. -DHIGHFIVE_USE_BOOST=OFF
make -j2
make install
cd ../..
rm -r HighFive*

echo "Done!"
14 changes: 11 additions & 3 deletions conda-recipes/conda_build_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ python:
- 3.10
- 3.11
- 3.12
- 3.13
- 3.13 # [not aarch64]
- 3.14

blas_impl: # [linux64 or win64]
- openblas # [linux64 or win64]
blas_impl: # [linux64 or aarch64 or win64]
- openblas # [linux64 or aarch64 or win64]
- mkl # [linux64 or win64]

hdf5:
Expand All @@ -16,6 +17,13 @@ hdf5:
c_compiler: vs2022 # [win]
cxx_compiler: vs2022 # [win]

target_platform: # [linux]
- linux-64 # [linux]
- linux-aarch64 # [linux]

pin_run_as_build:
libboost: x.x
hdf5: x.x.x
python:
min_pin: x.x
max_pin: x.x
16 changes: 9 additions & 7 deletions conda-recipes/smurff/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@ requirements:
- ninja
- {{ compiler('cxx') }}
- {{ compiler('c') }}
- llvm-openmp # [osx]
- llvm-openmp # [osx]
- python # [build_platform != target_platform]
- cross-python_{{target_platform}} # [build_platform != target_platform]
host:
- llvm-openmp # [osx]
- mkl-devel <2025 # [blas_impl == 'mkl']
- openblas # [blas_impl != 'mkl']
- llvm-openmp # [osx]
- mkl-devel # [blas_impl == 'mkl']
- openblas # [blas_impl != 'mkl']
- eigen
- catch2
- libboost-devel
Expand All @@ -32,9 +34,9 @@ requirements:
- setuptools_scm
run:
- python {{ python }}
- mkl <2025 # [blas_impl == 'mkl']
- openblas # [blas_impl != 'mkl']
- libboost # [not win]
- mkl # [blas_impl == 'mkl']
- openblas # [blas_impl != 'mkl']
- libboost # [not win]
- numpy
- scipy
- pandas
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ test-command = 'pytest -n auto {project}/python/test'
test-requires = 'parameterized pytest pytest-xdist'

manylinux-x86_64-image = "vanderaa/manylinux_2_28_x86_64_smurff"
manylinux-aarch64-image = "vanderaa/manylinux_2_28_aarch64_smurff"
musllinux-x86_64-image = "vanderaa/musllinux_1_2_x86_64_smurff"

# - cibuildwheel on macos -
Expand Down
Loading