Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: moves-rwth/pycarl
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 2.0.5
Choose a base ref
...
head repository: moves-rwth/pycarl
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on Feb 12, 2022

  1. new version, doesnt work yet

    sjunges authored and volkm committed Feb 12, 2022
    Copy the full SHA
    af0031d View commit details
  2. set c++14 explicitly

    sjunges authored and volkm committed Feb 12, 2022
    Copy the full SHA
    9b3c90f View commit details
  3. remove some deprecated initializers

    sjunges authored and volkm committed Feb 12, 2022
    Copy the full SHA
    371b0b6 View commit details

Commits on Mar 15, 2022

  1. Copy the full SHA
    23bc524 View commit details
  2. Copy the full SHA
    a466263 View commit details
  3. Updated __init__ to py::init

    volkm committed Mar 15, 2022
    Copy the full SHA
    8352268 View commit details
  4. Copy the full SHA
    e216327 View commit details
  5. Copy the full SHA
    fd29199 View commit details

Commits on Jul 31, 2022

  1. Updated distros used in CI

    volkm committed Jul 31, 2022
    Copy the full SHA
    df627eb View commit details
  2. Removed Travis support

    volkm committed Jul 31, 2022
    Copy the full SHA
    3aee993 View commit details
  3. Copy the full SHA
    ae5fd31 View commit details
  4. Updated Github Actions

    volkm committed Jul 31, 2022
    Copy the full SHA
    c63d069 View commit details
  5. Pycarl version 2.1.0

    volkm committed Jul 31, 2022
    Copy the full SHA
    fcee916 View commit details

Commits on Aug 2, 2022

  1. Copy the full SHA
    45ffb1a View commit details
  2. Remove Debian 10 from CI tests as CMake version 3.13 is too low for F…

    …etchContent_MakeAvailable
    volkm committed Aug 2, 2022
    Copy the full SHA
    03fedc2 View commit details

Commits on Aug 3, 2022

  1. Copy the full SHA
    c5b6af6 View commit details
  2. Copy the full SHA
    1e155fc View commit details
  3. Added indepth tests to CI

    volkm committed Aug 3, 2022
    Copy the full SHA
    696b099 View commit details

Commits on Sep 1, 2022

  1. Copy the full SHA
    e589235 View commit details
  2. Merge from master

    volkm committed Sep 1, 2022
    Copy the full SHA
    412d4b8 View commit details
  3. Copy the full SHA
    28d0807 View commit details
  4. Copy the full SHA
    9d269cb View commit details
  5. Updated CHANGELOG

    volkm committed Sep 1, 2022
    Copy the full SHA
    90c2e36 View commit details

Commits on Sep 7, 2022

  1. Copy the full SHA
    321583e View commit details

Commits on Feb 27, 2023

  1. Copy the full SHA
    3061f97 View commit details

Commits on Mar 22, 2023

  1. Merge pull request #17 from volkm/fix_enum_str

    Added py::prepend to fix overlead order of __str__ for enums
    volkm authored Mar 22, 2023
    Copy the full SHA
    610faee View commit details

Commits on Mar 23, 2023

  1. Copy the full SHA
    6eac4ca View commit details

Commits on Apr 26, 2023

  1. Copy the full SHA
    c2507ce View commit details
  2. Copy the full SHA
    c996508 View commit details
  3. Copy the full SHA
    e6dc6cd View commit details
  4. Copy the full SHA
    763f47f View commit details
  5. Copy the full SHA
    3e01dd7 View commit details

Commits on May 1, 2023

  1. Copy the full SHA
    d6b3b0a View commit details

Commits on May 31, 2023

  1. Copy the full SHA
    1d4a75d View commit details
  2. Copy the full SHA
    cf2748a View commit details
  3. Small changes in setup.py

    volkm committed May 31, 2023
    Copy the full SHA
    8f0d64e View commit details
  4. Copy the full SHA
    f5eba85 View commit details

Commits on Jun 1, 2023

  1. Copy the full SHA
    7ebd978 View commit details

Commits on Jun 7, 2023

  1. Added Dockerfile

    volkm committed Jun 7, 2023
    Copy the full SHA
    31af303 View commit details
  2. Use Dockerfile in CI

    volkm committed Jun 7, 2023
    Copy the full SHA
    3f2622f View commit details
  3. Copy the full SHA
    0596d10 View commit details
  4. Pycarl version 2.2.0

    volkm committed Jun 7, 2023
    Copy the full SHA
    af66206 View commit details

Commits on Jul 1, 2023

  1. Copy the full SHA
    25202f6 View commit details

Commits on Aug 2, 2023

  1. Copy the full SHA
    0495f1c View commit details

