You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@singa.apache.org by ch...@apache.org on 2020/07/15 10:50:16 UTC

[singa] branch dev updated: test C++ on macOS with Github Actions

This is an automated email from the ASF dual-hosted git repository.

chrishkchris pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/singa.git


The following commit(s) were added to refs/heads/dev by this push:
     new 54bbea6  test C++ on macOS with Github Actions
     new 5f4b250  Merge pull request #768 from moazreyad/dev
54bbea6 is described below

commit 54bbea643c4f29744bda732599ba701cea3958a6
Author: Moaz Reyad <mo...@apache.org>
AuthorDate: Wed Jul 15 11:04:55 2020 +0200

    test C++ on macOS with Github Actions
---
 .github/workflows/macOS.yaml   | 15 ++++++++-------
 test/singa/test_tensor_math.cc |  2 ++
 2 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/.github/workflows/macOS.yaml b/.github/workflows/macOS.yaml
index 745d889..ea638bf 100644
--- a/.github/workflows/macOS.yaml
+++ b/.github/workflows/macOS.yaml
@@ -20,7 +20,7 @@ name: macOS
 on:
   push:
   pull_request:
-    
+
 jobs:
   build-macOS-cpu:
     runs-on: macos-latest
@@ -29,16 +29,17 @@ jobs:
       - uses: actions/checkout@v1
       - uses: actions/setup-python@v2
         with:
-          python-version: '3.7' 
-      - name: install-build-dependencies  
+          python-version: "3.7"
+      - name: install-build-dependencies
         run: brew install protobuf swig opencv glog lmdb numpy && pip3 install numpy
-      - name: configure        
-        run: mkdir build && cd build && cmake -DUSE_PYTHON3=YES ..
+      - name: configure
+        run: mkdir build && cd build && cmake -DUSE_PYTHON3=YES -DENABLE_TEST=YES ..
         env:
           CMAKE_INCLUDE_PATH: /usr/local/opt/openblas/include:$CMAKE_INCLUDE_PATH
           CMAKE_LIBRARY_PATH: /usr/local/opt/openblas/lib:$CMAKE_LIBRARY_PATH
       - name: build
         run: cd build && make
         env:
-          CXXFLAGS: -I  /Users/runner/hostedtoolcache/Python/3.7.8/x64/lib/python3.7/site-packages/numpy/core/include $CXXFLAGS 
-       
+          CXXFLAGS: -I  /Users/runner/hostedtoolcache/Python/3.7.8/x64/lib/python3.7/site-packages/numpy/core/include $CXXFLAGS
+      - name: C++ test
+        run: build/bin/test_singa
diff --git a/test/singa/test_tensor_math.cc b/test/singa/test_tensor_math.cc
index b86b3c6..a980f22 100644
--- a/test/singa/test_tensor_math.cc
+++ b/test/singa/test_tensor_math.cc
@@ -16,6 +16,8 @@
  * limitations under the License.
  */
 
+#include <array>
+
 #include "gtest/gtest.h"
 #include "singa/core/tensor.h"
 using singa::Device;