Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
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
31 changes: 14 additions & 17 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: build
on:
release:
types: [published]
release: {types: [published]}
push:
branches: [master]
tags: ['**']
Expand All @@ -13,8 +12,8 @@ jobs:
runs-on: [self-hosted, python, cuda]
strategy:
matrix:
python-version: [3.11]
numpy-version: [1.25]
python-version: [3.12]
numpy-version: [1.26]
steps:
- uses: actions/checkout@v4
with: {fetch-depth: 0, submodules: recursive}
Expand All @@ -35,11 +34,11 @@ jobs:
which cmake || conda install -yq cmake
cmake -S . -B ./build_proj -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_MATLAB_WRAPPER=OFF -DBUILD_PYTHON_WRAPPER=ON -DBUILD_CUDA=ON -DCMAKE_INSTALL_PREFIX=./install
cmake --build ./build_proj --target install
pip install ./src/Python
pip install ./src/Python numpy==${{ numpy-version }}
- name: test
run: |
conda activate "${{ steps.reqs.outputs.envname }}"
PYTHONPATH=./src/Python python -m unittest discover ./test
PYTHONPATH=./src/Python python -m unittest discover -v -s ./test
- if: always()
name: Post Run conda-incubator/setup-miniconda@v3
shell: bash
Expand All @@ -52,12 +51,12 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.10', 3.11]
numpy-version: [1.23, 1.26]
python-version: ['3.10', 3.12]
numpy-version: [2.*]
os: [ubuntu-latest, windows-latest]
include:
- python-version: 3.12 # needs numpy>=1.26
numpy-version: 1.26
- python-version: '3.10'
numpy-version: 1.23
os: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -69,16 +68,15 @@ jobs:
run: |
cmake -S . -B ./build_proj -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_MATLAB_WRAPPER=OFF -DBUILD_PYTHON_WRAPPER=ON -DBUILD_CUDA=OFF -DCMAKE_INSTALL_PREFIX=./install
cmake --build ./build_proj --target install
pip install ./src/Python
pip install ./src/Python numpy==${{ numpy-version }}
- name: test
run: PYTHONPATH=./src/Python python -m unittest discover ./test
run: PYTHONPATH=./src/Python python -m unittest discover -v -s ./test
conda:
defaults: {run: {shell: 'bash -el {0}'}}
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.11] # penultimate supported
numpy-version: [1.25]
python-version: ['3.10', 3.11, 3.12, 3.13] # penultimate supported
steps:
- uses: actions/checkout@v4
with: {fetch-depth: 0, submodules: recursive}
Expand All @@ -88,15 +86,14 @@ jobs:
mamba-version: "*"
channels: conda-forge
- name: conda build & test
working-directory: recipe
run: |
conda install boa
conda mambabuild . -c conda-forge -c ccpi --python=${{ matrix.python-version }} --numpy=${{ matrix.numpy-version }} --output-folder .
conda mambabuild . -c conda-forge -c ccpi --python=${{ matrix.python-version }} --output-folder dist
- name: Upload artifact of the conda package
uses: actions/upload-artifact@v4
with:
name: ccpi-regulariser-package
path: recipe/linux-64/ccpi-regulariser*
path: dist/linux-64/ccpi-regulariser*
pass:
needs: [test-cuda, test, conda]
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/build_proj/
/install/
/dist/
__pycache__/
/src/Python/build/
/src/Python/*.egg*/
Expand Down
154 changes: 0 additions & 154 deletions build/FindAnacondaEnvironment.cmake

This file was deleted.

4 changes: 0 additions & 4 deletions build/build-install.sh

This file was deleted.

2 changes: 0 additions & 2 deletions build/jenkins-build.sh

This file was deleted.

28 changes: 0 additions & 28 deletions build/run.sh

This file was deleted.