Commits on Sep 20, 2023

  1. Copy the full SHA
    12d45c3 View commit details
  2. Tests for intervals

    volkm committed Sep 20, 2023
    Copy the full SHA
    1256d6a View commit details
  3. Copy the full SHA
    70eda4e View commit details

Commits on Dec 5, 2023

  1. Copy the full SHA
    d912940 View commit details
  2. Applied code formatting

    Auto Format committed Dec 5, 2023
    Copy the full SHA
    c79883e View commit details
  3. Add code formatting commit to .git-blame-ignore-revs

    Auto Format committed Dec 5, 2023
    Copy the full SHA
    f1a5e47 View commit details
Showing with 1,116 additions and 34,076 deletions.
  1. +20 −0 .dockerignore
  2. +1 −0 .git-blame-ignore-revs
  3. +11 −0 .github/dependabot.yml
  4. +81 −0 .github/workflows/Dockerfile.no_parser
  5. +87 −65 .github/workflows/buildtest.yml
  6. +38 −0 .github/workflows/formatapply.yml
  7. +15 −0 .github/workflows/formatcheck.yml
  8. +0 −138 .travis.yml
  9. +45 −1 CHANGELOG.md
  10. +62 −21 CMakeLists.txt
  11. +99 −0 Dockerfile
  12. +10 −2 README.md
  13. +9 −4 cmake/CMakeLists.txt
  14. +3 −0 cmake/cln_config.py.in
  15. +6 −0 cmake/core_config.py.in
  16. +3 −0 cmake/parser_config.py.in
  17. +15 −0 doc/build_website.md
  18. +3 −2 doc/checklist_new_release.md
  19. +31 −58 doc/source/conf.py
  20. +1 −1 doc/source/index.rst
  21. +6 −3 doc/source/installation.rst
  22. +1 −1 examples/01-getting-started.py
  23. +1 −1 lib/pycarl/__init__.py
  24. +1 −1 lib/pycarl/_version.py
  25. +1 −0 lib/pycarl/cln/__init__.py
  26. +0 −1 lib/pycarl/convert/__init__.py
  27. +5 −5 lib/pycarl/convert/cln_converter.py
  28. +11 −16 lib/pycarl/convert/gmp_converter.py
  29. +2 −0 lib/pycarl/gmp/__init__.py
  30. +13 −8 lib/pycarl/infinity.py
  31. +27 −0 pyproject.toml
  32. +11 −0 resources/include_pybind11.cmake
  33. +0 −40 resources/pybind11/.appveyor.yml
  34. +0 −37 resources/pybind11/.gitignore
  35. +0 −3 resources/pybind11/.gitmodules
  36. +0 −3 resources/pybind11/.readthedocs.yml
  37. +0 −194 resources/pybind11/.travis.yml
  38. +0 −139 resources/pybind11/CMakeLists.txt
  39. +0 −37 resources/pybind11/CONTRIBUTING.md
  40. +0 −17 resources/pybind11/ISSUE_TEMPLATE.md
  41. +0 −36 resources/pybind11/LICENSE
  42. +0 −2 resources/pybind11/MANIFEST.in
  43. +0 −129 resources/pybind11/README.md
  44. +0 −19 resources/pybind11/docs/Doxyfile
  45. +0 −11 resources/pybind11/docs/_static/theme_overrides.css
  46. +0 −81 resources/pybind11/docs/advanced/cast/chrono.rst
  47. +0 −85 resources/pybind11/docs/advanced/cast/custom.rst
  48. +0 −310 resources/pybind11/docs/advanced/cast/eigen.rst
  49. +0 −109 resources/pybind11/docs/advanced/cast/functional.rst
  50. +0 −42 resources/pybind11/docs/advanced/cast/index.rst
  51. +0 −163 resources/pybind11/docs/advanced/cast/overview.rst
  52. +0 −201 resources/pybind11/docs/advanced/cast/stl.rst
  53. +0 −303 resources/pybind11/docs/advanced/cast/strings.rst
  54. +0 −637 resources/pybind11/docs/advanced/classes.rst
  55. +0 −253 resources/pybind11/docs/advanced/embedding.rst
  56. +0 −142 resources/pybind11/docs/advanced/exceptions.rst
  57. +0 −484 resources/pybind11/docs/advanced/functions.rst
  58. +0 −244 resources/pybind11/docs/advanced/misc.rst
  59. +0 −13 resources/pybind11/docs/advanced/pycpp/index.rst
  60. +0 −366 resources/pybind11/docs/advanced/pycpp/numpy.rst
  61. +0 −98 resources/pybind11/docs/advanced/pycpp/object.rst
  62. +0 −78 resources/pybind11/docs/advanced/pycpp/utilities.rst
  63. +0 −173 resources/pybind11/docs/advanced/smart_ptrs.rst
  64. +0 −283 resources/pybind11/docs/basics.rst
  65. +0 −88 resources/pybind11/docs/benchmark.py
  66. +0 −97 resources/pybind11/docs/benchmark.rst
  67. +0 −572 resources/pybind11/docs/changelog.rst
  68. +0 −441 resources/pybind11/docs/classes.rst
  69. +0 −217 resources/pybind11/docs/compiling.rst
  70. +0 −332 resources/pybind11/docs/conf.py
  71. +0 −243 resources/pybind11/docs/faq.rst
  72. +0 −46 resources/pybind11/docs/index.rst
  73. +0 −95 resources/pybind11/docs/intro.rst
  74. +0 −20 resources/pybind11/docs/limitations.rst
  75. BIN resources/pybind11/docs/pybind11-logo.png
  76. BIN resources/pybind11/docs/pybind11_vs_boost_python1.png
  77. +0 −427 resources/pybind11/docs/pybind11_vs_boost_python1.svg
  78. BIN resources/pybind11/docs/pybind11_vs_boost_python2.png
  79. +0 −427 resources/pybind11/docs/pybind11_vs_boost_python2.svg
  80. +0 −91 resources/pybind11/docs/reference.rst
  81. +0 −24 resources/pybind11/docs/release.rst
  82. +0 −1 resources/pybind11/docs/requirements.txt
  83. +0 −471 resources/pybind11/include/pybind11/attr.h
  84. +0 −108 resources/pybind11/include/pybind11/buffer_info.h
  85. +0 −2,050 resources/pybind11/include/pybind11/cast.h
  86. +0 −162 resources/pybind11/include/pybind11/chrono.h
  87. +0 −597 resources/pybind11/include/pybind11/class_support.h
  88. +0 −873 resources/pybind11/include/pybind11/common.h
  89. +0 −61 resources/pybind11/include/pybind11/complex.h
  90. +0 −185 resources/pybind11/include/pybind11/descr.h
  91. +0 −610 resources/pybind11/include/pybind11/eigen.h
  92. +0 −195 resources/pybind11/include/pybind11/embed.h
  93. +0 −117 resources/pybind11/include/pybind11/eval.h
  94. +0 −85 resources/pybind11/include/pybind11/functional.h
  95. +0 −1,598 resources/pybind11/include/pybind11/numpy.h
  96. +0 −167 resources/pybind11/include/pybind11/operators.h
  97. +0 −65 resources/pybind11/include/pybind11/options.h
  98. +0 −1,829 resources/pybind11/include/pybind11/pybind11.h
  99. +0 −1,266 resources/pybind11/include/pybind11/pytypes.h
  100. +0 −349 resources/pybind11/include/pybind11/stl.h
  101. +0 −588 resources/pybind11/include/pybind11/stl_bind.h
  102. +0 −53 resources/pybind11/include/pybind11/typeid.h
  103. +0 −11 resources/pybind11/pybind11/__init__.py
  104. +0 −31 resources/pybind11/pybind11/__main__.py
  105. +0 −2 resources/pybind11/pybind11/_version.py
  106. +0 −10 resources/pybind11/setup.cfg
  107. +0 −86 resources/pybind11/setup.py
  108. +0 −201 resources/pybind11/tests/CMakeLists.txt
  109. +0 −239 resources/pybind11/tests/conftest.py
  110. +0 −276 resources/pybind11/tests/constructor_stats.h
  111. +0 −175 resources/pybind11/tests/object.h
  112. +0 −92 resources/pybind11/tests/pybind11_tests.cpp
  113. +0 −45 resources/pybind11/tests/pybind11_tests.h
  114. +0 −15 resources/pybind11/tests/pytest.ini
  115. +0 −166 resources/pybind11/tests/test_buffers.cpp
  116. +0 −83 resources/pybind11/tests/test_buffers.py
  117. +0 −136 resources/pybind11/tests/test_builtin_casters.cpp
  118. +0 −221 resources/pybind11/tests/test_builtin_casters.py
  119. +0 −103 resources/pybind11/tests/test_call_policies.cpp
  120. +0 −177 resources/pybind11/tests/test_call_policies.py
  121. +0 −184 resources/pybind11/tests/test_callbacks.cpp
  122. +0 −119 resources/pybind11/tests/test_callbacks.py
  123. +0 −65 resources/pybind11/tests/test_chrono.cpp
  124. +0 −120 resources/pybind11/tests/test_chrono.py
  125. +0 −239 resources/pybind11/tests/test_class.cpp
  126. +0 −129 resources/pybind11/tests/test_class.py
  127. +0 −58 resources/pybind11/tests/test_cmake_build/CMakeLists.txt
  128. +0 −21 resources/pybind11/tests/test_cmake_build/embed.cpp
  129. +0 −15 resources/pybind11/tests/test_cmake_build/installed_embed/CMakeLists.txt
  130. +0 −12 resources/pybind11/tests/test_cmake_build/installed_function/CMakeLists.txt
  131. +0 −22 resources/pybind11/tests/test_cmake_build/installed_target/CMakeLists.txt
  132. +0 −6 resources/pybind11/tests/test_cmake_build/main.cpp
  133. +0 −9 resources/pybind11/tests/test_cmake_build/subdirectory_embed/CMakeLists.txt
  134. +0 −8 resources/pybind11/tests/test_cmake_build/subdirectory_function/CMakeLists.txt
  135. +0 −15 resources/pybind11/tests/test_cmake_build/subdirectory_target/CMakeLists.txt
  136. +0 −5 resources/pybind11/tests/test_cmake_build/test.py
  137. +0 −104 resources/pybind11/tests/test_constants_and_functions.cpp
  138. +0 −43 resources/pybind11/tests/test_constants_and_functions.py
  139. +0 −209 resources/pybind11/tests/test_copy_move.cpp
  140. +0 −121 resources/pybind11/tests/test_copy_move.py
  141. +0 −62 resources/pybind11/tests/test_docstring_options.cpp
  142. +0 −42 resources/pybind11/tests/test_docstring_options.py
  143. +0 −315 resources/pybind11/tests/test_eigen.cpp
  144. +0 −721 resources/pybind11/tests/test_eigen.py
  145. +0 −34 resources/pybind11/tests/test_embed/CMakeLists.txt
  146. +0 −16 resources/pybind11/tests/test_embed/catch.cpp
  147. +0 −218 resources/pybind11/tests/test_embed/test_interpreter.cpp
  148. +0 −9 resources/pybind11/tests/test_embed/test_interpreter.py
  149. +0 −72 resources/pybind11/tests/test_enum.cpp
  150. +0 −129 resources/pybind11/tests/test_enum.py
  151. +0 −89 resources/pybind11/tests/test_eval.cpp
  152. +0 −19 resources/pybind11/tests/test_eval.py
  153. +0 −4 resources/pybind11/tests/test_eval_call.py
  154. +0 −192 resources/pybind11/tests/test_exceptions.cpp
  155. +0 −87 resources/pybind11/tests/test_exceptions.py
  156. +0 −93 resources/pybind11/tests/test_kwargs_and_defaults.cpp
  157. +0 −108 resources/pybind11/tests/test_kwargs_and_defaults.py
  158. +0 −363 resources/pybind11/tests/test_methods_and_attributes.cpp
  159. +0 −459 resources/pybind11/tests/test_methods_and_attributes.py
  160. +0 −101 resources/pybind11/tests/test_modules.cpp
  161. +0 −71 resources/pybind11/tests/test_modules.py
  162. +0 −215 resources/pybind11/tests/test_multiple_inheritance.cpp
  163. +0 −346 resources/pybind11/tests/test_multiple_inheritance.py
  164. +0 −300 resources/pybind11/tests/test_numpy_array.cpp
  165. +0 −435 resources/pybind11/tests/test_numpy_array.py
  166. +0 −472 resources/pybind11/tests/test_numpy_dtypes.cpp
  167. +0 −321 resources/pybind11/tests/test_numpy_dtypes.py
  168. +0 −85 resources/pybind11/tests/test_numpy_vectorize.cpp
  169. +0 −203 resources/pybind11/tests/test_numpy_vectorize.py
  170. +0 −62 resources/pybind11/tests/test_opaque_types.cpp
  171. +0 −50 resources/pybind11/tests/test_opaque_types.py
  172. +0 −152 resources/pybind11/tests/test_operator_overloading.cpp
  173. +0 −107 resources/pybind11/tests/test_operator_overloading.py
  174. +0 −83 resources/pybind11/tests/test_pickling.cpp
  175. +0 −35 resources/pybind11/tests/test_pickling.py
  176. +0 −264 resources/pybind11/tests/test_pytypes.cpp
  177. +0 −211 resources/pybind11/tests/test_pytypes.py
  178. +0 −364 resources/pybind11/tests/test_sequences_and_iterators.cpp
  179. +0 −165 resources/pybind11/tests/test_sequences_and_iterators.py
  180. +0 −341 resources/pybind11/tests/test_smart_ptr.cpp
  181. +0 −248 resources/pybind11/tests/test_smart_ptr.py
  182. +0 −165 resources/pybind11/tests/test_stl.cpp
  183. +0 −156 resources/pybind11/tests/test_stl.py
  184. +0 −128 resources/pybind11/tests/test_stl_binders.cpp
  185. +0 −203 resources/pybind11/tests/test_stl_binders.py
  186. +0 −447 resources/pybind11/tests/test_virtual_functions.cpp
  187. +0 −363 resources/pybind11/tests/test_virtual_functions.py
  188. +0 −57 resources/pybind11/tools/FindCatch.cmake
  189. +0 −81 resources/pybind11/tools/FindEigen3.cmake
  190. +0 −194 resources/pybind11/tools/FindPythonLibsNew.cmake
  191. +0 −82 resources/pybind11/tools/check-style.sh
  192. +0 −38 resources/pybind11/tools/libsize.py
  193. +0 −304 resources/pybind11/tools/mkdoc.py
  194. +0 −101 resources/pybind11/tools/pybind11Config.cmake.in
  195. +0 −203 resources/pybind11/tools/pybind11Tools.cmake
  196. +0 −8 setup.cfg
  197. +110 −109 setup.py
  198. +1 −1 setup/__init__.py
  199. +2 −1 setup/config.py
  200. +3 −2 setup/helper.py
  201. +8 −2 src/core/monomial.cpp
  202. +16 −18 src/core/variable.cpp
  203. +3 −3 src/formula/relation.cpp
  204. +2 −1 src/mod_cln.cpp
  205. +3 −0 src/mod_core.cpp
  206. +2 −1 src/mod_gmp.cpp
  207. +17 −5 src/typed_core/factorization.cpp
  208. +8 −2 src/typed_core/factorizedpolynomial.cpp
  209. +8 −2 src/typed_core/factorizedrationalfunction.cpp
  210. +36 −25 src/typed_core/integer.cpp
  211. +0 −111 src/typed_core/interval.cpp
  212. +116 −1 src/typed_core/interval.h
  213. +8 −2 src/typed_core/polynomial.cpp
  214. +33 −33 src/typed_core/rational.cpp
  215. +8 −2 src/typed_core/rationalfunction.cpp
  216. +8 −2 src/typed_core/term.cpp
  217. +24 −6 src/typed_formula/constraint.cpp
  218. +10 −4 src/typed_formula/formula.cpp
  219. +0 −2 src/types.h
  220. +1 −1 tests/convert/test_cln_convert.py
  221. +1 −1 tests/convert/test_convert_python_types.py
  222. +1 −1 tests/convert/test_gmp_convert.py
  223. +15 −4 tests/core/test_core.py
  224. +5 −6 tests/core/test_factorized_polynomial.py
  225. +1 −0 tests/core/test_infinity.py
  226. +30 −0 tests/core/test_interval.py
  227. +2 −2 tests/core/test_polynomial.py
  228. +0 −1 tests/core/test_rational.py
  229. +6 −0 tests/core/test_term.py
  230. +9 −0 tests/formula/test_relation.py
  231. +0 −131 travis/build-helper.sh
  232. +0 −84 travis/build.sh
  233. +0 −134 travis/generate_travis.py
