davisusanibar commented on a change in pull request #138:
URL: https://github.com/apache/arrow-cookbook/pull/138#discussion_r801674424



##########
File path: .github/workflows/test_javajni_cookbook.yml
##########
@@ -0,0 +1,78 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+name: Test Java JNI Cookbook
+
+on:
+  pull_request:
+    branches:
+       - main
+    paths:
+     - "java/**"
+     - ".github/workflows/test_javajni_cookbook.yml"
+     
+concurrency:
+  group: ${{ github.repository }}-${{ github.ref }}-${{ github.workflow }}
+  cancel-in-progress: true
+
+jobs:
+  test_java_jni:
+    name: "Test Java JNI Cookbook"
+    runs-on: macos-latest
+    steps:
+      - uses: actions/checkout@v1
+      - uses: actions/setup-java@v2
+        with:
+          distribution: 'temurin'
+          java-version: '11'
+      - uses: actions/checkout@v2
+      - name: Cache libprotobuf.28.dylib
+        id: cache-libprotobuf
+        uses: actions/cache@v2
+        env:
+          cache-name: cache-lib-protobuf
+        with:
+          path: |
+            /usr/local/opt/protobuf
+            /usr/local/Cellar/protobuf/3.17.3
+          key: ${{ runner.os }}-build-${{ env.cache-name }}
+          restore-keys: |
+            ${{ runner.os }}-build-${{ env.cache-name }}
+            ${{ runner.os }}-build-
+            ${{ runner.os }}-
+      - name: Install jni dependencies
+        run: brew install snappy utf8proc re2 thrift
+      - name: Upgrade pip
+        run: python3 -m pip install --upgrade pip
+      - name: JNI - libarrow_dataset_jni compiled with libprotobuf.28.dylib 
not available at brew formula
+        if: steps.cache-libprotobuf.outputs.cache-hit != 'true'
+        run: |
+          brew install wget
+          wget 
https://raw.githubusercontent.com/davisusanibar/custom-recipes/main/protobuf.rb
+          HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=false brew install -s 
protobuf.rb

Review comment:
       Yes, it take long time to build protobuf all times (1st time it take 
close to 10 minutes), for this reason at the first time we upload this protobuf 
folder libraries to cache with `uses: actions/cache@v2` 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to