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: msis/python-moos
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: russkel/python-moos
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Able to merge. These branches can be automatically merged.

Commits on Nov 21, 2020

  1. pybind11: update to 2.6.1

    russkel committed Nov 21, 2020
    Copy the full SHA
    e6187ab View commit details

Commits on Feb 4, 2021

  1. Fix CI Actions (themoos#9)

    * CI: remove old CI scripts
    * CI: copy in pybind example CI
    * don't try to build windows wheels
    * upload conda artifacts
    * Try skipping all python2.7
    * try using manylinux2014
    * use latest cibuildwheel, build aarch64
    
    Co-authored-by: Oscar Viquez <oviquezr@mit.edu>
    russkel and oviquezr authored Feb 4, 2021
    Copy the full SHA
    92ac6f4 View commit details
  2. pybind11: update to 2.6.2

    russkel committed Feb 4, 2021
    Copy the full SHA
    2694628 View commit details
  3. Copy the full SHA
    fbaf7f9 View commit details
  4. ci: fix branch name

    russkel committed Feb 4, 2021
    Copy the full SHA
    6c47bad View commit details
  5. Copy the full SHA
    c318f69 View commit details
  6. version: bump for release

    russkel committed Feb 4, 2021
    Copy the full SHA
    e8656e0 View commit details
  7. fixing BASE: to BASE::

    oviquezr committed Feb 4, 2021
    Copy the full SHA
    b50fc43 View commit details
  8. Merge pull request themoos#8 from russkel/fix-warnings

    Fix warnings
    oviquezr authored Feb 4, 2021
    Copy the full SHA
    878a8cc View commit details

Commits on Oct 6, 2021

  1. Copy the full SHA
    3ef3fc3 View commit details

Commits on Oct 8, 2021

  1. Copy the full SHA
    3a64e3a View commit details

Commits on Apr 15, 2022

  1. pybind: update to 2.9.2

    russkel committed Apr 15, 2022
    Copy the full SHA
    3803015 View commit details
  2. Copy the full SHA
    b5d0559 View commit details

Commits on Jun 28, 2022

  1. Copy the full SHA
    22fd60f View commit details
  2. Copy the full SHA
    ca315e6 View commit details
  3. Copy the full SHA
    0abb74e View commit details

Commits on Jun 29, 2022

  1. Copy the full SHA
    0561ec2 View commit details
  2. Copy the full SHA
    4b23ca0 View commit details
  3. chore: v2022.1

    russkel committed Jun 29, 2022
    Copy the full SHA
    a116c75 View commit details
  4. Copy the full SHA
    4fcf0f1 View commit details

Commits on Jul 3, 2022

  1. Copy the full SHA
    0fb5148 View commit details
Showing with 29,888 additions and 11,563 deletions.
  1. +0 −62 .appveyor.yml
  2. +82 −0 .github/workflows/conda.yml
  3. +63 −0 .github/workflows/pip.yml
  4. +28 −0 .github/workflows/pypi.yml
  5. +156 −0 .github/workflows/wheels.yml
  6. +0 −95 .travis.yml
  7. +25 −10 README.md
  8. +0 −2 conda.recipe/bld.bat
  9. +0 −3 conda.recipe/build.sh
  10. +17 −14 conda.recipe/meta.yaml
  11. +9 −42 pybind11/.appveyor.yml
  12. +38 −0 pybind11/.clang-format
  13. +72 −0 pybind11/.clang-tidy
  14. +73 −0 pybind11/.cmake-format.yaml
  15. +9 −0 pybind11/.github/CODEOWNERS
  16. +387 −0 pybind11/.github/CONTRIBUTING.md
  17. +45 −0 pybind11/.github/ISSUE_TEMPLATE/bug-report.yml
  18. +8 −0 pybind11/.github/ISSUE_TEMPLATE/config.yml
  19. +16 −0 pybind11/.github/dependabot.yml
  20. +8 −0 pybind11/.github/labeler.yml
  21. +3 −0 pybind11/.github/labeler_merged.yml
  22. +19 −0 pybind11/.github/pull_request_template.md
  23. +965 −0 pybind11/.github/workflows/ci.yml
  24. +84 −0 pybind11/.github/workflows/configure.yml
  25. +48 −0 pybind11/.github/workflows/format.yml
  26. +16 −0 pybind11/.github/workflows/labeler.yml
  27. +108 −0 pybind11/.github/workflows/pip.yml
  28. +112 −0 pybind11/.github/workflows/upstream.yml
  29. +9 −2 pybind11/.gitignore
  30. +0 −3 pybind11/.gitmodules
  31. +147 −0 pybind11/.pre-commit-config.yaml
  32. +0 −306 pybind11/.travis.yml
  33. +261 −119 pybind11/CMakeLists.txt
  34. +0 −49 pybind11/CONTRIBUTING.md
  35. +0 −17 pybind11/ISSUE_TEMPLATE.md
  36. +1 −1 pybind11/LICENSE
  37. +6 −2 pybind11/MANIFEST.in
  38. +0 −129 pybind11/README.md
  39. +180 −0 pybind11/README.rst
  40. +2 −0 pybind11/docs/Doxyfile
  41. +6 −4 pybind11/docs/advanced/cast/custom.rst
  42. +4 −4 pybind11/docs/advanced/cast/eigen.rst
  43. +2 −1 pybind11/docs/advanced/cast/index.rst
  44. +94 −88 pybind11/docs/advanced/cast/overview.rst
  45. +13 −2 pybind11/docs/advanced/cast/stl.rst
  46. +16 −16 pybind11/docs/advanced/cast/strings.rst
  47. +265 −42 pybind11/docs/advanced/classes.rst
  48. +20 −19 pybind11/docs/advanced/embedding.rst
  49. +282 −28 pybind11/docs/advanced/exceptions.rst
  50. +124 −16 pybind11/docs/advanced/functions.rst
  51. +52 −21 pybind11/docs/advanced/misc.rst
  52. +106 −29 pybind11/docs/advanced/pycpp/numpy.rst
  53. +124 −8 pybind11/docs/advanced/pycpp/object.rst
  54. +19 −8 pybind11/docs/advanced/pycpp/utilities.rst
  55. +1 −0 pybind11/docs/advanced/smart_ptrs.rst
  56. +23 −8 pybind11/docs/basics.rst
  57. +23 −20 pybind11/docs/benchmark.py
  58. +0 −2 pybind11/docs/benchmark.rst
  59. +1,055 −5 pybind11/docs/changelog.rst
  60. +29 −19 pybind11/docs/classes.rst
  61. +8 −0 pybind11/docs/cmake/index.rst
  62. +419 −60 pybind11/docs/compiling.rst
  63. +150 −101 pybind11/docs/conf.py
  64. +51 −32 pybind11/docs/faq.rst
  65. +7 −6 pybind11/docs/index.rst
  66. +105 −0 pybind11/docs/installing.rst
  67. +0 −93 pybind11/docs/intro.rst
  68. +57 −5 pybind11/docs/limitations.rst
  69. +20 −7 pybind11/docs/reference.rst
  70. +92 −16 pybind11/docs/release.rst
  71. +5 −1 pybind11/docs/requirements.txt
  72. +150 −2 pybind11/docs/upgrade.rst
  73. +281 −99 pybind11/include/pybind11/attr.h
  74. +126 −47 pybind11/include/pybind11/buffer_info.h
  75. +816 −1,332 pybind11/include/pybind11/cast.h
  76. +118 −66 pybind11/include/pybind11/chrono.h
  77. +24 −15 pybind11/include/pybind11/complex.h
  78. +237 −128 pybind11/include/pybind11/detail/class.h
  79. +752 −362 pybind11/include/pybind11/detail/common.h
  80. +87 −29 pybind11/include/pybind11/detail/descr.h
  81. +197 −104 pybind11/include/pybind11/detail/init.h
  82. +345 −122 pybind11/include/pybind11/detail/internals.h
  83. +1,083 −0 pybind11/include/pybind11/detail/type_caster_base.h
  84. +15 −11 pybind11/include/pybind11/detail/typeid.h
  85. +322 −230 pybind11/include/pybind11/eigen.h
  86. +150 −50 pybind11/include/pybind11/embed.h
  87. +99 −38 pybind11/include/pybind11/eval.h
  88. +54 −24 pybind11/include/pybind11/functional.h
  89. +202 −0 pybind11/include/pybind11/gil.h
  90. +103 −47 pybind11/include/pybind11/iostream.h
  91. +870 −554 pybind11/include/pybind11/numpy.h
  92. +164 −112 pybind11/include/pybind11/operators.h
  93. +28 −17 pybind11/include/pybind11/options.h
  94. +1,620 −932 pybind11/include/pybind11/pybind11.h
  95. +1,068 −399 pybind11/include/pybind11/pytypes.h
  96. +159 −123 pybind11/include/pybind11/stl.h
  97. +103 −0 pybind11/include/pybind11/stl/filesystem.h
  98. +408 −279 pybind11/include/pybind11/stl_bind.h
  99. +92 −0 pybind11/noxfile.py
  100. +9 −10 pybind11/pybind11/__init__.py
  101. +26 −10 pybind11/pybind11/__main__.py
  102. +12 −2 pybind11/pybind11/_version.py
  103. +6 −0 pybind11/pybind11/_version.pyi
  104. +21 −0 pybind11/pybind11/commands.py
  105. 0 pybind11/pybind11/py.typed
  106. +494 −0 pybind11/pybind11/setup_helpers.py
  107. +63 −0 pybind11/pybind11/setup_helpers.pyi
  108. +41 −0 pybind11/pyproject.toml
  109. +51 −0 pybind11/setup.cfg
  110. +159 −116 pybind11/setup.py
  111. +452 −138 pybind11/tests/CMakeLists.txt
  112. +30 −66 pybind11/tests/conftest.py
  113. +96 −50 pybind11/tests/constructor_stats.h
  114. +14 −23 pybind11/tests/cross_module_gil_utils.cpp
  115. +33 −0 pybind11/tests/env.py
  116. 0 pybind11/tests/extra_python_package/pytest.ini
  117. +279 −0 pybind11/tests/extra_python_package/test_files.py
  118. 0 pybind11/tests/extra_setuptools/pytest.ini
  119. +151 −0 pybind11/tests/extra_setuptools/test_setuphelper.py
  120. +41 −13 pybind11/tests/local_bindings.h
  121. +71 −41 pybind11/tests/object.h
  122. +58 −32 pybind11/tests/pybind11_cross_module_tests.cpp
  123. +16 −17 pybind11/tests/pybind11_tests.cpp
  124. +47 −21 pybind11/tests/pybind11_tests.h
  125. +5 −2 pybind11/tests/pytest.ini
  126. +12 −0 pybind11/tests/requirements.txt
  127. +3 −4 pybind11/tests/test_async.cpp
  128. +4 −2 pybind11/tests/test_async.py
  129. +92 −63 pybind11/tests/test_buffers.cpp
  130. +73 −24 pybind11/tests/test_buffers.py
  131. +265 −68 pybind11/tests/test_builtin_casters.cpp
  132. +244 −79 pybind11/tests/test_builtin_casters.py
  133. +29 −14 pybind11/tests/test_call_policies.cpp
  134. +76 −15 pybind11/tests/test_call_policies.py
  135. +130 −55 pybind11/tests/test_callbacks.cpp
  136. +79 −13 pybind11/tests/test_callbacks.py
  137. +32 −6 pybind11/tests/test_chrono.cpp
  138. +66 −32 pybind11/tests/test_chrono.py
  139. +333 −126 pybind11/tests/test_class.cpp
  140. +224 −32 pybind11/tests/test_class.py
  141. +57 −31 pybind11/tests/test_cmake_build/CMakeLists.txt
  142. +7 −5 pybind11/tests/test_cmake_build/embed.cpp
  143. +19 −6 pybind11/tests/test_cmake_build/installed_embed/CMakeLists.txt
  144. +33 −6 pybind11/tests/test_cmake_build/installed_function/CMakeLists.txt
  145. +35 −11 pybind11/tests/test_cmake_build/installed_target/CMakeLists.txt
  146. +29 −13 pybind11/tests/test_cmake_build/subdirectory_embed/CMakeLists.txt
  147. +33 −6 pybind11/tests/test_cmake_build/subdirectory_function/CMakeLists.txt
  148. +35 −9 pybind11/tests/test_cmake_build/subdirectory_target/CMakeLists.txt
  149. +5 −0 pybind11/tests/test_cmake_build/test.py
  150. +70 −0 pybind11/tests/test_const_name.cpp
  151. +31 −0 pybind11/tests/test_const_name.py
  152. +76 −41 pybind11/tests/test_constants_and_functions.cpp
  153. +15 −1 pybind11/tests/test_constants_and_functions.py
  154. +167 −88 pybind11/tests/test_copy_move.cpp
  155. +20 −6 pybind11/tests/test_copy_move.py
  156. +209 −0 pybind11/tests/test_custom_type_casters.cpp
  157. +121 −0 pybind11/tests/test_custom_type_casters.py
  158. +41 −0 pybind11/tests/test_custom_type_setup.cpp
  159. +50 −0 pybind11/tests/test_custom_type_setup.py
  160. +45 −18 pybind11/tests/test_docstring_options.cpp
  161. +9 −5 pybind11/tests/test_docstring_options.py
  162. +170 −98 pybind11/tests/test_eigen.cpp
  163. +196 −119 pybind11/tests/test_eigen.py
  164. +27 −21 pybind11/tests/test_embed/CMakeLists.txt
  165. +8 −3 pybind11/tests/test_embed/catch.cpp
  166. +4 −7 pybind11/tests/test_embed/external_module.cpp
  167. +166 −50 pybind11/tests/test_embed/test_interpreter.cpp
  168. +6 −0 pybind11/tests/test_embed/test_interpreter.py
  169. +18 −0 pybind11/tests/test_embed/test_trampoline.py
  170. +76 −30 pybind11/tests/test_enum.cpp
  171. +92 −26 pybind11/tests/test_enum.py
  172. +44 −17 pybind11/tests/test_eval.cpp
  173. +35 −1 pybind11/tests/test_eval.py
  174. +2 −1 pybind11/tests/test_eval_call.py
  175. +155 −47 pybind11/tests/test_exceptions.cpp
  176. +13 −0 pybind11/tests/test_exceptions.h
  177. +129 −4 pybind11/tests/test_exceptions.py
  178. +221 −122 pybind11/tests/test_factory_constructors.cpp
  179. +102 −41 pybind11/tests/test_factory_constructors.py
  180. +23 −28 pybind11/tests/test_gil_scoped.cpp
  181. +10 −1 pybind11/tests/test_gil_scoped.py
  182. +81 −24 pybind11/tests/test_iostream.cpp
  183. +141 −24 pybind11/tests/test_iostream.py
  184. +221 −50 pybind11/tests/test_kwargs_and_defaults.cpp
  185. +266 −20 pybind11/tests/test_kwargs_and_defaults.py
  186. +27 −22 pybind11/tests/test_local_bindings.cpp
  187. +44 −13 pybind11/tests/test_local_bindings.py
  188. +216 −217 pybind11/tests/test_methods_and_attributes.cpp
  189. +130 −117 pybind11/tests/test_methods_and_attributes.py
  190. +49 −24 pybind11/tests/test_modules.cpp
  191. +26 −6 pybind11/tests/test_modules.py
  192. +200 −79 pybind11/tests/test_multiple_inheritance.cpp
  193. +155 −8 pybind11/tests/test_multiple_inheritance.py
  194. +294 −160 pybind11/tests/test_numpy_array.cpp
  195. +250 −104 pybind11/tests/test_numpy_array.py
  196. +244 −133 pybind11/tests/test_numpy_dtypes.cpp
  197. +238 −107 pybind11/tests/test_numpy_dtypes.py
  198. +59 −41 pybind11/tests/test_numpy_vectorize.cpp
  199. +120 −49 pybind11/tests/test_numpy_vectorize.py
  200. +19 −9 pybind11/tests/test_opaque_types.cpp
  201. +15 −2 pybind11/tests/test_opaque_types.py
  202. +171 −54 pybind11/tests/test_operator_overloading.cpp
  203. +60 −13 pybind11/tests/test_operator_overloading.py
  204. +86 −21 pybind11/tests/test_pickling.cpp
  205. +41 −1 pybind11/tests/test_pickling.py
  206. +329 −87 pybind11/tests/test_pytypes.cpp
  207. +420 −24 pybind11/tests/test_pytypes.py
  208. +316 −107 pybind11/tests/test_sequences_and_iterators.cpp
  209. +98 −16 pybind11/tests/test_sequences_and_iterators.py
  210. +310 −202 pybind11/tests/test_smart_ptr.cpp
  211. +53 −21 pybind11/tests/test_smart_ptr.py
  212. +315 −71 pybind11/tests/test_stl.cpp
  213. +142 −25 pybind11/tests/test_stl.py
  214. +67 −44 pybind11/tests/test_stl_binders.cpp
  215. +88 −46 pybind11/tests/test_stl_binders.py
  216. +66 −55 pybind11/tests/test_tagbased_polymorphic.cpp
  217. +12 −3 pybind11/tests/test_tagbased_polymorphic.py
  218. +66 −0 pybind11/tests/test_thread.cpp
  219. +44 −0 pybind11/tests/test_thread.py
  220. +1 −0 pybind11/tests/test_union.py
  221. +256 −142 pybind11/tests/test_virtual_functions.cpp
  222. +105 −22 pybind11/tests/test_virtual_functions.py
  223. +140 −0 pybind11/tests/valgrind-numpy-scipy.supp
  224. +117 −0 pybind11/tests/valgrind-python.supp
  225. +19 −4 pybind11/tools/FindCatch.cmake
  226. +18 −13 pybind11/tools/FindEigen3.cmake
  227. +143 −75 pybind11/tools/FindPythonLibsNew.cmake
  228. +7 −33 pybind11/tools/check-style.sh
  229. +23 −0 pybind11/tools/cmake_uninstall.cmake.in
  230. +5 −4 pybind11/tools/libsize.py
  231. +64 −0 pybind11/tools/make_changelog.py
  232. +0 −379 pybind11/tools/mkdoc.py
  233. +411 −0 pybind11/tools/pybind11Common.cmake
  234. +220 −91 pybind11/tools/pybind11Config.cmake.in
  235. +278 −0 pybind11/tools/pybind11NewTools.cmake
  236. +156 −164 pybind11/tools/pybind11Tools.cmake
  237. +3 −0 pybind11/tools/pyproject.toml
  238. +65 −0 pybind11/tools/setup_global.py.in
  239. +41 −0 pybind11/tools/setup_main.py.in
  240. +8 −0 pyproject.toml
  241. +12 −0 scripts/bump-pybind11.sh
  242. +27 −60 setup.py
  243. +2 −2 src/pyMOOS.cpp
  244. +5 −0 tests/test.py
62 changes: 0 additions & 62 deletions .appveyor.yml

This file was deleted.

82 changes: 82 additions & 0 deletions .github/workflows/conda.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: Conda

on:
workflow_dispatch:
push:
branches:
- master
pull_request:

jobs:
build:
strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest, macos-latest] # windows-latest,
python-version: ["3.8", "3.9", "3.10"]

