Skip to content

Commit f936c31

Browse files
GH-1429: Match macOS JNI source selection to Linux (#1430)
Use the latest Apache Arrow C++ release for non-scheduled macOS JNI builds, matching the Linux jobs. Scheduled builds continue using `main`, and the macOS job runs `TestFileSystemDataset#testBaseJsonRead` against its JNI library to catch JSON parser crashes. Closes #1429. The test was reproduced against the macOS JNI artifact from run 41256646402 and terminated the JVM in `ResolveSimdjsonResult`. AI assistance was used to prepare this workflow change and regression test. --------- Co-authored-by: JB Onofré <jb@nanthrax.net>
1 parent eb95fea commit f936c31

3 files changed

Lines changed: 19 additions & 0 deletions

File tree

‎.github/workflows/rc.yml‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ jobs:
120120
uses: actions/checkout@v7
121121
with:
122122
repository: apache/arrow
123+
ref: main
123124
path: arrow
124125
- name: Checkout apache/arrow-testing
125126
uses: actions/checkout@v7
@@ -178,7 +179,12 @@ jobs:
178179
- name: Extract source archive
179180
run: |
180181
tar -xf apache-arrow-java-*.tar.gz --strip-components=1
182+
- name: Download the latest Apache Arrow C++
183+
if: github.event_name != 'schedule'
184+
run: |
185+
ci/scripts/download_cpp.sh
181186
- name: Checkout Apache Arrow C++
187+
if: github.event_name == 'schedule'
182188
uses: actions/checkout@v7
183189
with:
184190
repository: apache/arrow
@@ -267,6 +273,16 @@ jobs:
267273
# make brew Java available to CMake
268274
export JAVA_HOME=$(brew --prefix openjdk@17)/libexec/openjdk.jdk/Contents/Home
269275
ci/scripts/jni_macos_build.sh . arrow build jni
276+
- name: Test JSON dataset read
277+
run: |
278+
JAVA_HOME="$(brew --prefix openjdk@17)/libexec/openjdk.jdk/Contents/Home"
279+
export JAVA_HOME
280+
# Install dependencies without applying the dataset-only test filter to them.
281+
mvn -Parrow-jni -pl dataset -am install -DskipTests \
282+
-Darrow.c.jni.dist.dir="$PWD/jni" -Darrow.cpp.build.dir="$PWD/jni"
283+
mvn -Parrow-jni -pl dataset test \
284+
-Darrow.c.jni.dist.dir="$PWD/jni" -Darrow.cpp.build.dir="$PWD/jni" \
285+
-Dtest='TestFileSystemDataset#testBaseJsonRead' -DfailIfNoTests=true
270286
- name: Compress into single artifact to keep directory structure
271287
run: tar -cvzf jni-macos-${{ matrix.platform.arch }}.tar.gz jni/
272288
- name: Upload artifacts

‎Brewfile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,5 @@
1616
# under the License.
1717

1818
brew "openjdk@17"
19+
brew "maven"
1920
brew "sccache"

‎ci/scripts/jni_macos_build.sh‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ export ARROW_BUILD_TESTS=OFF
6464

6565
export ARROW_DATASET=ON
6666
export ARROW_GANDIVA=ON
67+
export ARROW_JSON=ON
6768
export ARROW_ORC=ON
6869
export ARROW_PARQUET=ON
6970

@@ -73,6 +74,7 @@ cmake \
7374
-S "${arrow_dir}/cpp" \
7475
-B "${build_dir}/cpp" \
7576
--preset=ninja-release-jni-macos \
77+
-DARROW_JSON="${ARROW_JSON}" \
7678
-Dabsl_SOURCE=BUNDLED \
7779
-Dlz4_SOURCE=BUNDLED \
7880
-Dsimdjson_SOURCE=BUNDLED \

0 commit comments

Comments
 (0)