You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by xu...@apache.org on 2023/11/24 01:50:11 UTC

(incubator-opendal) 01/01: ci: Add java linux arm64 build

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

xuanwo pushed a commit to branch fix-java-arm64-build
in repository https://gitbox.apache.org/repos/asf/incubator-opendal.git

commit 25f1e97f1c7db9b30c0ebdf800595e8b38b9cfdf
Author: Xuanwo <gi...@xuanwo.io>
AuthorDate: Fri Nov 24 09:49:54 2023 +0800

    ci: Add java linux arm64 build
    
    Signed-off-by: Xuanwo <gi...@xuanwo.io>
---
 .github/workflows/release_java.yml |  20 +++++-
 Cargo.lock                         | 124 ++++---------------------------------
 bindings/java/Cargo.toml           |   4 +-
 core/Cargo.toml                    |   2 +-
 4 files changed, 35 insertions(+), 115 deletions(-)

diff --git a/.github/workflows/release_java.yml b/.github/workflows/release_java.yml
index a095f23a8..a14277946 100644
--- a/.github/workflows/release_java.yml
+++ b/.github/workflows/release_java.yml
@@ -33,6 +33,8 @@ jobs:
         include:
           - os: ubuntu-latest
             classifier: linux-x86_64
+          - os: ubuntu-latest
+            classifier: linux-aarch_64
           - os: windows-latest
             classifier: windows-x86_64
           - os: macos-latest
@@ -60,6 +62,16 @@ jobs:
         with:
           version: "23.4"
           repo-token: ${{ secrets.GITHUB_TOKEN }}
+
+      - name: Setup linux-aarch_64
+        if: "contains(matrix.classifier, 'linux-aarch_64')"
+        run: |
+          sudo apt-get update
+          sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
+          # Setup for cargo
+          echo "[target.aarch64-unknown-linux-gnu]" >> ~/.cargo/config
+          echo "linker = \"aarch64-linux-gnu-gcc\"" >> ~/.cargo/config
+
       - name: Local staging
         working-directory: bindings/java
         shell: bash
@@ -112,11 +124,16 @@ jobs:
         with:
           name: windows-x86_64-local-staging
           path: ~/windows-x86_64-local-staging
-      - name: Download linux staging directory
+      - name: Download linux x864_64 staging directory
         uses: actions/download-artifact@v3
         with:
           name: linux-x86_64-local-staging
           path: ~/linux-x86_64-local-staging
+      - name: Download linux aarch_64 staging directory
+        uses: actions/download-artifact@v3
+        with:
+          name: linux-aarch_64-local-staging
+          path: ~/linux-aarch_64-local-staging
       - name: Download darwin staging directory
         uses: actions/download-artifact@v3
         with:
@@ -137,6 +154,7 @@ jobs:
           bash ./scripts/merge_local_staging.sh $LOCAL_STAGING_DIR/staging \
             ~/windows-x86_64-local-staging/staging \
             ~/linux-x86_64-local-staging/staging \
+            ~/linux-aarch_64-local-staging/staging \
             ~/osx-x86_64-local-staging/staging \
             ~/osx-aarch_64-local-staging/staging
 