20 changes: 20 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#Git files
.git
.git-blame-ignore-revs
.github
.gitignore
build_pycarl.sh
# The rest is based on .gitignore
*.so
*.py[cod]
lib/**/_config.py
.eggs/
*.egg-info/
build/
dist/
.idea/
__pycache__/
_build/
.pytest_cache/
.idea/
.DS_Store
1 change: 1 addition & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
c79883ee82481451376e72b6c1dd70a03b01a676
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Set update schedule for GitHub Actions

version: 2
updates:

- package-ecosystem: "github-actions"
directory: "/"
schedule:
# Check for updates to GitHub Actions every week
interval: "weekly"

81 changes: 81 additions & 0 deletions .github/workflows/Dockerfile.no_parser
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# Base Dockerfile for using pycarl without building carl-parser
###############################################################
# The Docker image can be built by executing:
# docker build -t yourusername/pycarl .
# A different base image can be set from the commandline with:
# --build-arg BASE_IMAGE=<new_base_image>

# Set base image
ARG BASE_IMAGE=movesrwth/storm-basesystem:latest
FROM $BASE_IMAGE
MAINTAINER Matthias Volk <m.volk@utwente.nl>


# Configuration arguments
#########################
# The arguments can be set from the commandline with:
# --build-arg <arg_name>=<value>

