h3 3.5.0 → 3.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (180) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG.md +45 -0
  3. data/Gemfile.lock +9 -7
  4. data/README.md +8 -8
  5. data/ext/h3/src/.github/workflows/test-linux.yml +118 -0
  6. data/ext/h3/src/.github/workflows/test-macos.yml +42 -0
  7. data/ext/h3/src/.github/workflows/test-website.yml +32 -0
  8. data/ext/h3/src/.github/workflows/test-windows.yml +44 -0
  9. data/ext/h3/src/.gitignore +5 -0
  10. data/ext/h3/src/.travis.yml +21 -32
  11. data/ext/h3/src/CHANGELOG.md +60 -0
  12. data/ext/h3/src/CMakeLists.txt +150 -33
  13. data/ext/h3/src/CONTRIBUTING.md +1 -1
  14. data/ext/h3/src/README.md +65 -16
  15. data/ext/h3/src/RELEASE.md +3 -1
  16. data/ext/h3/src/VERSION +1 -1
  17. data/ext/h3/src/dev-docs/RFCs/rfc-template.md +21 -0
  18. data/ext/h3/src/dev-docs/RFCs/v4.0.0/error-handling-rfc.md +21 -0
  19. data/ext/h3/src/dev-docs/RFCs/v4.0.0/names_for_concepts_types_functions.md +276 -0
  20. data/ext/h3/src/dev-docs/RFCs/v4.0.0/overrideable-allocators-rfc.md +141 -0
  21. data/ext/h3/src/dev-docs/RFCs/v4.0.0/polyfill-modes-rfc.md +21 -0
  22. data/ext/h3/src/dev-docs/RFCs/v4.0.0/vertex-mode-rfc.md +50 -0
  23. data/ext/h3/src/dev-docs/build_windows.md +6 -1
  24. data/ext/h3/src/dev-docs/creating_bindings.md +3 -3
  25. data/ext/h3/src/dev-docs/custom_alloc.md +27 -0
  26. data/ext/h3/src/docs/{overview/mainpage.md → README.md} +2 -3
  27. data/ext/h3/src/docs/api/hierarchy.md +8 -0
  28. data/ext/h3/src/docs/api/misc.md +94 -0
  29. data/ext/h3/src/docs/community/applications.md +1 -0
  30. data/ext/h3/src/docs/community/bindings.md +10 -0
  31. data/ext/h3/src/docs/community/tutorials.md +8 -3
  32. data/ext/h3/src/docs/core-library/coordsystems.md +5 -4
  33. data/ext/h3/src/docs/core-library/filters.md +8 -9
  34. data/ext/h3/src/docs/core-library/geoToH3desc.md +2 -3
  35. data/ext/h3/src/docs/core-library/h3ToGeoBoundaryDesc.md +4 -5
  36. data/ext/h3/src/docs/core-library/h3ToGeoDesc.md +3 -4
  37. data/ext/h3/src/docs/core-library/h3indexing.md +26 -17
  38. data/ext/h3/src/docs/core-library/overview.md +2 -3
  39. data/ext/h3/src/docs/core-library/restable.md +1 -2
  40. data/ext/h3/src/docs/core-library/usage.md +1 -2
  41. data/ext/h3/src/docs/table-of-contents.json +47 -0
  42. data/ext/h3/src/docs/{overview/usecases.md → usecases.md} +6 -11
  43. data/ext/h3/src/scripts/binding_functions.sh +1 -1
  44. data/ext/h3/src/scripts/coverage.sh.in +8 -4
  45. data/ext/h3/src/scripts/update_version.sh +2 -2
  46. data/ext/h3/src/src/apps/applib/include/args.h +1 -0
  47. data/ext/h3/src/src/apps/applib/include/test.h +1 -0
  48. data/ext/h3/src/src/apps/applib/include/utility.h +7 -1
  49. data/ext/h3/src/src/apps/applib/lib/args.c +2 -0
  50. data/ext/h3/src/src/apps/applib/lib/kml.c +2 -0
  51. data/ext/h3/src/src/apps/applib/lib/test.c +1 -0
  52. data/ext/h3/src/src/apps/applib/lib/utility.c +133 -2
  53. data/ext/h3/src/src/apps/benchmarks/benchmarkH3Api.c +1 -1
  54. data/ext/h3/src/{website/html.config.js → src/apps/benchmarks/benchmarkH3UniEdge.c} +15 -12
  55. data/ext/h3/src/src/apps/filters/h3ToComponents.c +1 -0
  56. data/ext/h3/src/src/apps/filters/h3ToGeo.c +1 -0
  57. data/ext/h3/src/src/apps/filters/h3ToGeoBoundary.c +1 -0
  58. data/ext/h3/src/src/apps/filters/h3ToLocalIj.c +1 -0
  59. data/ext/h3/src/src/apps/filters/hexRange.c +1 -0
  60. data/ext/h3/src/src/apps/filters/kRing.c +1 -0
  61. data/ext/h3/src/src/apps/filters/localIjToH3.c +1 -0
  62. data/ext/h3/src/src/apps/miscapps/generateBaseCellNeighbors.c +2 -2
  63. data/ext/h3/src/src/apps/miscapps/generateFaceCenterPoint.c +1 -0
  64. data/ext/h3/src/src/apps/miscapps/generateNumHexagons.c +1 -2
  65. data/ext/h3/src/src/apps/miscapps/generatePentagonDirectionFaces.c +67 -0
  66. data/ext/h3/src/src/apps/miscapps/h3ToGeoBoundaryHier.c +1 -0
  67. data/ext/h3/src/src/apps/miscapps/h3ToGeoHier.c +1 -0
  68. data/ext/h3/src/src/apps/miscapps/h3ToHier.c +1 -0
  69. data/ext/h3/src/src/apps/testapps/mkRandGeo.c +1 -0
  70. data/ext/h3/src/src/apps/testapps/mkRandGeoBoundary.c +1 -0
  71. data/ext/h3/src/src/apps/testapps/testBBox.c +1 -0
  72. data/ext/h3/src/src/apps/testapps/testBaseCells.c +15 -1
  73. data/ext/h3/src/src/apps/testapps/testCompact.c +121 -2
  74. data/ext/h3/src/src/apps/testapps/testCoordIj.c +1 -0
  75. data/ext/h3/src/src/apps/testapps/testGeoCoord.c +47 -8
  76. data/ext/h3/src/src/apps/testapps/testGeoToH3.c +1 -0
  77. data/ext/h3/src/src/apps/testapps/testH3Api.c +1 -0
  78. data/ext/h3/src/src/apps/testapps/testH3CellArea.c +47 -0
  79. data/ext/h3/src/src/apps/testapps/testH3CellAreaExhaustive.c +180 -0
  80. data/ext/h3/src/src/apps/testapps/testH3Distance.c +2 -50
  81. data/ext/h3/src/src/apps/testapps/testH3DistanceExhaustive.c +84 -0
  82. data/ext/h3/src/src/apps/testapps/testH3GetFaces.c +1 -0
  83. data/ext/h3/src/src/apps/testapps/testH3Index.c +33 -3
  84. data/ext/h3/src/src/apps/testapps/testH3Line.c +2 -84
  85. data/ext/h3/src/src/apps/testapps/testH3LineExhaustive.c +115 -0
  86. data/ext/h3/src/src/apps/testapps/testH3Memory.c +175 -0
  87. data/ext/h3/src/src/apps/testapps/testH3NeighborRotations.c +1 -0
  88. data/ext/h3/src/src/apps/testapps/testH3SetToLinkedGeo.c +1 -0
  89. data/ext/h3/src/src/apps/testapps/testH3SetToVertexGraph.c +1 -0
  90. data/ext/h3/src/src/apps/testapps/testH3ToCenterChild.c +68 -0
  91. data/ext/h3/src/src/apps/testapps/testH3ToChildren.c +15 -2
  92. data/ext/h3/src/src/apps/testapps/testH3ToGeo.c +1 -0
  93. data/ext/h3/src/src/apps/testapps/testH3ToGeoBoundary.c +1 -0
  94. data/ext/h3/src/src/apps/testapps/testH3ToLocalIj.c +24 -236
  95. data/ext/h3/src/src/apps/testapps/testH3ToLocalIjExhaustive.c +265 -0
  96. data/ext/h3/src/src/apps/testapps/testH3ToParent.c +1 -0
  97. data/ext/h3/src/src/apps/testapps/testH3UniEdge.c +45 -16
  98. data/ext/h3/src/src/apps/testapps/testH3UniEdgeExhaustive.c +111 -0
  99. data/ext/h3/src/src/apps/testapps/testHexRanges.c +1 -0
  100. data/ext/h3/src/src/apps/testapps/testHexRing.c +1 -0
  101. data/ext/h3/src/src/apps/testapps/testKRing.c +1 -0
  102. data/ext/h3/src/src/apps/testapps/testLinkedGeo.c +1 -0
  103. data/ext/h3/src/src/apps/testapps/testMaxH3ToChildrenSize.c +1 -0
  104. data/ext/h3/src/src/apps/testapps/testPentagonIndexes.c +58 -0
  105. data/ext/h3/src/src/apps/testapps/testPolyfill.c +72 -9
  106. data/ext/h3/src/src/apps/testapps/testPolyfillReported.c +157 -0
  107. data/ext/h3/src/src/apps/testapps/testPolygon.c +27 -1
  108. data/ext/h3/src/src/apps/testapps/testVec2d.c +1 -0
  109. data/ext/h3/src/src/apps/testapps/testVec3d.c +1 -0
  110. data/ext/h3/src/src/apps/testapps/testVertex.c +66 -0
  111. data/ext/h3/src/src/apps/testapps/testVertexGraph.c +1 -0
  112. data/ext/h3/src/src/h3lib/include/algos.h +8 -0
  113. data/ext/h3/src/src/h3lib/include/alloc.h +40 -0
  114. data/ext/h3/src/src/h3lib/include/baseCells.h +4 -0
  115. data/ext/h3/src/src/h3lib/include/bbox.h +4 -1
  116. data/ext/h3/src/src/h3lib/include/constants.h +2 -0
  117. data/ext/h3/src/src/h3lib/include/faceijk.h +3 -2
  118. data/ext/h3/src/src/h3lib/include/geoCoord.h +2 -3
  119. data/ext/h3/src/src/h3lib/include/h3Index.h +37 -4
  120. data/ext/h3/src/src/h3lib/include/h3api.h.in +85 -17
  121. data/ext/h3/src/src/h3lib/include/linkedGeo.h +1 -0
  122. data/ext/h3/src/src/h3lib/include/polygon.h +1 -0
  123. data/ext/h3/src/src/h3lib/include/polygonAlgos.h +1 -0
  124. data/ext/h3/src/src/h3lib/include/vertex.h +44 -0
  125. data/ext/h3/src/src/h3lib/include/vertexGraph.h +1 -0
  126. data/ext/h3/src/src/h3lib/lib/algos.c +305 -80
  127. data/ext/h3/src/src/h3lib/lib/baseCells.c +26 -4
  128. data/ext/h3/src/src/h3lib/lib/bbox.c +56 -27
  129. data/ext/h3/src/src/h3lib/lib/coordijk.c +2 -0
  130. data/ext/h3/src/src/h3lib/lib/faceijk.c +35 -24
  131. data/ext/h3/src/src/h3lib/lib/geoCoord.c +162 -44
  132. data/ext/h3/src/src/h3lib/lib/h3Index.c +150 -46
  133. data/ext/h3/src/src/h3lib/lib/h3UniEdge.c +42 -57
  134. data/ext/h3/src/src/h3lib/lib/linkedGeo.c +20 -15
  135. data/ext/h3/src/src/h3lib/lib/localij.c +5 -5
  136. data/ext/h3/src/src/h3lib/lib/polygon.c +3 -2
  137. data/ext/h3/src/src/h3lib/lib/vec2d.c +1 -0
  138. data/ext/h3/src/src/h3lib/lib/vec3d.c +1 -0
  139. data/ext/h3/src/src/h3lib/lib/vertex.c +134 -0
  140. data/ext/h3/src/src/h3lib/lib/vertexGraph.c +8 -5
  141. data/ext/h3/src/website/.eslintignore +2 -0
  142. data/ext/h3/src/website/.gitignore +57 -0
  143. data/ext/h3/src/website/.nvmrc +1 -0
  144. data/ext/h3/src/website/README.md +8 -6
  145. data/ext/h3/src/website/gatsby-config.js +83 -0
  146. data/ext/h3/src/website/package.json +20 -12
  147. data/ext/h3/src/website/scripts/build-to-gh-pages.sh +7 -5
  148. data/ext/h3/src/website/src/.gitkeep +0 -0
  149. data/ext/h3/src/website/templates/documentation.jsx +129 -0
  150. data/ext/h3/src/website/yarn.lock +13723 -0
  151. data/h3.gemspec +1 -0
  152. data/lib/h3.rb +8 -23
  153. data/lib/h3/bindings/base.rb +15 -4
  154. data/lib/h3/bindings/private.rb +13 -9
  155. data/lib/h3/geo_json.rb +1 -1
  156. data/lib/h3/hierarchy.rb +24 -9
  157. data/lib/h3/indexing.rb +7 -7
  158. data/lib/h3/inspection.rb +22 -26
  159. data/lib/h3/miscellaneous.rb +157 -9
  160. data/lib/h3/regions.rb +3 -0
  161. data/lib/h3/traversal.rb +9 -9
  162. data/lib/h3/unidirectional_edges.rb +18 -18
  163. data/lib/h3/version.rb +1 -1
  164. data/spec/geo_json_spec.rb +8 -0
  165. data/spec/hierarchy_spec.rb +23 -13
  166. data/spec/indexing_spec.rb +15 -15
  167. data/spec/inspection_spec.rb +17 -17
  168. data/spec/miscellaneous_spec.rb +151 -6
  169. data/spec/{region_spec.rb → regions_spec.rb} +1 -1
  170. data/spec/traversal_spec.rb +6 -6
  171. data/spec/unidirectional_edges_spec.rb +18 -18
  172. metadata +55 -15
  173. data/ext/h3/src/.ycm_extra_conf.py +0 -92
  174. data/ext/h3/src/appveyor.yml +0 -50
  175. data/ext/h3/src/website/src/config.js +0 -46
  176. data/ext/h3/src/website/src/mdRoutes.js +0 -151
  177. data/ext/h3/src/website/src/styles/_variables.scss +0 -16
  178. data/ext/h3/src/website/src/styles/index.scss +0 -3
  179. data/ext/h3/src/website/static/index.html +0 -15
  180. data/lib/h3/bindings.rb +0 -12
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA256:
3
- metadata.gz: 95994576b5df069470128bda24d6768b3c8d5fe9ee61ebf0b5f4f16126f64208
4
- data.tar.gz: a439783870113f4101d00a3fb94c8f4fec978ddabc55410531aa3e0f3c787fdd
2
+ SHA1:
3
+ metadata.gz: a2e10e1deba82674a8ea642385fdbd753ba86860
4
+ data.tar.gz: df8a3687f67e5ebfa8432ce1c456b7c038a2de50
5
5
  SHA512:
