Skip to content

Upgrading polyscope version 1.2.0→2.3.0 #106

Upgrading polyscope version 1.2.0→2.3.0

Upgrading polyscope version 1.2.0→2.3.0 #106

name: CI Python bindings (linux/macOS/windows)
on:
pull_request:
branches: [ master ]
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
TESTBLACKLIST: "(testLinearStructure|testIntegerConverter|testArithmeticalDSSComputerOnSurfels)"
CONFIG_GLOBAL: -DBUILD_EXAMPLES=false -DBUILD_TESTING=false -DWITH_EIGEN=true
CONFIG_PYTHON: -DDGTAL_WRAP_PYTHON=ON -DDGTAL_BUILD_TESTING_PYTHON=ON
CONFIG_LINUX:
CONFIG_MAC:
CONFIG_WINDOWS: -DWITH_OPENMP=true -DENABLE_CONAN=true -DCMAKE_C_COMPILER="cl.exe" -DCMAKE_CXX_COMPILER="cl.exe"
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
python-version: ["3.9"]
BUILD_TYPE: [Release]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Installing dependencies (Linux)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install zsh libqglviewer-dev-qt5 libboost-dev libcgal-dev ninja-build libhdf5-serial-dev libboost-dev libcairo2-dev libgmp-dev libfftw3-dev libinsighttoolkit4-dev xorg-dev libglu1-mesa-dev freeglut3-dev mesa-common-dev
- name: Installing dependencies (macOS)
if: matrix.os == 'macOS-latest'
run: brew install boost ninja gmp libomp ccache cgal
- name: Install dependencies (conan - Windows 1/2)
if: matrix.os == 'windows-latest'
id: conan
uses: turtlebrowser/get-conan@main
with:
version: 2.4.0
- name: Install dependencies (conan - Windows 2/2)
if: matrix.os == 'windows-latest'
run: |
conan profile detect --force
- uses: actions/cache@v3
if: matrix.os == 'windows-latest'
with:
path: ~/.conan2
key: ${{ runner.os }}-conan2-${{ matrix.BUILD_TYPE }}
- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build
- name: Configure CMake (Linux)
if: matrix.os == 'ubuntu-latest'
shell: bash
working-directory: ${{runner.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} $CONFIG_PYTHON $CONFIG_GLOBAL $CONFIG_LINUX -G Ninja
- name: Configure CMake (macOS)
if: matrix.os == 'macOS-latest'
shell: bash
working-directory: ${{runner.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} $CONFIG_PYTHON $CONFIG_GLOBAL $CONFIG_MAC -G Ninja
- name: Configure CMake (Windows)
if: matrix.os == 'windows-latest'
shell: bash
working-directory: ${{runner.workspace}}/build
run: |
conan install $GITHUB_WORKSPACE --build=missing
cmake $GITHUB_WORKSPACE -DCMAKE_TOOLCHAIN_FILE="conan_toolchain.cmake" -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} $CONFIG_PYTHON $CONFIG_GLOBAL $CONFIG_WINDOWS
- name: Build
shell: bash
working-directory: ${{runner.workspace}}/build
# Execute the build. You can specify a specific target with "--target <NAME>"
run: cmake --build . --config ${{ matrix.BUILD_TYPE }} --parallel 8
- name: Import module Test
shell: bash
working-directory: ${{runner.workspace}}/build
run: |
python -c "import dgtal"
- name: Install python dependencies
shell: bash
run: |
python -m pip install pytest
python -m pip install numpy
python -m pip install itk
- name: Run unit tests
shell: bash
working-directory: ${{runner.workspace}}/build
run: |
ctest -R python -C ${{ matrix.BUILD_TYPE }} -V --output-on-failure