# CMake build type
ARG build_type=Release
# Additional arguments for compiling pycarl
ARG setup_args=""
# Additional CMake arguments for carl
ARG carl_cmake_args=""
# Number of threads to use for parallel compilation
ARG no_threads=2
# Carl-storm version
ARG carl_version=master


# Install dependencies
######################
# Uncomment to update packages beforehand
RUN apt-get update -qq
RUN apt-get install -y --no-install-recommends \
python3 \
python3-venv


# Build carl
############
WORKDIR /opt/

# Obtain carl from public repository
RUN git clone -b $carl_version https://github.com/moves-rwth/carl-storm.git carl

# Switch to build directory
RUN mkdir -p /opt/carl/build
WORKDIR /opt/carl/build

# Configure carl
RUN cmake .. $carl_cmake_args -DCMAKE_BUILD_TYPE=$build_type

# Build carl
RUN make lib_carl -j $no_threads


# Skip building carl-parser


# Set-up virtual environment
############################
ENV VIRTUAL_ENV=/opt/venv
RUN python3 -m venv $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"

RUN pip install setuptools

# Build pycarl
##############
RUN mkdir /opt/pycarl
WORKDIR /opt/pycarl

# Copy the content of the current local pycarl repository into the Docker image
COPY . .

# Build pycarl
RUN python setup.py build_ext $setup_args -j $no_threads develop

