Commit 582a0f73 authored by Jonathan Lambrechts's avatar Jonathan Lambrechts
Browse files

windows and linux wheels

parent e38e6fcd
......@@ -24,8 +24,29 @@ mbtests :
script:
- mkdir build
- cd build/
- cmake .. -DENABLE_PETSC=1 -DPETSC_DIR=/usr/lib/petscdir/petsc3.9/ -DPETSC_ARCH=x86_64-linux-gnu-real
- cmake ..
- PPATH=$(pwd)
- make -j4
- cd ../validation
- PYTHONPATH=$PPATH:$PYTHONPATH python3 mbtests.py
mbbuild :
image : immc/migflow-build:v0.4
script:
- mkdir build
- cd build/
- cmake ..
- make -j4
- python3 setup.py bdist_wheel --plat-name=manylinux1_x86_64 -d ../dist
- cd ..
- mkdir build-mingw
- cd build-mingw
- cmake .. -DCMAKE_TOOLCHAIN_FILE=/cmake-mingw
- make -j4
- mv */*.dll */*.dll.a migflow
- python3 setup.py bdist_wheel --plat-name=win_amd64 -d ../dist
artifacts:
paths:
- dist
expire_in: 1 day
......@@ -40,4 +40,8 @@ add_subdirectory(tools)
add_subdirectory(scontact)
add_subdirectory(fluid)
configure_file(README.md ${PROJECT_BINARY_DIR}/README.md COPYONLY)
configure_file(LICENSE.txt ${PROJECT_BINARY_DIR}/LICENSE.txt COPYONLY)
configure_file(AUTHORS.txt ${PROJECT_BINARY_DIR}/AUTHORS.txt COPYONLY)
configure_file(COPYING.LESSER.txt ${PROJECT_BINARY_DIR}/COPYING.LESSER.txt COPYONLY)
configure_file(COPYING.txt ${PROJECT_BINARY_DIR}/COPYING.txt COPYONLY)
......@@ -27,37 +27,3 @@ The list of the contributors to the development of MigFlow is given in the AUTHO
Website of MigFlow: https://git.immc.ucl.ac.be/fluidparticles/MigFlow
Contact: Jonathan Lambrechts <jonathan.lambrechts@uclouvain.be>
This program has dependencies on other libraries and Website depedencies which are or not under GPL and that are commonly distributed with this program core libraries.
The other dependencies are as follows:
PETSC BSD 2-clause https://www.mcs.anl.gov/petsc/
-----------------------------------------------------------------------------
######
PETSC
######
Copyright (c) 1991-2014, UChicago Argonne, LLC and the PETSc Development Team
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-----------------------------------------------------------------------------
FROM ubuntu:20.04
env DEBIAN_FRONTEND=noninteractive
#linux
RUN apt update && apt install -y git python3 make cmake gcc
#windows
RUN apt update && apt install -y mingw-w64 mingw-w64-tools
run echo "\
SET(CMAKE_SYSTEM_NAME Windows)\n\
SET(CMAKE_C_COMPILER x86_64-w64-mingw32-gcc)\n\
SET(CMAKE_CXX_COMPILER x86_64-w64-mingw32-g++)\n\
SET(CMAKE_RC_COMPILER x86_64-w64-mingw32-windres)\n\
SET(CMAKE_Fortran_COMPILER x86_64-w64-mingw32-gfortran)\n\
SET(CMAKE_FIND_ROOT_PATH /mingw64)\n\
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)\n\
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)\n\
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)\n"\
> /cmake-mingw
RUN apt update && apt install -y git python3-setuptools python3-wheel
VOLUME ["/etc/gitlab-runner"]
RUN useradd -ms /bin/bash validator
USER validator
WORKDIR /home/validator
......@@ -5,6 +5,7 @@ RUN DEBIAN_FRONTEND=noninteractive apt install -y git python3 petsc-dev python3-
RUN DEBIAN_FRONTEND=noninteractive apt install -y python3-scipy
VOLUME ["/etc/gitlab-runner"]
RUN useradd -ms /bin/bash validator
......
......@@ -36,4 +36,6 @@ foreach(f ${SRC})
configure_file("${f}" "${PROJECT_BINARY_DIR}/migflow/${f}" COPYONLY)
endforeach()
configure_file(setup.py "${PROJECT_BINARY_DIR}/setup.py" @ONLY)
configure_file(migflow.sh "${PROJECT_BINARY_DIR}/migflow.sh" @ONLY)
# MigFlow - Copyright (C) <2010-2018>
# <Universite catholique de Louvain (UCL), Belgium
# Universite de Montpellier, France>
#
# List of the contributors to the development of MigFlow: see AUTHORS file.
# Description and complete License: see LICENSE file.
#
# This program (MigFlow) is free software:
# you can redistribute it and/or modify it under the terms of the GNU Lesser General
# Public License as published by the Free Software Foundation, either version
# 3 of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program (see COPYING and COPYING.LESSER files). If not,
# see <http://www.gnu.org/licenses/>.
import petsc4py
petsc4py.init()
from petsc4py import PETSc
......
# MigFlow - Copyright (C) <2010-2018>
# <Universite catholique de Louvain (UCL), Belgium
# Universite de Montpellier, France>
#
# List of the contributors to the development of MigFlow: see AUTHORS file.
# Description and complete License: see LICENSE file.
#
# This program (MigFlow) is free software:
# you can redistribute it and/or modify it under the terms of the GNU Lesser General
# Public License as published by the Free Software Foundation, either version
# 3 of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program (see COPYING and COPYING.LESSER files). If not,
# see <http://www.gnu.org/licenses/>.
import numpy as np
import scipy.sparse
import scipy.sparse.linalg
......
# MigFlow - Copyright (C) <2010-2018>
# <Universite catholique de Louvain (UCL), Belgium
# Universite de Montpellier, France>
#
# List of the contributors to the development of MigFlow: see AUTHORS file.
# Description and complete License: see LICENSE file.
#
# This program (MigFlow) is free software:
# you can redistribute it and/or modify it under the terms of the GNU Lesser General
# Public License as published by the Free Software Foundation, either version
# 3 of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program (see COPYING and COPYING.LESSER files). If not,
# see <http://www.gnu.org/licenses/>.
import setuptools
import sys
platform={
"Windows":{
"classifier":"Operating System :: Microsoft :: Windows",
"libfiles":"*.dll"
},
"Linux":{
"classifier":"Operating System :: POSIX :: Linux",
"libfiles":"*.so"
}
}["@CMAKE_SYSTEM_NAME@"]
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="migflow",
version="1.1",
author="Migflow Team",
author_email="jonathan.lambrechts@uclouvain.be",
description="Model for Immersed Granular Flows",
long_description=long_description,
long_description_content_type="text/markdown",
include_package_data=True,
url="https://www.migflow.be",
packages=["migflow"],
package_dir={"migflow":"migflow"},
package_data={"migflow":[platform["libfiles"]]},
classifiers=[
"Programming Laguage :: Python :: 3",
"Environment :: Console",
"Development Status :: 4 - Beta",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
platform["classifier"],
"Programming Language :: C",
"Programming Language :: Python",
"Topic :: Scientific/Engineering"
],
python_requires='>=3.6'
)
# MigFlow - Copyright (C) <2010-2018>
# <Universite catholique de Louvain (UCL), Belgium
# Universite de Montpellier, France>
#
# List of the contributors to the development of MigFlow: see AUTHORS file.
# Description and complete License: see LICENSE file.
#
# This program (MigFlow) is free software:
# you can redistribute it and/or modify it under the terms of the GNU Lesser General
# Public License as published by the Free Software Foundation, either version
# 3 of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program (see COPYING and COPYING.LESSER files). If not,
# see <http://www.gnu.org/licenses/>.
import numpy as np
def _advance_particles(particles, f, dt, min_nsub,contact_tol,iteration=0,after_sub_iter=None,max_split=1) :
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment