strategy:
matrix:
config:
- - { name: "Windows MingW", os: windows, cc: "gcc", cxx: "g++", generator: "MinGW Makefiles", cmake_extra_options: '-Denable_lto=OFF -DCMAKE_PREFIX_PATH="C:/Program Files/Eigen3/"' }
- { name: "Ubuntu gcc", os: ubuntu, cc: "gcc", cxx: "g++", generator: "Unix Makefiles", cmake_extra_options: "-DLTO_EXTRA_FLAG=auto" }
- { name: "MacOS clang", os: macos, cc: "clang", cxx: "clang++", generator: "Unix Makefiles", cmake_extra_options: "-DLTO_EXTRA_FLAG=auto" }
steps:
- name: Install boost and eigen on macos
if: matrix.config.os == 'macos'
run: brew install boost eigen
- - name: Install boost, eigen, and gcc on windows
- if: matrix.config.os == 'windows'
- run: |
- iwr -useb get.scoop.sh -outfile 'install.ps1'
- .\install.ps1 -RunAsAdmin
- scoop install gcc --global
- If ((Test-Path "C:\hostedtoolcache\windows\Boost") -eq $False){
- # Use the boost-1.72.0-win32-msvc14.1-x86_64.tar.gz for Windows 2016
- $url = "https://github.com/actions/boost-versions/releases/download/1.72.0-20200608.4/boost-1.72.0-win32-msvc14.2-x86_64.tar.gz"
- (New-Object System.Net.WebClient).DownloadFile($url, "$env:TEMP\boost.tar.gz")
- 7z.exe x "$env:TEMP\boost.tar.gz" -o"$env:TEMP\boostArchive" -y | Out-Null
- 7z.exe x "$env:TEMP\boostArchive" -o"$env:TEMP\boost" -y | Out-Null
- Push-Location -Path "$env:TEMP\boost"
- Invoke-Expression .\setup.ps1
- }
- echo "BOOST_ROOT=C:\hostedtoolcache\windows\Boost\1.72.0\x86_64" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
- echo "BOOST_INCLUDEDIR=C:\hostedtoolcache\windows\Boost\1.72.0\x86_64\boost\include" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
- echo "BOOST_LIBRARYDIR=C:\hostedtoolcache\windows\Boost\1.72.0\x86_64\lib" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
- $url = "https://gitlab.com/libeigen/eigen/-/archive/3.4.0/eigen-3.4.0.tar.gz"
- (New-Object System.Net.WebClient).DownloadFile($url, "$env:TEMP\eigen.tar.gz")
- Push-Location -Path "$env:TEMP"
- cmake -E tar zxf "$env:TEMP\eigen.tar.gz"
- mkdir "$env:TEMP\eigen-3.4.0\build"
- cd "$env:TEMP\eigen-3.4.0\build"
- cmake -G "MinGW Makefiles" -DCMAKE_INSTALL_PREFIX="C:\Program Files\Eigen3" ..
- cmake --build . --target install
- name: Build and test jar with Cmake
run: |
mkdir build
fi
mkdir content
cd content
- for j in ubuntu macos windows ; do unzip -n ../jar-$j/simgrid.jar ; done
+ for j in ubuntu macos ; do unzip -n ../jar-$j/simgrid.jar ; done
strip NATIVE/*/*/*.so
x86_64-linux-gnu-strip NATIVE/*/*/lib*dll
zip -r ../simgrid-${version}.jar *
with:
name: |
jar-ubuntu
- jar-windows
jar-macos
- name: Create the failure Message
if: ${{ failure() }}
# Please use the github action instead
# - make VERBOSE=1 -j$(nproc) dist simgrid simgrid-java_jar
# # Get the foreign architectures
-# - wget https://ci.appveyor.com/api/projects/mquinson/simgrid/artifacts/simgrid.jar -O simgrid-windows.jar
# - export SGVER=`grep SimGrid ChangeLog|head -n1|sed -e 's/SimGrid (//' -e 's/).*//'`
# - wget https://ci.inria.fr/simgrid/job/SimGrid/build_mode=Debug,node=macos/lastSuccessfulBuild/artifact/build/simgrid-${SGVER}/build/simgrid.jar -O simgrid-mac.jar
# # Open all jar files, and strip them
# - mkdir content ; cd content
-# - for j in ../simgrid.jar ../simgrid-windows.jar ../simgrid-mac.jar ; do unzip -n $j ; done
+# - for j in ../simgrid.jar ../simgrid-mac.jar ; do unzip -n $j ; done
# - strip NATIVE/*/*/*.so
# - x86_64-linux-gnu-strip NATIVE/*/*/lib*dll
# - zip -r ../simgrid-${SGVER}.jar *
include include/smpi/smpi_extended_traces_fortran.h
include include/smpi/smpi_helpers.h
include include/smpi/smpi_helpers_internal.h
-include include/smpi/smpi_main.h
include include/xbt.h
include include/xbt/Extendable.hpp
include include/xbt/PropertyHolder.hpp
include tools/cmake/Modules/pybind11Config.cmake
include tools/cmake/Option.cmake
include tools/cmake/Tests.cmake
-include tools/cmake/cross-mingw.cmake
include tools/cmake/scripts/fixup_simgrid_dtd_l.pl
include tools/cmake/scripts/my_valgrind.pl
include tools/cmake/scripts/update_tesh.pl
- The date of the release is marked in the title
- Tests
- The "make distcheck" target works (tested by jenkins)
- - All tests pass on everything on ci + AppVeyor
+ - All tests pass on everything on ci
- Tutorials and derivative projects build correctly
https://framagit.org/simgrid/simgrid-template-s4u/pipelines
https://framagit.org/simgrid/external-projects-ci/pipelines
- docs/source/conf.py
- setup.py
- Commit and push to both framagit and github
-- Wait for both appveyor and jenkins/osX to complete the build
+- Wait for jenkins/osX to complete the build
- If it's not successful, fix it and push again
- Once it's successful everywhere: merge 'master' into 'stable' and push it to framagit
- You can interrupt the build on jenkins, as it was tested just before
servers</a> as a workhorse: it runs all of our tests for many
configurations. It takes a long time to answer, and it often reports
issues but when it's green, then you know that SimGrid is very fit!
-We use <a href="https://ci.appveyor.com/project/mquinson/simgrid">AppVeyor</a>
-to build and somehow test SimGrid on windows.
@subsection inside_tests_jenkins Jenkins on the Inria CI servers
brew install cmake boost libunwind-headers libxslt git python3
@endverbatim
-@subsection inside_tests_appveyor AppVeyor
-
-Our configuration is in the file appveyor.yml as it should
-be, and the result is here: https://ci.appveyor.com/project/mquinson/simgrid
-
-We use @c Choco as a package manager on AppVeyor, and it is sufficient
-for us. In the future, we will probably move to the ubuntu subsystem
-of Windows 10: SimGrid performs very well under these settings, as
-tested on Inria's CI servers. For the time being having a native
-library is still useful for the Java users that don't want to install
-anything beyond Java on their windows.
-
@subsection inside_tests_debian Debian builders
Since SimGrid is packaged in Debian, we benefit from their huge
my %ancestor;
my %desc;
# $ancestor{"toto"} is the ancestor of the toto channel as declared by XBT_LOG_NEW_SUBCATEGORY and
-# XBT_LOG_NEW_DEFAULT_SUBCATEGORY ie, when the channel toto is initialized (does not work under windows)
+# XBT_LOG_NEW_DEFAULT_SUBCATEGORY ie, when the channel toto is initialized
# $desc{"toto"} is its description
Java (optional):
- Debian / Ubuntu: ``apt install default-jdk libgcj18-dev`` (or
any version of libgcj)
- - macOS or Windows: Grab a `full JDK <http://www.oracle.com/technetwork/java/javase/downloads>`_
+ - macOS: Grab a `full JDK <http://www.oracle.com/technetwork/java/javase/downloads>`_
For platform-specific details, please see below.
#define MPI_STATUSES_IGNORE ((MPI_Status*)NULL)
#define MPI_STATUS_SIZE 5
-#if !defined(DLL_EXPORT)
#if defined(c_plusplus) || defined(__cplusplus)
#define SMPI_PREDEFINED_POINTER(type, internal) (static_cast<type> (static_cast<void*> (&(internal))))
#else
#define SMPI_PREDEFINED_POINTER(type, internal) ((type) ((void *) &(internal)))
#endif
-#else
-#define SMPI_PREDEFINED_POINTER(type, internal) ((type) &(internal))
-#endif
extern SMPI_Datatype smpi_MPI_DATATYPE_NULL;
extern SMPI_Datatype smpi_MPI_CHAR;
+++ /dev/null
-/* Copyright (c) 2012-2023. The SimGrid Team.
- * All rights reserved. */
-
-/* This program is free software; you can redistribute it and/or modify it
- * under the terms of the license (GNU LGPL) which comes with this package. */
-
-#define main smpi_windows_main__(int argc, char **argv);\
-int main(int argc, char **argv){\
-smpi_main(&smpi_windows_main__,argc,argv);\
-return 0;\
-}\
-int smpi_windows_main__
#define _XBT_STRINGIFY_A_24_(a, ...) #a, _XBT_IF_ONE_ARG(_XBT_STRINGIFY, _XBT_STRINGIFY_A_25_, __VA_ARGS__)(__VA_ARGS__)
#define _XBT_STRINGIFY_A_25_(...) error_maximum_size_of_XBT_STRINGIFY_ARGS_reached
-/* Handle import/export stuff
- *
- * Rationale of XBT_PUBLIC:
+/* Rationale of XBT_PUBLIC:
* * This is for library symbols visible from the application-land.
* Basically, any symbols defined in the include/directory must be like this (plus some other globals).
*
- * UNIX coders should just think of it as a special way to say "extern".
- *
- * * If you build the DLL, define the DLL_EXPORT symbol so that all symbols actually get exported by this file.
- *
- * * If you link your application against the DLL or if you do a UNIX build, don't do anything special. This file
- * will do the right thing for you by default.
+ * Just think of it as a special way to say "extern".
*/
#if defined(__ELF__)
XBT_PUBLIC void _xbt_log_event_log(xbt_log_event_t ev, const char* fmt, ...) XBT_ATTRIB_PRINTF(2, 3);
XBT_PUBLIC int _xbt_log_cat_init(xbt_log_category_t category, e_xbt_log_priority_t priority);
-#ifdef DLL_EXPORT
-XBT_PUBLIC_DATA s_xbt_log_category_t _XBT_LOGV(XBT_LOG_ROOT_CAT);
-#else
-// If we `dllexport` the root log category, MinGW does not want us to take its address with the error:
-// > initializer element is not constant
-// When using auto-import, MinGW is happy.
-// We should handle this for non-root log categories as well.
extern s_xbt_log_category_t _XBT_LOGV(XBT_LOG_ROOT_CAT);
-#endif
-
extern xbt_log_appender_t xbt_log_default_appender;
extern xbt_log_layout_t xbt_log_default_layout;
raise RuntimeError(
"Please generate a MANIFEST.in file (configure simgrid, and copy it here if you build out of tree)")
- if platform.system() == "Windows":
- cmake_version = LooseVersion(
- re.search(r'version\s*([\d.]+)', out.decode()).group(1))
- if cmake_version < '3.1.0':
- raise RuntimeError("CMake >= 3.1.0 is required on Windows")
-
for ext in self.extensions:
self.build_extension(ext)
cfg = 'Debug' if self.debug else 'Release'
build_args = ['--config', cfg]
- if platform.system() == "Windows":
- cmake_args += [
- '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_{}={}'.format(cfg.upper(), extdir)]
- if sys.maxsize > 2**32:
- cmake_args += ['-A', 'x64']
- build_args += ['--', '/m']
- else:
- cmake_args += ['-DCMAKE_BUILD_TYPE=' + cfg]
- build_args += ['--', '-j4']
+ cmake_args += ['-DCMAKE_BUILD_TYPE=' + cfg]
+ build_args += ['--', '-j4']
env = os.environ.copy()
env['CXXFLAGS'] = '{} -DVERSION_INFO=\\"{}\\"'.format(env.get('CXXFLAGS', ''),
"License :: OSI Approved :: GNU Lesser General Public License v2 (LGPLv2)",
"Operating System :: POSIX",
"Operating System :: MacOS",
- "Operating System :: Microsoft :: Windows",
"Programming Language :: Python :: 3",
"Programming Language :: C++",
"Programming Language :: C",
* down here because we want the user's section 1 to have been scanned first.
* The user has a chance to override it with an option.
*/
-#if defined(_WIN32)
-# ifndef __STRICT_ANSI__
-# include <io.h>
-# include <process.h>
-# endif
-#else
-# include <unistd.h>
-#endif
+#include <unistd.h>
#endif
#ifndef YY_EXTRA_TYPE
* down here because we want the user's section 1 to have been scanned first.
* The user has a chance to override it with an option.
*/
-#if defined(_WIN32)
-# ifndef __STRICT_ANSI__
-# include <io.h>
-# include <process.h>
-# endif
-#else
-# include <unistd.h>
-#endif
+#include <unistd.h>
#endif
#ifndef YY_EXTRA_TYPE
" -> %%L: line number where the log event was raised (LOG4J compatible)\n"
" -> %%M: function name (LOG4J compatible -- called method name here of course).\n"
"\n"
- " -> %%b: full backtrace (Called %%throwable in LOG4J). Defined only under windows or when using the "
- "GNU libc because\n"
- " backtrace() is not defined elsewhere, and we only have a fallback for windows boxes, not "
- "mac ones for example.\n"
+ " -> %%b: full backtrace (Called %%throwable in LOG4J). Defined only when using the GNU libc because\n"
+ " backtrace() is not defined elsewhere.\n"
" -> %%B: short backtrace (only the first line of the %%b). Called %%throwable{short} in LOG4J; "
"defined where %%b is.\n"
"\n"
//#define HAVE_FORTRAN_BINDING 0
/* Define to 1 if you have the `getrusage' function. */
-#ifndef WIN32
#define HAVE_GETRUSAGE 1
-#endif
+
/* Define if struct hostent contains h_addr_list */
#define HAVE_H_ADDR_LIST 1
#define HAVE_STRING_H 1
/* Define to 1 if you have the <sys/resource.h> header file. */
-#ifndef WIN32
#define HAVE_SYS_RESOURCE_H 1
-#endif
+
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
SET(BUILDNAME "APPLE" CACHE INTERNAL "Buildname" FORCE)
else()
SET(BUILDNAME "UNIX" CACHE INTERNAL "Buildname" FORCE)
- if(WIN32)
- SET(BUILDNAME "WINDOWS" CACHE INTERNAL "Buildname" FORCE)
- endif()
endif()
if(NOT enable_memcheck)
include/smpi/mpi.h
include/smpi/sampi.h
include/smpi/smpi.h
- include/smpi/smpi_main.h
include/smpi/smpi_helpers.h
include/smpi/smpi_helpers_internal.h
include/smpi/smpi_extended_traces.h
tools/cmake/Modules/pybind11Config.cmake
tools/cmake/Option.cmake
tools/cmake/Tests.cmake
- tools/cmake/cross-mingw.cmake
tools/cmake/scripts/fixup_simgrid_dtd_l.pl
tools/cmake/scripts/my_valgrind.pl
tools/cmake/scripts/update_tesh.pl
###
-### Generate all parts of the documentation on non-Windows systems
+### Generate all parts of the documentation
###
### - Javadoc (reference)
### - manpages (reference of tools)
-###
-### This file is not loaded on windows
#### Generate the html documentation
find_path(FIG2DEV_PATH NAMES fig2dev PATHS NO_DEFAULT_PATHS)
set(string3 "'s/XBT_PUBLIC void STag_surfxml_include/XBT_ATTRIB_NORETURN &/'") # remove with v5 of the dtd
set(string4 "'s/XBT_PUBLIC void STag_surfxml_\\(mount\\|storage\\)/XBT_ATTRIB_NORETURN &/'") # remove with v5 of the dtd
set(string5 "'s/SET(DOCTYPE)/SET(ROOT_dax__adag)/'")
- set(string9 "'s/#include <unistd.h>/#if defined(_WIN32)\\n# ifndef __STRICT_ANSI__\\n# include <io.h>\\n# include <process.h>\\n# endif\\n#else\\n# include <unistd.h>\\n#endif/g'")
set(string14 "'\\!^ \\* Generated [0-9/]\\{10\\} [0-9:]\\{8\\}\\.$$!d'")
ADD_CUSTOM_COMMAND(
#surf/xml/simgrid_dtd.c: surf/xml/simgrid_dtd.l
COMMAND ${CMAKE_COMMAND} -E remove -f ${CMAKE_HOME_DIRECTORY}/src/surf/xml/simgrid_dtd.c
COMMAND ${FLEX_EXE} -o src/surf/xml/simgrid_dtd.c -Psurf_parse_ --noline src/surf/xml/simgrid_dtd.l
- COMMAND ${SED_EXE} -i ${string9} src/surf/xml/simgrid_dtd.c
COMMAND ${CMAKE_COMMAND} -E echo " Generated surf/xml/simgrid_dtd.c"
#dag/dax_dtd.c: dag/dax_dtd.l
COMMAND ${CMAKE_COMMAND} -E remove -f ${CMAKE_HOME_DIRECTORY}/src/dag/dax_dtd.c
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_HOME_DIRECTORY}/src/dag
COMMAND ${FLEX_EXE} -o src/dag/dax_dtd.c -Pdax_ --noline src/dag/dax_dtd.l
- COMMAND ${SED_EXE} -i ${string9} src/dag/dax_dtd.c
COMMAND ${CMAKE_COMMAND} -E echo " Generated src/dag/dax_dtd.c"
WORKING_DIRECTORY ${CMAKE_HOME_DIRECTORY}
$ENV{SIMGRID_LIBDW_LIBRARY_PATH}
$ENV{LD_LIBRARY_PATH}
$ENV{LIBDW_LIBRARY_PATH}
- PATH_SUFFIXES include/ GnuWin32/include
+ PATH_SUFFIXES include/
PATHS
/opt
/opt/local
$ENV{SIMGRID_LIBDW_LIBRARY_PATH}
$ENV{LD_LIBRARY_PATH}
$ENV{LIBDW_LIBRARY_PATH}
- PATH_SUFFIXES lib/ GnuWin32/lib
+ PATH_SUFFIXES lib/
PATHS
/opt
/opt/local
$ENV{SIMGRID_LIBELF_LIBRARY_PATH}
$ENV{LD_LIBRARY_PATH}
$ENV{LIBELF_LIBRARY_PATH}
- PATH_SUFFIXES include/ GnuWin32/include
+ PATH_SUFFIXES include/
PATHS
/opt
/opt/local
$ENV{SIMGRID_LIBELF_LIBRARY_PATH}
$ENV{LD_LIBRARY_PATH}
$ENV{LIBELF_LIBRARY_PATH}
- PATH_SUFFIXES lib/ GnuWin32/lib
+ PATH_SUFFIXES lib/
PATHS
/opt
/opt/local
HINTS
$ENV{LIBUNWIND_HINT}
$ENV{LD_LIBRARY_PATH}
- PATH_SUFFIXES include/ GnuWin32/include
+ PATH_SUFFIXES include/
PATHS /opt /opt/local /opt/csw /sw /usr)
if(PATH_LIBUNWIND_H)
string(REGEX REPLACE "/libunwind.h" "" PATH_LIBUNWIND_H "${PATH_LIBUNWIND_H}")
HINTS
$ENV{LIBUNWIND_HINT}
$ENV{LD_LIBRARY_PATH}
- PATH_SUFFIXES lib/ GnuWin32/lib lib/system
+ PATH_SUFFIXES lib/ lib/system
PATHS /opt /opt/local /opt/csw /sw /usr /usr/lib/)
if(PATH_LIBUNWIND_LIB_${component})
# message(" ${component} ${PATH_LIBUNWIND_LIB_${component}}")
+++ /dev/null
-# cmake -DCMAKE_TOOLCHAIN_FILE=tools/cmake/cross-mingw.cmake ..
-
-set (CMAKE_SYSTEM_NAME Windows)
-set (CMAKE_SYSTEM_PROCESSOR x86_64)
-
-set (CMAKE_C_COMPILER /usr/bin/x86_64-w64-mingw32-gcc-win32)
-set (CMAKE_CXX_COMPILER /usr/bin/x86_64-w64-mingw32-g++-win32)
-set (CMAKE_Fortran_COMPILER /usr/bin/x86_64-w64-mingw32-gfortran-win32)
-
-set (CMAKE_FIND_ROOT_PATH /usr/lib/gcc/x86_64-w64-mingw32/ /usr/i686-w64-mingw32/)
-
-set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
-set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
-set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
rm consoleText
done
-
-#Appveyor - get ID of the last job with the API
-BUILD_ID=$(curl -s "https://ci.appveyor.com/api/projects/mquinson/simgrid" | grep -o '\[{"jobId":"[a-zA-Z0-9]*",' | sed "s/\[{\"jobId\":\"//" | sed "s/\",//")
-wget --quiet https://ci.appveyor.com/api/buildjobs/"$BUILD_ID"/log -O ./consoleText >/dev/null 2>&1
-sed -i -e "s/\r//g" ./consoleText
-node="<a href=\"https://ci.appveyor.com/project/mquinson/simgrid\">appveyor</a>"
-os="Windows Server 2012 - VS2015 + mingw64 5.3.0"
-boost=$(get_boost)
-compiler=$(get_compiler)
-java=$(get_java)
-cmake=$(get_cmake)
-eigen3=$(get_eigen3)
-ns3=$(get_ns3)
-py=$(get_python)
-success=$(grep -m 1 "Build success" ./consoleText)
-ball="${icons[failure]}"
-if [ -n "$success" ]; then
- ball="${icons[success]}"
-fi
-cat <<EOF
- <tr>
- <td class="matrix-leftcolumn">$node</td>
- <td class="matrix-cell" style="text-align:left">$os</td>
- <td class="matrix-cell" style="text-align:center"><${ball}></td>
- <td class="matrix-cell" style="text-align:center"><${icons[disabled]}></td>
- <td class="matrix-cell" style="text-align:left">$compiler</td>
- <td class="matrix-cell" style="text-align:left">$boost</td>
- <td class="matrix-cell" style="text-align:left">$java</td>
- <td class="matrix-cell" style="text-align:left">$cmake</td>
- <td class="matrix-cell" style="text-align:center">$eigen3</td>
- <td class="matrix-cell" style="text-align:left">$ns3</td>
- <td class="matrix-cell" style="text-align:left">$py</td>
- </tr>
-EOF
-rm consoleText
-
echo "</table>"
#
#
-def is_windows():
- """ Check if running on Windows """
- return sys.platform.startswith('win')
-
# Singleton metaclass that works in Python 2 & 3
# http://stackoverflow.com/questions/6760685/creating-a-singleton-in-python
def kill_process_group(pid):
""" This function send TERM signal + KILL signal after 0.2s to the group of the specified process """
if pid is None:
- # Nobody to kill. We don't know who to kill on windows, or we don't have anyone to kill on signal handler
+ # Nobody to kill. We don't have anyone to kill on signal handler
return
try:
local_pid = None
try:
- preexec_function = None
- if not is_windows():
- preexec_function = lambda: os.setpgid(0, 0)
+ preexec_function = lambda: os.setpgid(0, 0)
proc = subprocess.Popen( # pylint: disable=subprocess-popen-preexec-fn
args,
bufsize=1,
stderr=subprocess.STDOUT,
universal_newlines=True,
preexec_fn=preexec_function)
- if not is_windows():
- local_pid = proc.pid
- TeshState().running_pids.append(local_pid)
+ local_pid = proc.pid
+ TeshState().running_pids.append(local_pid)
except PermissionError:
logs.append("[{file}:{number}] Cannot start '{cmd}': The binary is not executable.".format(
file=FileReader().filename, number=self.linenumber, cmd=args[0]))