# Uncomment to build optional dependencies
#RUN pip install -e '.[doc]'
152 changes: 87 additions & 65 deletions .github/workflows/buildtest.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Build Test
# Builds and tests pycarl on different Linux systems

on:
push:
@@ -7,36 +8,58 @@ on:
schedule:
# run weekly
- cron: '0 10 * * 3'
# needed to trigger the workflow manually
workflow_dispatch:
pull_request:

env:
GIT_URL: "${{ github.server_url }}/${{ github.repository }}.git"
BRANCH: "master"
# github runners currently have two cores
NR_JOBS: "2"
# GitHub runners currently have 4 cores
NR_JOBS: "4"

CARL_PARSER_GIT_URL: "https://github.com/ths-rwth/carl-parser"
CARL_PARSER_BRANCH: "master14"
CARL_GIT_URL: "https://github.com/smtrat/carl"
CARL_BRANCH: "master14"
jobs:
indepthTests:
name: Indepth Tests (${{ matrix.setupArgs.name }})
runs-on: ubuntu-latest
strategy:
matrix:
distro: ["latest"]
debugOrRelease: ["release"]
setupArgs:
# This is the standard config
#- {name: "Standard", cln: "true", parser: "true"}
- {name: "no CLN", cln: "false", parser: "true"}
- {name: "no parser", cln: "true", parser: "false"}
- {name: "no CLN, no parser", cln: "false", parser: "false"}
steps:
- name: Setup environment variables
# this is strangely the best way to implement environment variables based on the value of another
# GITHUB_ENV is a magic variable pointing to a file; if a line with format {NAME}={VALUE}
# then the env variable with name NAME will be created/updated with VALUE
run: |
([[ ${{ matrix.debugOrRelease }} == "debug" ]] && echo "BUILD_TYPE=Debug" || echo "BUILD_TYPE=Release") >> $GITHUB_ENV
([[ ${{ matrix.setupArgs.cln }} == "true" ]] && echo "CARL_CMAKE_ARGS=-DUSE_CLN_NUMBERS=ON -DUSE_GINAC=ON" || echo "CARL_CMAKE_ARGS=-DUSE_CLN_NUMBERS=OFF -DUSE_GINAC=OFF") >> $GITHUB_ENV
([[ ${{ matrix.debugOrRelease }} == "debug" ]] && echo "DEBUG_SWITCH=--debug" || true) >> $GITHUB_ENV
CMAKE_DEBUG: "-DCMAKE_BUILD_TYPE=Debug"
CMAKE_RELEASE: "-DCMAKE_BUILD_TYPE=Release"
CARL_CMAKE_DEBUG: "-DCMAKE_BUILD_TYPE=Debug -DUSE_CLN_NUMBERS=ON -DUSE_GINAC=ON -DTHREAD_SAFE=ON -DBUILD_ADDONS=ON -DBUILD_ADDON_PARSER=ON"
CARL_CMAKE_RELEASE: "-DCMAKE_BUILD_TYPE=Release -DUSE_CLN_NUMBERS=ON -DUSE_GINAC=ON -DTHREAD_SAFE=ON -DBUILD_ADDONS=ON -DBUILD_ADDON_PARSER=ON"
- name: Git clone
uses: actions/checkout@v4
- name: Replace Dockerfile (optional)
# If carl-parser should be excluded
if: matrix.setupArgs.parser == 'false'
run: cp .github/workflows/Dockerfile.no_parser Dockerfile
- name: Build pycarl from Dockerfile
run: docker build -t movesrwth/pycarl:ci-${{ matrix.debugOrRelease }} . --build-arg BASE_IMAGE=movesrwth/storm-basesystem:${{ matrix.distro }} --build-arg build_type=${BUILD_TYPE} --build-arg carl_cmake_args="${CARL_CMAKE_ARGS}" --build-arg setup_args=${DEBUG_SWITCH} --build-arg no_threads=${NR_JOBS}
- name: Run Docker
run: docker run -d -it --name ci movesrwth/pycarl:ci-${{ matrix.debugOrRelease }}
- name: Run tests
run: docker exec ci bash -c "cd /opt/pycarl; pip install pytest; pytest"

