This is an automated email from the ASF dual-hosted git repository.
kou pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-java.git
The following commit(s) were added to refs/heads/main by this push:
new 8f8c62f9 GH-7: Add macOS, Windows CI (#432)
8f8c62f9 is described below
commit 8f8c62f9635742f29bad37620274e768a4b9ff66
Author: David Li <[email protected]>
AuthorDate: Thu Nov 28 19:54:46 2024 -0500
GH-7: Add macOS, Windows CI (#432)
Fixes #7.
Fixes #8.
---
.github/workflows/test.yml | 70 ++++++++++++++++++++++++++++-
.gitignore | 1 -
arrow-format/FlightSql.proto | 2 +-
arrow-format/Schema.fbs | 4 +-
arrow-format/substrait/extension_types.yaml | 3 +-
ci/scripts/java_build.sh | 15 +++++--
dev/release/rat_exclude_files.txt | 1 +
7 files changed, 86 insertions(+), 10 deletions(-)
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index b47404ee..473ce84c 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -61,7 +61,7 @@ jobs:
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
with:
path: .docker
- key: maven-${{ matrix.jdk }}-${{ matrix.maven }}-${{
hashFiles('**/docker-compose.yml') }}
+ key: maven-${{ matrix.jdk }}-${{ matrix.maven }}-${{
hashFiles('**/docker-compose.yml', '**/pom.xml') }}
restore-keys: maven-${{ matrix.jdk }}-${{ matrix.maven }}-
- name: Execute Docker Build
env:
@@ -72,3 +72,71 @@ jobs:
-e CI=true \
-e "DEVELOCITY_ACCESS_KEY=$DEVELOCITY_ACCESS_KEY" \
${{ matrix.image }}
+
+ macos:
+ name: ${{ matrix.arch }} macOS ${{ matrix.macos }} Java JDK ${{ matrix.jdk
}}
+ runs-on: macos-${{ matrix.macos }}
+ if: ${{ !contains(github.event.pull_request.title, 'WIP') }}
+ timeout-minutes: 30
+ strategy:
+ fail-fast: false
+ matrix:
+ include:
+ - arch: AMD64
+ jdk: 11
+ macos: 13
+ - arch: AArch64
+ jdk: 11
+ macos: latest
+ steps:
+ - name: Set up Java
+ uses: actions/setup-java@v4
+ with:
+ distribution: 'temurin'
+ java-version: ${{ matrix.jdk }}
+ - name: Checkout Arrow
+ uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+ submodules: recursive
+ - name: Build
+ shell: bash
+ env:
+ DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
+ run: ci/scripts/java_build.sh $(pwd) $(pwd)/build
+ - name: Test
+ shell: bash
+ env:
+ DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
+ run: ci/scripts/java_test.sh $(pwd) $(pwd)/build
+
+ windows:
+ name: AMD64 Windows Server 2022 Java JDK ${{ matrix.jdk }}
+ runs-on: windows-latest
+ if: ${{ !contains(github.event.pull_request.title, 'WIP') }}
+ timeout-minutes: 30
+ strategy:
+ fail-fast: false
+ matrix:
+ jdk: [11]
+ steps:
+ - name: Set up Java
+ uses: actions/setup-java@v4
+ with:
+ java-version: ${{ matrix.jdk }}
+ distribution: 'temurin'
+ - name: Checkout Arrow
+ uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+ submodules: recursive
+ - name: Build
+ shell: bash
+ env:
+ DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
+ run: ci/scripts/java_build.sh $(pwd) $(pwd)/build
+ - name: Test
+ shell: bash
+ env:
+ DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
+ run: ci/scripts/java_test.sh $(pwd) $(pwd)/build
diff --git a/.gitignore b/.gitignore
index 3ac6ed5f..ca0ac324 100644
--- a/.gitignore
+++ b/.gitignore
@@ -26,4 +26,3 @@ cmake_install.cmake
dependency-reduced-pom.xml
install_manifest.txt
target/
-/.mvn/.develocity/
diff --git a/arrow-format/FlightSql.proto b/arrow-format/FlightSql.proto
index ef1ae751..3568d851 100644
--- a/arrow-format/FlightSql.proto
+++ b/arrow-format/FlightSql.proto
@@ -1857,7 +1857,7 @@ message DoPutPreparedStatementResult {
// statement should be considered invalid, and all subsequent requests for
this prepared
// statement must use this new handle.
// The updated handle allows implementing query parameters with stateless
services.
- //
+ //
// When an updated handle is not provided by the server, clients should
contiue
// using the previous handle provided by
`ActionCreatePreparedStatementResonse`.
optional bytes prepared_statement_handle = 1;
diff --git a/arrow-format/Schema.fbs b/arrow-format/Schema.fbs
index e8e14b11..7ba9aaf7 100644
--- a/arrow-format/Schema.fbs
+++ b/arrow-format/Schema.fbs
@@ -216,14 +216,14 @@ table Bool {
/// Contains two child arrays, run_ends and values.
/// The run_ends child array must be a 16/32/64-bit integer array
-/// which encodes the indices at which the run with the value in
+/// which encodes the indices at which the run with the value in
/// each corresponding index in the values child array ends.
/// Like list/struct types, the value array can be of any type.
table RunEndEncoded {
}
/// Exact decimal value represented as an integer value in two's
-/// complement. Currently 32-bit (4-byte), 64-bit (8-byte),
+/// complement. Currently 32-bit (4-byte), 64-bit (8-byte),
/// 128-bit (16-byte) and 256-bit (32-byte) integers are used.
/// The representation uses the endianness indicated in the Schema.
table Decimal {
diff --git a/arrow-format/substrait/extension_types.yaml
b/arrow-format/substrait/extension_types.yaml
index 0073da1a..4c0ef8ee 100644
--- a/arrow-format/substrait/extension_types.yaml
+++ b/arrow-format/substrait/extension_types.yaml
@@ -48,7 +48,7 @@
# * Functions have the same meaning when applied to the encoded type
#
# Note: if two types have a different range (e.g. string and large_string) then
-# they do not satisfy the above criteria and are not encodings.
+# they do not satisfy the above criteria and are not encodings.
#
# These types will never have a Substrait equivalent. In the Substrait point
# of view these are execution details.
@@ -167,4 +167,3 @@ types:
parameters:
- name: unit
type: string
-
diff --git a/ci/scripts/java_build.sh b/ci/scripts/java_build.sh
index 8441e00c..b5a12d91 100755
--- a/ci/scripts/java_build.sh
+++ b/ci/scripts/java_build.sh
@@ -44,9 +44,18 @@ mkdir -p "${build_dir}/arrow-format"
cp -r "${source_dir}/arrow-format" "${build_dir}"
cp -r "${source_dir}/dev" "${build_dir}"
-for source_root in $(find "${source_dir}" -not \( -path "${source_dir}"/build
-prune \) -type f -name pom.xml -exec realpath -s --relative-to="${source_dir}"
'{}' \; |
- awk -F/ '{print $1}' |
- sort -u); do
+# Instead of hardcoding the list of directories to copy, find pom.xml and then
+# crawl back up to the top. GNU realpath has --relative-to but this does not
+# work on macOS
+
+poms=$(find "${source_dir}" -not \( -path "${source_dir}"/build -prune \)
-type f -name pom.xml)
+if [[ "$OSTYPE" == "darwin"* ]]; then
+ poms=$(echo "$poms" | xargs -n1 python -c "import sys; import os.path;
print(os.path.relpath(sys.argv[1], '${source_dir}'))")
+else
+ poms=$(echo "$poms" | xargs -n1 realpath -s --relative-to="${source_dir}")
+fi
+
+for source_root in $(echo "${poms}" | awk -F/ '{print $1}' | sort -u); do
cp -r "${source_dir}/${source_root}" "${build_dir}"
done
diff --git a/dev/release/rat_exclude_files.txt
b/dev/release/rat_exclude_files.txt
index 76cde307..8efd379a 100644
--- a/dev/release/rat_exclude_files.txt
+++ b/dev/release/rat_exclude_files.txt
@@ -15,4 +15,5 @@
# specific language governing permissions and limitations
# under the License.
+.gitmodules
dataset/src/test/resources/data/student.csv