Browse Source

Initial Travis script for building wheels

iss7
Trevor Irons 5 years ago
parent
commit
24a7936a2d

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

13
 #ifndef __DIPOLESOURCE_H
13
 #ifndef __DIPOLESOURCE_H
14
 #define __DIPOLESOURCE_H
14
 #define __DIPOLESOURCE_H
15
 
15
 
16
+#include <memory>
16
 #include "LemmaObject.h"
17
 #include "LemmaObject.h"
17
 #include "LayeredEarthEM.h"
18
 #include "LayeredEarthEM.h"
18
 
19
 
40
     /// \details  More complex sources are constructed from a superposition of
41
     /// \details  More complex sources are constructed from a superposition of
41
     ///           dipoles.
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
         // ====================    FRIENDS     ======================
48
         // ====================    FRIENDS     ======================
47
 
49
 

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

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

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

51
         Earth = Earthin;
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
         Dipole = DipoleIn;
57
         Dipole = DipoleIn;
57
 
58
 
58
         ifreq = ifreqin;
59
         ifreq = ifreqin;

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

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