DOCUMENTATION_DISTRO: "ubuntu-20.04"

jobs:
noDeploy:
distroTests:
name: Build and Test
runs-on: ubuntu-latest
env:
PYTHON: "python3"
strategy:
matrix:
# exclude debian-9 as it is broken
distro: ["ubuntu-20.04", "ubuntu-18.04", "debian-10"]
distro: ["debian-12", "ubuntu-22.04", "ubuntu-24.04"]
debugOrRelease: ["debug", "release"]

steps:
@@ -45,71 +68,70 @@ jobs:
# GITHUB_ENV is a magic variable pointing to a file; if a line with format {NAME}={VALUE}
# then the env variable with name NAME will be created/updated with VALUE
run: |
([[ ${{ matrix.debugOrRelease }} == "debug" ]] && echo "CMAKE_ARGS=${CMAKE_DEBUG}" || echo "CMAKE_ARGS=${CMAKE_RELEASE}") >> $GITHUB_ENV
([[ ${{ matrix.debugOrRelease }} == "debug" ]] && echo "CARL_CMAKE_ARGS=${CARL_CMAKE_DEBUG}" || echo "CARL_CMAKE_ARGS=${CARL_CMAKE_RELEASE}") >> $GITHUB_ENV
([[ ${{ matrix.debugOrRelease }} == "debug" ]] && echo "BUILD_TYPE=Debug" || echo "BUILD_TYPE=Release") >> $GITHUB_ENV
([[ ${{ matrix.debugOrRelease }} == "debug" ]] && echo "DEBUG_SWITCH=--debug" || true) >> $GITHUB_ENV
- name: Init Docker
run: sudo docker run -d -it --name ci --privileged movesrwth/storm-basesystem:${{ matrix.distro }}
# We should not do partial updates :/
# but we need to install some dependencies
# Surely we can find a better way to do this at some point
- name: Update base system
run: |
sudo docker exec ci apt-get update
sudo docker exec ci apt-get upgrade -qqy
- name: install dependencies
run: sudo docker exec ci apt-get install -qq -y maven uuid-dev libeigen3-dev python3 python3-venv
- name: Git clone
run: |
sudo docker exec ci git clone --depth 1 --branch $BRANCH $GIT_URL /opt/pycarl
sudo docker exec ci git clone --depth 1 --branch $CARL_BRANCH $CARL_GIT_URL /opt/carl
sudo docker exec ci git clone --depth 1 --branch $CARL_PARSER_BRANCH $CARL_PARSER_GIT_URL /opt/carl-parser
- name: Run cmake for carl
run: sudo docker exec ci bash -c "mkdir /opt/carl/build; cd /opt/carl/build; cmake .. ${CARL_CMAKE_ARGS}"
- name: Build carl
run: sudo docker exec ci bash -c "cd /opt/carl/build; make lib_carl -j ${NR_JOBS}"
- name: Git clone
uses: actions/checkout@v4
- name: Build pycarl from Dockerfile
run: docker build -t movesrwth/pycarl:ci-${{ matrix.debugOrRelease }} . --build-arg BASE_IMAGE=movesrwth/storm-basesystem:${{ matrix.distro }} --build-arg build_type=${BUILD_TYPE} --build-arg setup_args=${DEBUG_SWITCH} --build-arg no_threads=${NR_JOBS}
- name: Run Docker
run: docker run -d -it --name ci movesrwth/pycarl:ci-${{ matrix.debugOrRelease }}
- name: Run tests
run: docker exec ci bash -c "cd /opt/pycarl; pip install pytest; pytest"

