-
Notifications
You must be signed in to change notification settings - Fork 249
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI: Change build using external igraph
- Loading branch information
Showing
6 changed files
with
134 additions
and
12 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,7 +32,7 @@ jobs: | |
- name: Build wheels (manylinux) | ||
uses: pypa/[email protected] | ||
env: | ||
CIBW_BEFORE_BUILD: "yum install -y flex bison libxml2-devel zlib-devel cairo-devel && pip install -U cmake pip setuptools wheel && python setup.py build_c_core" | ||
CIBW_BEFORE_BUILD: "yum install -y flex bison libxml2-devel zlib-devel cairo-devel && pip install -U cmake pip setuptools wheel && scripts/build_igraph.sh" | ||
CIBW_BUILD: "*-manylinux_${{ matrix.wheel_arch }}" | ||
# Skip tests for Python 3.10 onwards because SciPy does not have | ||
# 32-bit wheels for Linux | ||
|
@@ -41,7 +41,7 @@ jobs: | |
- name: Build wheels (musllinux) | ||
uses: pypa/[email protected] | ||
env: | ||
CIBW_BEFORE_BUILD: "apk add flex bison libxml2-dev zlib-dev cairo-dev && pip install -U cmake pip setuptools wheel && python setup.py build_c_core" | ||
CIBW_BEFORE_BUILD: "apk add flex bison libxml2-dev zlib-dev cairo-dev && pip install -U cmake pip setuptools wheel && scripts/build_igraph.sh" | ||
CIBW_BUILD: "*-musllinux_${{ matrix.wheel_arch }}" | ||
CIBW_TEST_COMMAND: "cd {project} && pip install --prefer-binary '.[test-musl]' && python -m pytest -v tests" | ||
|
||
|
@@ -66,7 +66,7 @@ jobs: | |
- name: Build wheels (manylinux) | ||
uses: pypa/[email protected] | ||
env: | ||
CIBW_BEFORE_BUILD: "yum install -y flex bison libxml2-devel zlib-devel cairo-devel && pip install -U cmake pip setuptools wheel && python setup.py build_c_core" | ||
CIBW_BEFORE_BUILD: "yum install -y flex bison libxml2-devel zlib-devel cairo-devel && pip install -U cmake pip setuptools wheel && scripts/build_igraph.sh" | ||
CIBW_ARCHS_LINUX: aarch64 | ||
CIBW_BUILD: "*-manylinux_aarch64" | ||
|
||
|
@@ -91,7 +91,7 @@ jobs: | |
- name: Build wheels (musllinux) | ||
uses: pypa/[email protected] | ||
env: | ||
CIBW_BEFORE_BUILD: "apk add flex bison libxml2-dev zlib-dev cairo-dev && pip install -U cmake pip setuptools wheel && python setup.py build_c_core" | ||
CIBW_BEFORE_BUILD: "apk add flex bison libxml2-dev zlib-dev cairo-dev && pip install -U cmake pip setuptools wheel && scripts/build_igraph.sh" | ||
CIBW_ARCHS_LINUX: aarch64 | ||
CIBW_BUILD: "*-musllinux_aarch64" | ||
CIBW_TEST_COMMAND: "cd {project} && pip install --prefer-binary '.[test-musl]' && python -m pytest -v tests" | ||
|
@@ -159,7 +159,7 @@ jobs: | |
uses: pypa/[email protected] | ||
env: | ||
CIBW_ARCHS_MACOS: "${{ matrix.wheel_arch }}" | ||
CIBW_BEFORE_BUILD: "pip install -U setuptools && python setup.py build_c_core" | ||
CIBW_BEFORE_BUILD: "pip install -U setuptools && scripts/build_igraph.sh" | ||
CIBW_ENVIRONMENT: "LDFLAGS=-L$HOME/local/lib" | ||
IGRAPH_CMAKE_EXTRA_ARGS: -DCMAKE_OSX_ARCHITECTURES=${{ matrix.cmake_arch }} ${{ matrix.cmake_extra_args }} -DCMAKE_PREFIX_PATH=$HOME/local | ||
|
||
|
@@ -258,7 +258,7 @@ jobs: | |
- name: Build wheels | ||
uses: pypa/[email protected] | ||
env: | ||
CIBW_BEFORE_BUILD: "pip install -U setuptools && python setup.py build_c_core" | ||
CIBW_BEFORE_BUILD: "pip install -U setuptools && scripts/build_igraph.bat" | ||
CIBW_BUILD: "*-${{ matrix.wheel_arch }}" | ||
CIBW_TEST_COMMAND: "cd /d {project} && pip install --prefer-binary \".[test]\" && python -m pytest tests" | ||
# Skip tests for Python 3.10 onwards because SciPy does not have | ||
|
@@ -303,7 +303,7 @@ jobs: | |
|
||
- name: Build sdist | ||
run: | | ||
python setup.py build_c_core | ||
scripts/build_igraph.sh | ||
python setup.py sdist | ||
python setup.py install | ||
|
@@ -356,7 +356,7 @@ jobs: | |
env: | ||
IGRAPH_USE_SANITIZERS: 1 | ||
run: | | ||
python setup.py build_c_core | ||
scripts/build_igraph.sh | ||
- name: Build and install Python extension | ||
env: | ||
|
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
@echo off | ||
|
||
set IGRAPH_VERSION=0.10.13 | ||
|
||
set ROOT_DIR=%cd% | ||
echo Using root dir %ROOT_DIR% | ||
|
||
if not exist "%ROOT_DIR%\build-deps\src\" ( | ||
md %ROOT_DIR%\build-deps\src | ||
) | ||
|
||
cd "%ROOT_DIR%\build-deps\src" | ||
if not exist "igraph\" ( | ||
echo. | ||
echo Cloning igraph into %ROOT_DIR%\build-deps\src\igraph | ||
REM Clone repository if it does not exist yet | ||
git clone --depth 1 --branch %IGRAPH_VERSION% https://github.com/igraph/igraph.git | ||
) | ||
|
||
REM Make sure the git repository points to the correct version | ||
echo. | ||
echo Checking out %IGRAPH_VERSION} in ${ROOT_DIR%\build-deps\src\igraph | ||
cd "%ROOT_DIR%\build-deps\src\igraph" | ||
git fetch origin tag %IGRAPH_VERSION% --no-tags | ||
git checkout %IGRAPH_VERSION% | ||
|
||
REM Make build directory | ||
if not exist "%ROOT_DIR%\build-deps\build\igraph\" ( | ||
echo. | ||
echo Make directory %ROOT_DIR%\build-deps\build\igraph | ||
md %ROOT_DIR%\build-deps\build\igraph | ||
) | ||
|
||
REM Configure, build and install | ||
cd "%ROOT_DIR%\build-deps\build\igraph" | ||
|
||
echo. | ||
echo Configure igraph build | ||
cmake %ROOT_DIR%\build-deps\src\igraph ^ | ||
-DCMAKE_INSTALL_PREFIX=%ROOT_DIR%\build-deps\install\ ^ | ||
-DBUILD_SHARED_LIBS=ON ^ | ||
-DIGRAPH_GLPK_SUPPORT=ON ^ | ||
-DIGRAPH_GRAPHML_SUPPORT=ON ^ | ||
-DIGRAPH_OPENMP_SUPPORT=ON ^ | ||
-DIGRAPH_USE_INTERNAL_BLAS=ON ^ | ||
-DIGRAPH_USE_INTERNAL_LAPACK=ON ^ | ||
-DIGRAPH_USE_INTERNAL_ARPACK=ON ^ | ||
-DIGRAPH_USE_INTERNAL_GLPK=ON ^ | ||
-DIGRAPH_USE_INTERNAL_GMP=ON ^ | ||
-DIGRAPH_WARNINGS_AS_ERRORS=OFF ^ | ||
-DCMAKE_BUILD_TYPE=Release ^ | ||
-DBUILD_TESTING=OFF ^ | ||
%EXTRA_CMAKE_ARGS% | ||
|
||
echo. | ||
echo Build igraph | ||
cmake --build . --config Release | ||
|
||
echo. | ||
echo Install igraph to %ROOT_DIR%\build-deps\install\ | ||
cmake --build . --target install --config Release | ||
|
||
cd "%ROOT_DIR%" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
IGRAPH_VERSION=0.10.13 | ||
|
||
ROOT_DIR=`pwd` | ||
echo "Using root dir ${ROOT_DIR}" | ||
|
||
# Create source directory | ||
if [ ! -d "${ROOT_DIR}/build-deps/src" ]; then | ||
echo "" | ||
echo "Make directory ${ROOT_DIR}/build-deps/src" | ||
mkdir -p ${ROOT_DIR}/build-deps/src | ||
fi | ||
|
||
cd ${ROOT_DIR}/build-deps/src | ||
if [ ! -d "igraph" ]; then | ||
echo "" | ||
echo "Cloning igraph into ${ROOT_DIR}/build-deps/src/igraph" | ||
# Clone repository if it does not exist yet | ||
git clone --branch ${IGRAPH_VERSION} https://github.com/igraph/igraph.git --single-branch | ||
fi | ||
|
||
# Make sure the git repository points to the correct version | ||
echo "" | ||
echo "Checking out ${IGRAPH_VERSION} in ${ROOT_DIR}/build-deps/src/igraph" | ||
cd ${ROOT_DIR}/build-deps/src/igraph | ||
git fetch origin tag ${IGRAPH_VERSION} --no-tags | ||
git checkout ${IGRAPH_VERSION} | ||
|
||
# Make build directory | ||
if [ ! -d "${ROOT_DIR}/build-deps/build/igraph" ]; then | ||
echo "" | ||
echo "Make directory ${ROOT_DIR}/build-deps/build/igraph" | ||
mkdir -p ${ROOT_DIR}/build-deps/build/igraph | ||
fi | ||
|
||
# Configure, build and install | ||
cd ${ROOT_DIR}/build-deps/build/igraph | ||
|
||
echo "" | ||
echo "Configure igraph build" | ||
cmake ${ROOT_DIR}/build-deps/src/igraph \ | ||
-DCMAKE_INSTALL_PREFIX=${ROOT_DIR}/build-deps/install/ \ | ||
-DBUILD_SHARED_LIBS=ON \ | ||
-DIGRAPH_GLPK_SUPPORT=ON \ | ||
-DIGRAPH_GRAPHML_SUPPORT=ON \ | ||
-DIGRAPH_OPENMP_SUPPORT=ON \ | ||
-DIGRAPH_USE_INTERNAL_BLAS=ON \ | ||
-DIGRAPH_USE_INTERNAL_LAPACK=ON \ | ||
-DIGRAPH_USE_INTERNAL_ARPACK=ON \ | ||
-DIGRAPH_USE_INTERNAL_GLPK=ON \ | ||
-DIGRAPH_USE_INTERNAL_GMP=ON \ | ||
-DIGRAPH_WARNINGS_AS_ERRORS=OFF \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
${EXTRA_CMAKE_ARGS} | ||
|
||
echo "" | ||
echo "Build igraph" | ||
cmake --build . | ||
|
||
echo "" | ||
echo "Install igraph to ${ROOT_DIR}/build-deps/install/" | ||
cmake --build . --target install |
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
Submodule igraph
deleted from
ac22a9