8 changes: 4 additions & 4 deletions recipe/bld.bat
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
mkdir "%SRC_DIR%\test"
ROBOCOPY /E "%RECIPE_DIR%\..\test" "%SRC_DIR%\test"
if exist "%RECIPE_DIR%\..\build_proj" (
rd /s /q "%RECIPE_DIR%\..\build_proj"
if exist "%SRC_DIR%\build_proj" (
rd /s /q "%SRC_DIR%\build_proj"
)

:: -G "Visual Studio 16 2019" specifies the the generator
:: -T v142 specifies the toolset
:: -DCUDA_TOOLKIT_ROOT_DIR="C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.8" to the cmake command to specify the CUDA toolkit version

cmake -S "%SRC_DIR%" -B "%RECIPE_DIR%\..\build_proj" -G "Visual Studio 16 2019" -T "v142" -DCUDA_TOOLKIT_ROOT_DIR="C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.8" -DBUILD_PYTHON_WRAPPERS=ON -DCONDA_BUILD=ON -DBUILD_CUDA=ON -DCMAKE_BUILD_TYPE="RelWithDebInfo" -DLIBRARY_INC="%CONDA_PREFIX%" -DCMAKE_INSTALL_PREFIX="%RECIPE_DIR%\..\install"
cmake --build "%RECIPE_DIR%\..\build_proj" --target install --config RelWithDebInfo
cmake -S "%SRC_DIR%" -B "%SRC_DIR%\build_proj" -G "Visual Studio 16 2019" -T "v142" -DCUDA_TOOLKIT_ROOT_DIR="C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.8" -DBUILD_PYTHON_WRAPPERS=ON -DCONDA_BUILD=ON -DBUILD_CUDA=%BUILD_CUDA% -DCMAKE_BUILD_TYPE="RelWithDebInfo" -DLIBRARY_INC="%CONDA_PREFIX%" -DCMAKE_INSTALL_PREFIX="%SRC_DIR%\install"
cmake --build "%SRC_DIR%\build_proj" --target install --config RelWithDebInfo
%PYTHON% -m pip install "%SRC_DIR%\src\Python"

if errorlevel 1 exit 1
7 changes: 5 additions & 2 deletions recipe/build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
set -xe
cp -rv "$RECIPE_DIR/../test" "$SRC_DIR/"
if test -d "$SRC_DIR/build_proj"; then
rm -rf "$SRC_DIR/build_proj"
fi

cmake -S "$SRC_DIR" -B "$RECIPE_DIR/../build_proj" -DBUILD_PYTHON_WRAPPER=ON -DCONDA_BUILD=ON -DBUILD_CUDA=ON -DCMAKE_BUILD_TYPE="RelWithDebInfo" -DLIBRARY_INC=$CONDA_PREFIX -DCMAKE_INSTALL_PREFIX="$RECIPE_DIR/../install"
cmake --build "$RECIPE_DIR/../build_proj" --target install
cmake -S "$SRC_DIR" -B "$SRC_DIR/build_proj" -DBUILD_PYTHON_WRAPPER=ON -DCONDA_BUILD=ON -DBUILD_CUDA=${BUILD_CUDA:-OFF} -DCMAKE_BUILD_TYPE="RelWithDebInfo" -DLIBRARY_INC="$CONDA_PREFIX" -DCMAKE_INSTALL_PREFIX="$SRC_DIR/install"
cmake --build "$SRC_DIR/build_proj" --target install
$PYTHON -m pip install "$SRC_DIR/src/Python"
23 changes: 3 additions & 20 deletions recipe/conda_build_config.yaml
Original file line number Diff line number Diff line change
@@ -1,24 +1,7 @@
#creates pairs of versions using zip_keys, lists must be the same length
python:
- 3.10
- 3.10
- 3.10
- 3.10
- 3.11
- 3.11
- 3.11
- 3.11
- 3.12
numpy:
- 1.23
- 1.24
- 1.25
- 1.26
- 1.23
- 1.24
- 1.25
- 1.26
- 1.26
zip_keys:
- python
- numpy
- 3.13
cuda_compiler_version:
- 11.8
Loading