- name: Run cmake for carl-parser
run: sudo docker exec ci bash -c "mkdir /opt/carl-parser/build; cd /opt/carl-parser/build; cmake .. ${CMAKE_ARGS}"
- name: make carl-parser
run: sudo docker exec ci bash -c "cd /opt/carl-parser/build; make -j ${NR_JOBS}"
deploy:
name: Build, Test and deploy documentation
runs-on: ubuntu-latest
strategy:
matrix:
debugOrRelease: ["debug", "release"]

- name: Setup virtualenv
run: |
sudo docker exec ci bash -c "cd /opt; ${PYTHON} -m venv pycarl-env; source pycarl-env/bin/activate; python --version"
- name: Build pycarl
steps:
- name: Setup environment variables
# this is strangely the best way to implement environment variables based on the value of another
# GITHUB_ENV is a magic variable pointing to a file; if a line with format {NAME}={VALUE}
# then the env variable with name NAME will be created/updated with VALUE
run: |
sudo docker exec ci bash -c "cd /opt; source pycarl-env/bin/activate; cd /opt/pycarl; python setup.py build_ext $DEBUG_SWITCH -j ${NR_JOBS} develop"
([[ ${{ matrix.debugOrRelease }} == "debug" ]] && echo "BUILD_TYPE=Debug" || echo "BUILD_TYPE=Release") >> $GITHUB_ENV
([[ ${{ matrix.debugOrRelease }} == "debug" ]] && echo "DEBUG_SWITCH=--debug" || true) >> $GITHUB_ENV
- name: Git clone
uses: actions/checkout@v4
- name: Build pycarl from Dockerfile
run: docker build -t movesrwth/pycarl:ci-${{ matrix.debugOrRelease }} . --build-arg BASE_IMAGE=movesrwth/storm-basesystem:latest --build-arg build_type=${BUILD_TYPE} --build-arg setup_args=${DEBUG_SWITCH} --build-arg no_threads=${NR_JOBS}
- name: Run Docker
run: docker run -d -it --name ci movesrwth/pycarl:ci-${{ matrix.debugOrRelease }}
- name: Run tests
run: |
sudo docker exec ci bash -c "cd /opt; source pycarl-env/bin/activate; cd /opt/pycarl; python setup.py test"
run: docker exec ci bash -c "cd /opt/pycarl; pip install pytest; pytest"