runs-on: ${{ matrix.platform }}

# The setup-miniconda action needs this to activate miniconda
defaults:
run:
shell: "bash -l {0}"

steps:
- uses: actions/checkout@v2

- name: Get conda
uses: conda-incubator/setup-miniconda@v2
with:
python-version: ${{ matrix.python-version }}
channels: conda-forge

- name: Prepare
run: conda install conda-build conda-verify

# - name: Build MOOS
# uses: ./.github/actions/build-moos-core
- name: Checkout MOOS source
uses: actions/checkout@v2
with:
repository: 'russkel/core-moos'
path: '${{ github.workspace }}/core-moos'

- name: 'Run CMake'
uses: lukka/run-cmake@v3
with:
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced
cmakeListsTxtPath: '${{ github.workspace }}/core-moos/CMakeLists.txt'
buildDirectory: '${{ github.workspace }}/core-moos/build'
cmakeBuildType: 'Release'
buildWithCMake: true
cmakeAppendedArgs: '-DBUILD_SHARED_LIBS=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON'

- name: Install MOOS
run: |
cd ${{ github.workspace }}/core-moos/build
cmake --install . --prefix ${{ github.workspace }}/.local
echo "PATH=$PATH:${{ github.workspace }}/.local/bin" >> $GITHUB_ENV
- name: Create setup.cfg
run: |
echo "[build_ext]" >> setup.cfg
echo "include_dirs=${{ github.workspace }}/.local/include" >> setup.cfg
echo "library_dirs=${{ github.workspace }}/.local/lib" >> setup.cfg
cat setup.cfg
- name: Build
run: conda build conda.recipe

- name: Install
run: conda install -c ${CONDA_PREFIX}/conda-bld/ pymoos

- name: Test
run: python tests/test.py

- name: Upload conda package
uses: actions/upload-artifact@v2
with:
path: ${{ env.CONDA_PREFIX }}/conda-bld/*/*.bz2

# TODO - upload to release
63 changes: 63 additions & 0 deletions .github/workflows/pip.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Pip

on:
workflow_dispatch:
pull_request:
push:
branches:
- master

jobs:
build:
strategy:
fail-fast: false
matrix:
platform: [macos-latest, ubuntu-latest]
python-version: ["3.8", "3.9", "3.10"]

runs-on: ${{ matrix.platform }}

steps:
- uses: actions/checkout@v2

- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Add requirements
run: python -m pip install --upgrade wheel setuptools

- name: Checkout MOOS source
uses: actions/checkout@v2
with:
repository: 'russkel/core-moos'
path: '${{ github.workspace }}/core-moos'

- name: 'Run CMake'
uses: lukka/run-cmake@v3
with:
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced
cmakeListsTxtPath: '${{ github.workspace }}/core-moos/CMakeLists.txt'
buildDirectory: '${{ github.workspace }}/core-moos/build'
cmakeBuildType: 'Release'
buildWithCMake: true
cmakeAppendedArgs: '-DBUILD_SHARED_LIBS=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON'

- name: Install MOOS
run: |
cd ${{ github.workspace }}/core-moos/build
cmake --install . --prefix ${{ github.workspace }}/.local
echo "PATH=$PATH:${{ github.workspace }}/.local/bin" >> $GITHUB_ENV
- name: Create setup.cfg
run: |
echo "[build_ext]" >> setup.cfg
echo "include_dirs=${{ github.workspace }}/.local/include" >> setup.cfg
echo "library_dirs=${{ github.workspace }}/.local/lib" >> setup.cfg
cat setup.cfg
- name: Build and install
run: pip install --verbose .

- name: Test
run: python tests/test.py
28 changes: 28 additions & 0 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Publish Release to PyPi

on:
workflow_dispatch:
release:
types:
- published

jobs:
upload_all:
name: Upload to PyPi
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'

steps:
- uses: actions/setup-python@v2

- uses: dsaltares/fetch-gh-release-asset@master
with:
version: "${{ github.event.release.id }}"
regex: true
file: ".*\\.whl"
target: "dist/"

- uses: pypa/gh-action-pypi-publish@v1.4.1
with:
user: __token__
password: ${{ secrets.pypi_password }}
156 changes: 156 additions & 0 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
name: Wheels

on:
push:
tags:
- "**"

jobs:
build_sdist:
name: Build SDist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2

- name: Install deps
run: python -m pip install twine build

- name: Build SDist
run: python -m build -s

- name: Check metadata
run: twine check dist/*

- uses: actions/upload-artifact@v2
with:
name: sdist
path: dist/*.tar.gz


build_wheels:
name: Wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest] # windows-latest,

steps:
- uses: actions/checkout@v2

- uses: actions/setup-python@v2

- name: Set up QEMU
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v1
with:
platforms: all

- name: Checkout MOOS source
uses: actions/checkout@v2
with:
repository: 'russkel/core-moos'
path: '${{ github.workspace }}/core-moos'

- name: 'Run CMake'
uses: lukka/run-cmake@v3
with:
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced
cmakeListsTxtPath: '${{ github.workspace }}/core-moos/CMakeLists.txt'
buildDirectory: '${{ github.workspace }}/core-moos/build'
cmakeBuildType: 'Release'
buildWithCMake: true
cmakeAppendedArgs: '-DBUILD_SHARED_LIBS=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON'

- name: Install MOOS
run: |
cd ${{ github.workspace }}/core-moos/build
cmake --install . --prefix ${{ github.workspace }}/.local/
echo "PATH=$PATH:${{ github.workspace }}/.local/bin" >> $GITHUB_ENV
- name: Create setup.cfg
if: matrix.os == 'macos-latest'
run: |
echo "[build_ext]" >> setup.cfg
echo "include_dirs=${{ github.workspace }}/.local/include" >> setup.cfg
echo "library_dirs=${{ github.workspace }}/.local/lib" >> setup.cfg
cat setup.cfg
# linux cibuildwheel uses a docker image - it maps workspace to /project
- name: Create setup.cfg
if: matrix.os == 'ubuntu-latest'
run: |
echo "[build_ext]" >> setup.cfg
echo "include_dirs=/project/.local/include" >> setup.cfg
echo "library_dirs=/project/moosbuild/lib" >> setup.cfg
cat setup.cfg
- name: Build wheel
if: matrix.os == 'ubuntu-latest'
uses: pypa/cibuildwheel@v2.7.0
env:
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
CIBW_MANYLINUX_I686_IMAGE: manylinux2014
CIBW_MANYLINUX_AARCH64_IMAGE: manylinux2014
CIBW_ARCHS_LINUX: "auto aarch64"
CIBW_BEFORE_ALL: |
mkdir moosbuild;
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON /project/core-moos/;
make;
make install;
CIBW_SKIP: pp*
CIBW_TEST_SKIP: "*"

- name: Build MacOS Wheels
uses: pypa/cibuildwheel@v2.7.0
if: matrix.os == 'macos-latest'
env:
CIBW_SKIP: pp*
CIBW_TEST_SKIP: "*"

- name: Show files
run: ls -lh wheelhouse
shell: bash

- name: Verify clean directory
run: git diff --exit-code
shell: bash

- name: Upload wheels
uses: actions/upload-artifact@v2
with:
name: wheels
path: wheelhouse/*.whl


release:
needs: ['build_wheels', 'build_sdist']
runs-on: ubuntu-latest
if: startsWith(github.event.ref, 'refs/tags/v')
steps:
- uses: actions/download-artifact@v3
with:
name: wheels
path: dist

- uses: actions/download-artifact@v3
with:
name: sdist
path: dist

- uses: olegtarasov/get-tag@v2.1
id: tagName

- name: Create Release
id: create_release
uses: "marvinpinto/action-automatic-releases@v1.2.1"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
draft: true
prerelease: false
title: pymoos ${{ steps.tagName.outputs.tag }}
files: |
dist/*.whl
dist/*.tar.gz
Loading