diff --git a/Cargo.lock b/Cargo.lock
index 0701ae9b2..b76351f3d 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1055,7 +1055,7 @@ dependencies = [
  "lazycell",
  "log",
  "peeking_take_while",
- "prettyplease 0.2.15",
+ "prettyplease",
  "proc-macro2",
  "quote",
  "regex",
@@ -1078,7 +1078,7 @@ dependencies = [
  "lazycell",
  "log",
  "peeking_take_while",
- "prettyplease 0.2.15",
+ "prettyplease",
  "proc-macro2",
  "quote",
  "regex",
@@ -2462,8 +2462,8 @@ dependencies = [
  "prost 0.12.3",
  "tokio",
  "tokio-stream",
- "tonic 0.10.2",
- "tonic-build 0.10.2",
+ "tonic",
+ "tonic-build",
  "tower",
  "tower-service",
 ]
@@ -5547,16 +5547,6 @@ dependencies = [
  "yansi",
 ]
 
-[[package]]
-name = "prettyplease"
-version = "0.1.25"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6c8646e95016a7a6c4adea95bafa8a16baab64b583356217f2c85db4a39d9a86"
-dependencies = [
- "proc-macro2",
- "syn 1.0.109",
-]
-
 [[package]]
 name = "prettyplease"
 version = "0.2.15"
@@ -5656,7 +5646,6 @@ dependencies = [
  "parking_lot 0.12.1",
  "procfs",
  "protobuf",
- "reqwest",
  "thiserror",
 ]
 
@@ -5703,28 +5692,6 @@ dependencies = [
  "prost-derive 0.12.3",
 ]
 
-[[package]]
-name = "prost-build"
-version = "0.11.9"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "119533552c9a7ffacc21e099c24a0ac8bb19c2a2a3f363de84cd9b844feab270"
-dependencies = [
- "bytes",
- "heck",
- "itertools 0.10.5",
- "lazy_static",
- "log",
- "multimap",
- "petgraph",
- "prettyplease 0.1.25",
- "prost 0.11.9",
- "prost-types 0.11.9",
- "regex",
- "syn 1.0.109",
- "tempfile",
- "which",
-]
-
 [[package]]
 name = "prost-build"
 version = "0.12.3"
@@ -5738,9 +5705,9 @@ dependencies = [
  "multimap",
  "once_cell",
  "petgraph",
- "prettyplease 0.2.15",
+ "prettyplease",
  "prost 0.12.3",
- "prost-types 0.12.3",
+ "prost-types",
  "regex",
  "syn 2.0.39",
  "tempfile",
@@ -5773,15 +5740,6 @@ dependencies = [
  "syn 2.0.39",
 ]
 
-[[package]]
-name = "prost-types"
-version = "0.11.9"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "213622a1460818959ac1181aaeb2dc9c7f63df720db7d788b3e24eacd1983e13"
-dependencies = [
- "prost 0.11.9",
-]
-
 [[package]]
 name = "prost-types"
 version = "0.12.3"
@@ -7402,9 +7360,9 @@ dependencies = [
 
 [[package]]
 name = "tikv-client"
-version = "0.2.0"
+version = "0.3.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9e9a500ec7c937fe18b1d08720406e63f3c7e2de1d7c58d460d3dc21a6656a3b"
+checksum = "048968e4e3d04db472346770cc19914c6b5ae206fa44677f6a0874d54cd05940"
 dependencies = [
  "async-recursion 0.3.2",
  "async-trait",
@@ -7412,12 +7370,11 @@ dependencies = [
  "either",
  "fail",
  "futures",
- "glob",
  "lazy_static",
  "log",
  "pin-project",
  "prometheus",
- "prost 0.11.9",
+ "prost 0.12.3",
  "rand 0.8.5",
  "regex",
  "semver 1.0.20",
@@ -7425,9 +7382,7 @@ dependencies = [
  "serde_derive",
  "thiserror",
  "tokio",
- "tonic 0.9.2",
- "tonic-build 0.9.2",
- "tonic-disable-doctest",
+ "tonic",
 ]
 
 [[package]]
@@ -7715,37 +7670,6 @@ dependencies = [
  "winnow",
 ]
 
-[[package]]
-name = "tonic"
-version = "0.9.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3082666a3a6433f7f511c7192923fa1fe07c69332d3c6a2e6bb040b569199d5a"
-dependencies = [
- "async-stream",
- "async-trait",
- "axum",
- "base64 0.21.5",
- "bytes",
- "futures-core",
- "futures-util",
- "h2",
- "http",
- "http-body",
- "hyper",
- "hyper-timeout",
- "percent-encoding",
- "pin-project",
- "prost 0.11.9",
- "rustls-pemfile",
- "tokio",
- "tokio-rustls",
- "tokio-stream",
- "tower",
- "tower-layer",
- "tower-service",
- "tracing",
-]
-
 [[package]]
 name = "tonic"
 version = "0.10.2"
@@ -7776,43 +7700,19 @@ dependencies = [
  "tracing",
 ]
 
-[[package]]
-name = "tonic-build"
-version = "0.9.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a6fdaae4c2c638bb70fe42803a26fbd6fc6ac8c72f5c59f67ecc2a2dcabf4b07"
-dependencies = [
- "prettyplease 0.1.25",
- "proc-macro2",
- "prost-build 0.11.9",
- "quote",
- "syn 1.0.109",
-]
-
 [[package]]
 name = "tonic-build"
 version = "0.10.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "9d021fc044c18582b9a2408cd0dd05b1596e3ecdb5c4df822bb0183545683889"
 dependencies = [
- "prettyplease 0.2.15",
+ "prettyplease",
  "proc-macro2",
- "prost-build 0.12.3",
+ "prost-build",
  "quote",
  "syn 2.0.39",
 ]
 
-[[package]]
-name = "tonic-disable-doctest"
-version = "0.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "322be90b9db8035feae8d5b26d04dd9146dc4b0eaa6dec32fc9cf68d1a29e806"
-dependencies = [
- "convert_case 0.6.0",
- "itertools 0.10.5",
- "tonic-build 0.9.2",
-]
-
 [[package]]
 name = "tower"
 version = "0.4.13"
diff --git a/bindings/java/Cargo.toml b/bindings/java/Cargo.toml
index 7eae78ec3..6b1484bfc 100644
--- a/bindings/java/Cargo.toml
+++ b/bindings/java/Cargo.toml
@@ -59,6 +59,7 @@ services-all = [
   "services-etcd",
   # FIXME this requires a preinstalled fdb library
   # "services-foundationdb",
+  # FIXME requires openssl.
   # "services-ftp",
   "services-gdrive",
   # FIXME how to support HDFS services in bindings?
@@ -73,7 +74,8 @@ services-all = [
   "services-mysql",
   "services-redb",
   "services-redis",
-  "services-rocksdb",
+  # FIXME has problem during cross compiling.
+  # "services-rocksdb",
   "services-sled",
   "services-supabase",
   "services-tikv",
diff --git a/core/Cargo.toml b/core/Cargo.toml
index 782cde06d..98a10c66f 100644
--- a/core/Cargo.toml
+++ b/core/Cargo.toml
@@ -295,7 +295,7 @@ suppaftp = { version = "5.2", default-features = false, features = [
   "async-rustls",
   "async-native-tls",
 ], optional = true }
-tikv-client = { version = "0.2.0", optional = true, default-features = false }
+tikv-client = { version = "0.3.0", optional = true, default-features = false }
 tokio = "1.27"
 tokio-postgres = { version = "0.7.8", optional = true }
 tracing = { version = "0.1", optional = true }