Browse Source

Initial Travis script for building wheels

iss7
Trevor Irons 4 years ago
parent
commit
24a7936a2d

+ 4
- 2
Modules/FDEM1D/include/DipoleSource.h View File

@@ -13,6 +13,7 @@
13 13
 #ifndef __DIPOLESOURCE_H
14 14
 #define __DIPOLESOURCE_H
15 15
 
16
+#include <memory>
16 17
 #include "LemmaObject.h"
17 18
 #include "LayeredEarthEM.h"
18 19
 
@@ -40,8 +41,9 @@ namespace Lemma {
40 41
     /// \details  More complex sources are constructed from a superposition of
41 42
     ///           dipoles.
42 43
     // ==========================================================================
43
-    class DipoleSource : public std::enable_shared_from_this<DipoleSource>,  LemmaObject {
44
-    //class DipoleSource : public LemmaObject {
44
+    //class DipoleSource : public std::enable_shared_from_this<DipoleSource>,  LemmaObject {
45
+    class DipoleSource : public LemmaObject, std::enable_shared_from_this<DipoleSource> {
46
+    //class DipoleSource : public LemmaObject, private std::enable_shared_from_this<DipoleSource> {
45 47
 
46 48
         // ====================    FRIENDS     ======================
47 49
 

+ 4
- 1
Modules/FDEM1D/src/DipoleSource.cpp View File

@@ -279,6 +279,8 @@ namespace Lemma {
279 279
             KernelManager->SetEarth(Earth);
280 280
             // alternative is to use weak_ptr here, this is deep and internal, and we are safe.
281 281
             KernelManager->SetDipoleSource( shared_from_this().get() , ifreq, Receivers->GetLocation(irec)[2]);
282
+
283
+            //KernelManager->SetDipoleSource( this.get() , ifreq, Receivers->GetLocation(irec)[2] );
282 284
             kernelFreq = Freqs(ifreq); // this is never used
283 285
 
284 286
         ReSetKernels( ifreq, Fields, Receivers, irec, Earth );
@@ -288,7 +290,8 @@ namespace Lemma {
288 290
 
289 291
     // TODO we could make the dipoles template specializations avoiding this rats nest of switch statements. Probably
290 292
     //      not the most critical piece though
291
-    void DipoleSource::ReSetKernels(const int& ifreq, const FIELDCALCULATIONS&  Fields , std::shared_ptr<FieldPoints> Receivers, const int& irec,
293
+    void DipoleSource::ReSetKernels(const int& ifreq, const FIELDCALCULATIONS&  Fields ,
294
+            std::shared_ptr<FieldPoints> Receivers, const int& irec,
292 295
             std::shared_ptr<LayeredEarthEM> Earth  ) {
293 296
 
294 297
         Vector3r Pol = Phat;

+ 3
- 2
Modules/FDEM1D/src/KernelEM1DManager.cpp View File

@@ -51,8 +51,9 @@ namespace Lemma {
51 51
         Earth = Earthin;
52 52
     }
53 53
 
54
-    void KernelEM1DManager::SetDipoleSource( DipoleSource* DipoleIn, const int& ifreqin,
55
-            const Real& rx_zin) {
54
+    void KernelEM1DManager::SetDipoleSource( DipoleSource* DipoleIn,
55
+                                             const int& ifreqin,
56
+                                             const Real& rx_zin) {
56 57
         Dipole = DipoleIn;
57 58
 
58 59
         ifreq = ifreqin;

+ 21
- 0
python/.travis.yml View File

@@ -0,0 +1,21 @@
1
+notifications:
2
+  email: false
3
+if: tag IS present
4
+matrix:
5
+  include:
6
+  - sudo: required
7
+    services:
8
+      - docker
9
+    env:
10
+      - DOCKER_IMAGE=quay.io/pypa/manylinux1_x86_64
11
+  - sudo: required
12
+    services:
13
+      - docker
14
+    env:
15
+      - DOCKER_IMAGE=quay.io/pypa/manylinux1_i686
16
+      - PRE_CMD=linux32
17
+install:
18
+  - docker pull $DOCKER_IMAGE
19
+script:
20
+  - docker run --rm -v `pwd`:/io -e TWINE_USERNAME -e TWINE_PASSWORD $DOCKER_IMAGE $PRE_CMD /io/travis/build-wheels.sh
21
+  - ls wheelhouse/

Loading…
Cancel
Save