6
- metadata.gz: 6315cd5682f58cf7384b67fbf8dd4cba4eaa59ccbede04386a94d526b26d593dd0a92df2c4446dc5ff3a662622acbede640d63bae7345c64be0225b92c81d244
7
- data.tar.gz: 9b543348c2c66cc8a441ba42e27503d8ace2b83b6714b577e5531a1cb29cb28810a5e816b90adda4a344a2082ed6e4623a25f10b7126a648498fe200787b930e
6
+ metadata.gz: f4b83e62d5b0cea99238ad0c04e06e906b73a4d871c6fb0205994ec493036cbd56561184c0998b6e04f81bd0c7af27eff37e82e7c4da7f5d6a5ca214b14b4bd1
7
+ data.tar.gz: 33d956b62f5e0a465efebc8014bd03c05743e9e013fbdbbfd52ff6da94a448728c1677b69ba8ff23f26eab6a166f8d62ecd537a9d3a160ff480a311e7f9c5457
@@ -6,6 +6,51 @@ This project adheres to [Semantic Versioning](http://semver.org/).
6
6
 
7
7
  We track the MAJOR and MINOR version levels of Uber's H3 project (https://github.com/uber/h3) but maintain independent patch levels so we can make small fixes and non breaking changes.
8
8
 
9
+ ## [3.7.1] - 2020-10-7
10
+ ### Added
11
+ - Area and haversine distance functions:
12
+ - `cellAreaRads2`
13
+ - `cellAreaKm2`
14
+ - `cellAreaM2`
15
+ - `pointDistRads`
16
+ - `pointDistKm`
17
+ - `pointDistM`
18
+ - `exactEdgeLengthRads`
19
+ - `exactEdgeLengthKm`
20
+ - `exactEdgeLengthM`
21
+
22
+ ### Changed
23
+ - Speeds up `getH3UnidirectionalEdgeBoundary` by about 3x.
24
+
25
+ ### Fixed
26
+ - Finding invalid edge boundaries should not crash.
27
+
28
+ ## [3.6.4] - 2020-7-2
29
+ ### Changed
30
+ - Reinstate new `polyfill` algorithm for up to 3x perf boost.
31
+
32
+ ## [3.6.2] - 2020-1-8
33
+ ### Changed
34
+ - Revert new polyfill algorithm until reported issues are fixed.
35
+ - Remove deprecated methods: (#66)
36
+
37
+ ## [3.6.1] - 2019-11-23
38
+ ### Fixed
39
+ - `compact` handles zero length input correctly.
40
+ - `bboxHexRadius` scaling factor adjusted to guarantee containment for `polyfill`.
41
+ - `polyfill` new algorithm for up to 3x perf boost.
42
+ - Fix CMake targets for KML generation.
43
+
44
+ ## [3.6.0] - 2019-8-14
45
+ ### Added
46
+ - `center_child` method to find center child at given resolution (#62).
47
+ - `pentagons` (and `pentagon_count`) method to find pentagons at given resolution (#62).
48
+
49
+ ## [3.5.1] - 2019-8-5
50
+ ### Changed
51
+ - Renamed 26 methods to be more idiomatic with Ruby conventions. The old names are deprecated until 2020 when they will be removed (#59).
52
+ - Added Zeitwerk as the code loader.
53
+
9
54
  ## [3.5.0] - 2019-7-25
10
55
  ### Added
11
56
  - `h3_faces` and `max_face_count` support (#56)
@@ -1,9 +1,10 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- h3 (3.5.0)
4
+ h3 (3.7.1)
5
5
  ffi (~> 1.9)
6
6
  rgeo-geojson (~> 2.1)
7
+ zeitwerk (~> 2.1)
7
8
 
8
9
  GEM
9
10
  remote: https://rubygems.org/
@@ -16,10 +17,10 @@ GEM
16
17
  tins (~> 1.6)
17
18
  diff-lcs (1.3)
18
19
  docile (1.3.1)
19
- ffi (1.10.0)
20
- json (2.1.0)
21
- rake (12.3.2)
22
- rgeo (2.0.0)
20
+ ffi (1.13.1)
21
+ json (2.3.1)
22
+ rake (12.3.3)
23
+ rgeo (2.1.1)
23
24
  rgeo-geojson (2.1.1)
24
25
  rgeo (>= 1.0.0)
25
26
  rspec (3.8.0)
@@ -44,7 +45,8 @@ GEM
44
45
  tins (~> 1.0)
45
46
  thor (0.19.4)
46
47
  tins (1.20.2)
47
- yard (0.9.16)
48
+ yard (0.9.20)
49
+ zeitwerk (2.4.0)
48
50
 
49
51
  PLATFORMS
50
52
  ruby
@@ -57,4 +59,4 @@ DEPENDENCIES
57
59
  yard (~> 0.9)
58
60
 
59
61
  BUNDLED WITH
60
- 1.17.2
62
+ 2.1.4
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  ![h3](https://user-images.githubusercontent.com/98526/50283275-48177300-044d-11e9-8337-eba8d3cc88a2.png)
4
4
 
5
- [![Build Status](https://travis-ci.org/StuartApp/h3_ruby.svg?branch=master)](https://travis-ci.org/seanhandley/h3_ruby)
5
+ [![Build Status](https://travis-ci.org/StuartApp/h3_ruby.svg?branch=master)](https://travis-ci.org/StuartApp/h3_ruby)
6
6
  [![Maintainability](https://api.codeclimate.com/v1/badges/74a47e7fa516588ab545/maintainability)](https://codeclimate.com/repos/5ca38395a86379029800281f/maintainability) [![Coverage Status](https://coveralls.io/repos/github/StuartApp/h3_ruby/badge.svg?branch=master)](https://coveralls.io/github/StuartApp/h3_ruby?branch=master) [![Gem Version](https://badge.fury.io/rb/h3.svg)](https://badge.fury.io/rb/h3)
7
7
 
8
8
  Ruby-to-C bindings for Uber's [H3 library](https://uber.github.io/h3/).
@@ -11,15 +11,15 @@ Please consult [the H3 documentation](https://uber.github.io/h3/#/documentation/
11
11
 
12
12
  ## Supported H3 Versions
13
13
 
14
- The semantic versioning of this gem matches the versioning of the H3 C library. E.g. version `3.2.x` of this gem is targeted for version `3.2.y` of H3 C lib where `x` and `y` are independent patch levels.
14
+ The semantic versioning of this gem matches the versioning of the H3 C library. E.g. version `3.5.x` of this gem is targeted for version `3.5.y` of H3 C lib where `x` and `y` are independent patch levels.
15
15
 
16
16
  ## Naming Conventions
17
17
 
18
18
  We have changed camel-case method names to snake-case, as per the Ruby convention.
19
19
 
20
- In addition, some methods using the `get` verb have been renamed i.e. `getH3UnidirectionalEdgesFromHexagon` becomes `h3_unidirectional_edges_from_hexagon`.
20
+ In addition, some methods using the `get` verb have been renamed i.e. `getH3UnidirectionalEdgesFromHexagon` becomes `unidirectional_edges_from_hexagon`.
21
21
 
22
- We have also suffixed predicate methods with a question mark, as per the Ruby convention, and removed `is` from the name i.e. `h3IsPentagon` becomes `h3_pentagon?`
22
+ We have also suffixed predicate methods with a question mark, as per the Ruby convention, and removed `h3Is` from the name i.e. `h3IsPentagon` becomes `pentagon?`
23
23
 
24
24
  ## Getting Started
25
25
 
@@ -53,13 +53,13 @@ require "h3"
53
53
  Call H3 functions via the `H3` namespace
54
54
 
55
55
  ```ruby
56
- H3.geo_to_h3([53.959130, -1.079230], 8).to_s(16)
56
+ H3.from_geo_coordinates([53.959130, -1.079230], 8).to_s(16)
57
57
  => "8819429a9dfffff"
58
- H3.h3_valid?("8819429a9dfffff".to_i(16))
58
+ H3.valid?("8819429a9dfffff".to_i(16))
59
59
  => true
60
- H3.h3_pentagon?("8819429a9dfffff".to_i(16))
60
+ H3.pentagon?("8819429a9dfffff".to_i(16))
61
61
  => false
62
- H3.h3_to_geo_boundary("8819429a9dfffff".to_i(16))
62
+ H3.to_boundary("8819429a9dfffff".to_i(16))
63
63
  => [[53.962987505331384, -1.079984346847996], [53.9618315234061, -1.0870313428985856], [53.95744798515881, -1.0882421079017874], [53.95422067486053, -1.082406760751464], [53.955376670617454, -1.0753609232787642], [53.95975996282198, -1.074149274503605]]
64
64
  ```
65
65
 
@@ -0,0 +1,118 @@
1
+ name: test-linux
2
+
3
+ on:
4
+ push:
5
+ branches: [master]
6
+ pull_request:
7
+ branches: [master]
8
+
9
+ jobs:
10
+ tests:
11
+ name: Test Compile ${{ matrix.compiler }}
12
+ runs-on: ubuntu-latest
13
+ env:
14
+ CC: ${{ matrix.compiler }}
15
+
16
+ strategy:
17
+ matrix:
18
+ compiler: [clang, gcc]
19
+
20
+ steps:
21
+ - uses: actions/checkout@v2.1.1
22
+
23
+ - name: Install Doxygen
24
+ run: |
25
+ sudo apt update
26
+ sudo apt-get install doxygen graphviz
27
+
28
+ - name: Configure build
29
+ run: cmake -Bbuild -DWARNINGS_AS_ERRORS=ON .
30
+
31
+ - name: Formatting check
32
+ working-directory: build
33
+ run: |
34
+ clang-format-9 --version
35
+ make format
36
+ git diff --exit-code
37
+
38
+ - name: Build
39
+ working-directory: build
40
+ run: make
41
+
42
+ - name: binding-functions
43
+ working-directory: build
44
+ run: |
45
+ make binding-functions
46
+ test -s binding-functions
47
+
48
+ - name: Tests
49
+ working-directory: build
50
+ run: |
51
+ make test
52
+ sudo make install
53
+
54
+ # Note the packages aren't used to test the examples below
55
+ - name: Test packaging
56
+ working-directory: build
57
+ run: cpack -D CPACK_PACKAGE_CONTACT="Test build in CI"
58
+
59
+ - name: Examples
60
+ run: |
61
+ mkdir build/examples
62
+ cd build/examples
63
+ cmake ../../examples
64
+ make
65
+ make test
66
+
67
+ valgrind-tests:
68
+ name: Test Valgrind
69
+ runs-on: ubuntu-latest
70
+
71
+ steps:
72
+ - uses: actions/checkout@v2.1.1
73
+
74
+ - name: Install Valgrind
75
+ run: |
76
+ sudo apt update
77
+ sudo apt-get install valgrind
78
+
79
+ - name: Configure build
80
+ run: cmake -Bbuild -DCMAKE_BUILD_TYPE=Debug -DWRAP_VALGRIND=ON .
81
+
82
+ - name: Build
83
+ working-directory: build
84
+ run: make
85
+
86
+ - name: Tests
87
+ working-directory: build
88
+ env:
89
+ CTEST_OUTPUT_ON_FAILURE: 1
90
+ run: make test-fast
91
+
92
+ coverage-tests:
93
+ name: Coverage
94
+ runs-on: ubuntu-latest
95
+ env:
96
+ CC: gcc
97
+
98
+ steps:
99
+ - uses: actions/checkout@v2.1.1
100
+
101
+ - name: Install lcov
102
+ run: |
103
+ sudo apt update
104
+ sudo apt-get install lcov
105
+
106
+ - name: Configure build
107
+ run: cmake -DCMAKE_BUILD_TYPE=Debug -DWARNINGS_AS_ERRORS=ON -DH3_PREFIX=testprefix_ .
108
+
109
+ - name: Build
110
+ run: make
111
+
112
+ - name: Tests
113
+ run: make coverage
114
+
115
+ - uses: coverallsapp/github-action@master
116
+ with:
117
+ path-to-lcov: ./coverage.cleaned.info
118
+ github-token: ${{ secrets.GITHUB_TOKEN }}
@@ -0,0 +1,42 @@
1
+ name: test-macos
2
+
3
+ on:
4
+ push:
5
+ branches: [master]
6
+ pull_request:
7
+ branches: [master]
8
+
9
+ jobs:
10
+ tests:
11
+ name: Test Compile ${{ matrix.compiler }}
12
+ runs-on: macos-latest
13
+
14
+ steps:
15
+ - uses: actions/checkout@v2.1.1
16
+
17
+ - name: Configure build
18
+ run: cmake -Bbuild -DWARNINGS_AS_ERRORS=ON .
19
+
20
+ - name: Build
21
+ working-directory: build
22
+ run: make
23
+
24
+ - name: binding-functions
25
+ working-directory: build
26
+ run: |
27
+ make binding-functions
28
+ test -s binding-functions
29
+
30
+ - name: Tests
31
+ working-directory: build
32
+ run: |
33
+ make test
34
+ sudo make install
35
+
36
+ - name: Examples
37
+ run: |
38
+ mkdir build/examples
39
+ cd build/examples
40
+ cmake ../../examples
41
+ make
42
+ make test
@@ -0,0 +1,32 @@
1
+ name: test-website
2
+
3
+ on:
4
+ push:
5
+ branches: [master]
6
+ pull_request:
7
+ branches: [master]
8
+
9
+ jobs:
10
+ tests:
11
+ name: Test Website and FOSSA
12
+ runs-on: ubuntu-latest
13
+
14
+ steps:
15
+ - uses: actions/checkout@v2.1.1
16
+
17
+ - uses: actions/setup-node@v1
18
+ with:
19
+ node-version: 10.x
20
+
21
+ - name: Install FOSSA
22
+ run: |
23
+ curl -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install.sh | sudo bash
24
+
25
+ - name: Test Website Build
26
+ working-directory: website
27
+ run: |
28
+ yarn
29
+ yarn build
30
+
31
+ - name: Submit FOSSA report
32
+ run: if [ -n "${{ secrets.FOSSA_API_KEY }}" ]; then fossa; fi
@@ -0,0 +1,44 @@
1
+ name: test-windows
2
+
3
+ on:
4
+ push:
5
+ branches: [master]
6
+ pull_request:
7
+ branches: [master]
8
+
9
+ jobs:
10
+ tests:
11
+ name: Test Compile ${{ matrix.config }} ${{ matrix.arch }}
12
+ runs-on: windows-latest
13
+ env:
14
+ CC: cl.exe
15
+ CXX: cl.exe
16
+
17
+ strategy:
18
+ matrix:
19
+ config: [Release, Debug]
20
+ arch: [Win32, x64]
21
+
22
+ steps:
23
+ - uses: actions/checkout@v2.1.1
24
+
25
+ - name: Configure build
26
+ shell: cmd
27
+ run: cmake -Bbuild -A ${{ matrix.arch }} -DWARNINGS_AS_ERRORS=ON .
28
+
29
+ - name: Build
30
+ working-directory: build
31
+ run: cmake --build . --config ${{ matrix.config }}
32
+
33
+ - name: binding-functions
34
+ working-directory: build
35
+ run: |
36
+ cmake --build . --config ${{ matrix.config }} --target binding-functions
37
+ if ((Get-Item "binding-functions").Length -lt 10) { $host.SetShouldExit(1) }
38
+
39
+ - name: Tests
40
+ working-directory: build
41
+ shell: cmd
42
+ env:
43
+ CTEST_OUTPUT_ON_FAILURE: 1
44
+ run: ctest -C ${{ matrix.config }}
@@ -58,12 +58,16 @@ env_docs/
58
58
  node_modules/
59
59
  website/dist/
60
60
  website/package-lock.json
61
+ website/.cache/
62
+ website/public/
61
63
  # Generated Doxyfile
62
64
  dev-docs/Doxyfile
63
65
 
64
66
  # CMake generated
65
67
  CMakeFiles
66
68
  CMakeCache.txt
69
+ CPackConfig.cmake
70
+ CPackSourceConfig.cmake
67
71
  Makefile
68
72
  cmake_install.cmake
69
73
  install_manifest.txt
@@ -90,6 +94,7 @@ coverage.cleaned.info
90
94
  *.cbp
91
95
  .idea
92
96
  .vscode
97
+ .ipynb_checkpoints
93
98
 
94
99
  # Generated by `make binding-functions`
95
100
  binding-functions
@@ -1,4 +1,4 @@
1
- # Copyright 2018 Uber Technologies, Inc.
1
+ # Copyright 2018-2019 Uber Technologies, Inc.
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -15,12 +15,17 @@
15
15
  language: c
16
16
 
17
17
  os: linux
18
- dist: trusty
18
+ dist: bionic
19
19
 
20
20
  compiler:
21
21
  - gcc
22
22
  - clang
23
23
 
24
+ arch:
25
+ - arm64
26
+ - ppc64le
27
+ - s390x
28
+
24
29
  # Docs are built during the normal compile/test check.
25
30
  addons:
26
31
  apt:
@@ -30,38 +35,22 @@ addons:
30
35
 
31
36
  matrix:
32
37
  include:
33
- # Check that clang-format doesn't detect some files are not formatted.
34
- - env: NAME="Formatting check"
35
- compiler: clang
36
- addons:
37
- apt:
38
- sources:
39
- - llvm-toolchain-trusty-5.0
40
- packages:
41
- - clang-format-5.0
42
- script: make format && git diff --exit-code
43
- # Submit coverage report to Coveralls.io, also test that prefixing works.
44
- - env: NAME="Coverage report"
45
- compiler: gcc
46
- addons:
47
- apt:
48
- packages:
49
- - lcov
50
- install:
51
- - pip install --user cpp-coveralls
38
+ # Test building the website also - needed for FOSSA to pick up dependencies
39
+ # FOSSA is run here because the API key will not be present in Github Actions.
40
+ # Blocked on https://github.com/fossas/fossa-cli/issues/617
41
+ - name: "Website and FOSSA report"
42
+ arch: amd64
43
+ language: node_js
44
+ node_js: 10
45
+ install: []
52
46
  before_script:
53
- - cmake -DCMAKE_BUILD_TYPE=Debug -DWARNINGS_AS_ERRORS=ON -DH3_PREFIX=testprefix_ .
54
- script:
55
- - make && make coverage
56
- after_success:
57
- - coveralls --lcov-file coverage.cleaned.info --verbose
58
- - env: NAME="Mac OSX (Xcode 8)"
59
- os: osx
60
- - env: NAME="binding-functions target"
47
+ - "curl -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install.sh | sudo bash"
61
48
  script:
62
- - make binding-functions
63
- # Check that the file exists and has contents
64
- - test -s binding-functions
49
+ - cd website
50
+ - yarn
51
+ - yarn build
52
+ - cd ..
53
+ - 'if [ -n "$FOSSA_API_KEY" ]; then fossa; fi'
65
54
 
66
55
  # Configure the build script, out of source.
67
56
  before_script: