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

twice pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-fury.git


The following commit(s) were added to refs/heads/main by this push:
     new a0b8a704 [CI] Add macos C++ build to ci.yml (#1295)
a0b8a704 is described below

commit a0b8a704d6146afd51b8efd910ef98583cedb9d3
Author: Twice <[email protected]>
AuthorDate: Wed Jan 3 22:45:29 2024 +0800

    [CI] Add macos C++ build to ci.yml (#1295)
    
    macOS C++ build is added to CI workflow in this PR.
---
 .github/workflows/ci.yml          | 39 +++++++++++++++------------------------
 ci/run_ci.sh                      | 18 +++++++++++++-----
 src/fury/meta/type_traits_test.cc |  1 +
 3 files changed, 29 insertions(+), 29 deletions(-)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index fcbfc086..1da0c44a 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -43,35 +43,14 @@ jobs:
       MY_VAR: "PATH"
     strategy:
       matrix:
-        java-version: ["8", "11", "17"]
+        java-version: ["8", "11", "17", "21"]
     steps:
       - uses: actions/checkout@v3
       - name: Set up JDK ${{ matrix.java-version }}
         uses: actions/setup-java@v3
         with:
           java-version: ${{ matrix.java-version }}
-          distribution: 'temurin' # temurin hasn't release for jdk21
-      - name: Install bazel
-        run: ./ci/run_ci.sh install_bazel
-      - name: Install python
-        run: ./ci/run_ci.sh install_python
-      - name: Install pyfury
-        run: ./ci/run_ci.sh install_pyfury
-      - name: Run CI with Maven
-        run: ./ci/run_ci.sh java${{ matrix.java-version }}
-  java21:
-    name: Java CI
-    runs-on: ubuntu-latest
-    strategy:
-      matrix:
-        java-version: ["21"]
-    steps:
-      - uses: actions/checkout@v3
-      - name: Set up JDK ${{ matrix.java-version }}
-        uses: actions/setup-java@v3
-        with:
-          java-version: ${{ matrix.java-version }}
-          distribution: 'oracle'
+          distribution: 'temurin'
       - name: Install bazel
         run: ./ci/run_ci.sh install_bazel
       - name: Install python
@@ -80,6 +59,7 @@ jobs:
         run: ./ci/run_ci.sh install_pyfury
       - name: Run CI with Maven
         run: ./ci/run_ci.sh java${{ matrix.java-version }}
+
   graalvm:
     name: GraalVM CI
     runs-on: ubuntu-latest
@@ -93,6 +73,7 @@ jobs:
           native-image-job-reports: 'true'
       - name: Build native image and run
         run: ./ci/run_ci.sh graalvm_test
+
   scala:
     name: Scala CI
     runs-on: ubuntu-latest
@@ -110,6 +91,7 @@ jobs:
           # Avoid sbt download jackson-databind error
           rm -rf /home/runner/.m2/repository/com/fasterxml/jackson/
           cd scala && sbt +test && cd -
+
   integration_tests:
     name: integration_tests
     runs-on: ubuntu-latest
@@ -126,6 +108,7 @@ jobs:
           cd java/fury-benchmark && mvn -T10 -B --no-transfer-progress clean 
install -DskipTests -Pjmh && cd -
       - name: Run CI
         run: ./ci/run_ci.sh integration_tests
+
   javascript:
     name: Javascript CI
     runs-on: ubuntu-latest
@@ -140,6 +123,7 @@ jobs:
           node-version: ${{ matrix.node-version }}
       - name: Run CI with NodeJS
         run: ./ci/run_ci.sh javascript
+
   rust:
     name: Rust CI
     runs-on: ubuntu-latest
@@ -148,9 +132,13 @@ jobs:
       - uses: actions/checkout@v3
       - uses: dtolnay/rust-toolchain@nightly
       - run: ./ci/run_ci.sh rust
+
   cpp:
     name: C++ CI
-    runs-on: ubuntu-latest
+    strategy:
+      matrix:
+        os: [ubuntu-latest, macos-latest]
+    runs-on: ${{ matrix.os }}
     steps:
       - uses: actions/checkout@v3
       - name: Set up Python 3.8
@@ -161,6 +149,7 @@ jobs:
         run: ./ci/run_ci.sh install_bazel
       - name: Run C++ CI with Bazel
         run: ./ci/run_ci.sh cpp
+
   python:
     name: Python CI
     # Fix python 3.6 install issue, see
@@ -179,6 +168,7 @@ jobs:
         run: ./ci/run_ci.sh install_bazel
       - name: Run Python CI
         run: ./ci/run_ci.sh python
+
   go:
     name: Golang CI
     runs-on: ubuntu-latest
@@ -201,6 +191,7 @@ jobs:
         run: ./ci/run_ci.sh install_pyfury
       - name: Run Golang CI
         run: ./ci/run_ci.sh go
+
   lint:
     name: Code Style Check
     runs-on: ubuntu-latest
diff --git a/ci/run_ci.sh b/ci/run_ci.sh
index 1a7173ac..9d7fc9f4 100755
--- a/ci/run_ci.sh
+++ b/ci/run_ci.sh
@@ -51,7 +51,13 @@ install_bazel() {
     echo "existing bazel version $(bazel version)"
   fi
   # GRPC support bazel 6.3.2 
https://grpc.github.io/grpc/core/md_doc_bazel_support.html
-  
URL="https://github.com/bazelbuild/bazel/releases/download/6.3.2/bazel-6.3.2-installer-linux-x86_64.sh";
+  UNAME_OUT="$(uname -s)"
+  case "${UNAME_OUT}" in
+    Linux*)     MACHINE=linux;;
+    Darwin*)    MACHINE=darwin;;
+    *)          echo "unknown machine: $UNAME_OUT"
+  esac
+  
URL="https://github.com/bazelbuild/bazel/releases/download/6.3.2/bazel-6.3.2-installer-$MACHINE-x86_64.sh";
   wget -q -O install.sh $URL
   chmod +x install.sh
   set +x
@@ -63,10 +69,12 @@ install_bazel() {
   rm -f install.sh
   VERSION=`bazel version`
   echo "bazel version: $VERSION"
-  MEM=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
-  JOBS=`expr $MEM / 1024 / 1024 / 3`
-  echo "build --jobs="$JOBS >> ~/.bazelrc
-  grep "jobs" ~/.bazelrc
+  if [[ "$MACHINE" == linux ]]; then
+    MEM=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
+    JOBS=`expr $MEM / 1024 / 1024 / 3`
+    echo "build --jobs="$JOBS >> ~/.bazelrc
+    grep "jobs" ~/.bazelrc
+  fi
 }
 
 JDKS=(
diff --git a/src/fury/meta/type_traits_test.cc 
b/src/fury/meta/type_traits_test.cc
index 610c3a9d..b3d6bdf7 100644
--- a/src/fury/meta/type_traits_test.cc
+++ b/src/fury/meta/type_traits_test.cc
@@ -23,6 +23,7 @@
 #include <list>
 #include <queue>
 #include <type_traits>
+#include <unordered_map>
 
 #include "fury/meta/field_info.h"
 #include "src/fury/meta/type_traits.h"


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to