# build and publish documentation
# Build and publish documentation for release build
- name: Install documentation dependencies
if: matrix.debugOrRelease == 'release' && matrix.distro == env.DOCUMENTATION_DISTRO
run: sudo docker exec ci bash -c "cd /opt; source pycarl-env/bin/activate; cd pycarl; pip install sphinx sphinx_bootstrap_theme"
if: matrix.debugOrRelease == 'release'
run: docker exec ci bash -c "cd /opt/pycarl; pip install -e '.[doc]'"
- name: Build documentation
if: matrix.debugOrRelease == 'release' && matrix.distro == env.DOCUMENTATION_DISTRO
if: matrix.debugOrRelease == 'release'
run: |
sudo docker exec ci bash -c "cd /opt; source pycarl-env/bin/activate; cd pycarl/doc; make html"
sudo docker exec ci rm -r /opt/pycarl/doc/build/html/_sources
sudo docker cp ci:/opt/pycarl/doc/build/html .
docker exec ci bash -c "cd /opt/pycarl/doc; make html"
docker exec ci rm -r /opt/pycarl/doc/build/html/_sources
docker cp ci:/opt/pycarl/doc/build/html .
- name: Deploy documentation
if: matrix.debugOrRelease == 'release' && matrix.distro == env.DOCUMENTATION_DISTRO
uses: peaceiris/actions-gh-pages@v3
# Only deploy for master on original repo (and not for pull requests or forks)
if: matrix.debugOrRelease == 'release' && github.repository_owner == 'moves-rwth' && github.ref == 'refs/heads/master'
uses: peaceiris/actions-gh-pages@v4
with:
personal_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./html

notify:
name: Email notification
runs-on: ubuntu-latest
needs: [noDeploy]
if: always() # set always
needs: [indepthTests,distroTests,deploy]
# Only run in main repo and even if previous step failed
if: github.repository_owner == 'moves-rwth' && always()
steps:
- uses: technote-space/workflow-conclusion-action@v2
- uses: dawidd6/action-send-mail@v2
- uses: technote-space/workflow-conclusion-action@v3
- uses: dawidd6/action-send-mail@v4
with:
server_address: ${{ secrets.STORM_CI_MAIL_SERVER }}
server_port: 587
38 changes: 38 additions & 0 deletions .github/workflows/formatapply.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: apply-code-format

on: [ workflow_dispatch ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: psf/black@stable
with:
options: ""
src: "."
jupyter: true
- name: Commit Formatting
run: |
git config user.name 'Auto Format'
git config user.email 'dev@stormchecker.org'
if [ -z "$(git status --porcelain)" ]
then
echo "Code did not change"
else
git commit -am "Applied code formatting"
git rev-parse HEAD >> .git-blame-ignore-revs
git commit -am "Add code formatting commit to .git-blame-ignore-revs"
fi
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v7
with:
branch: ci/apply-code-format
delete-branch: true
title: 'Code formatting'
body: |
Auto-generated pull request triggered by the `apply-code-format` workflow.
- Manually close and reopen this PR to trigger the CI.
- Make sure to **merge** (and not rebase) this PR so that the added commit hash in `.git-blame-ignore-revs` remains valid.
15 changes: 15 additions & 0 deletions .github/workflows/formatcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: check-code-format

on: [push, pull_request, workflow_dispatch]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: psf/black@stable
with:
options: "--check --diff --color"
src: "."
jupyter: true
Loading