Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-14: Add JNI CI test #441

Merged
merged 6 commits into from
Dec 4, 2024
Merged

GH-14: Add JNI CI test #441

merged 6 commits into from
Dec 4, 2024

Conversation

lidavidm
Copy link
Member

@lidavidm lidavidm commented Dec 2, 2024

Fixes #14.

@lidavidm lidavidm marked this pull request as ready for review December 2, 2024 09:37
Copy link
Member

@raulcd raulcd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @lidavidm ! LGTM a couple of minor things

# specific language governing permissions and limitations
# under the License.

FROM ghcr.io/mamba-org/micromamba:ubuntu24.04
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm new to the process so this question might be dumb. Do we only build JNI libraries for ubuntu?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, the resulting libraries shouldn't be tied to Ubuntu. But perhaps we should use an older system as a base to avoid potential glibc incompatibility

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In any case, this is for testing and not for building the actual binaries, though

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the explanation! Let me investigate how the actual binaries (for different platforms) are built for a release.

Copy link
Member

@raulcd raulcd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@kou kou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@@ -38,16 +38,21 @@ env:

jobs:
ubuntu:
name: AMD64 Ubuntu 22.04 JDK ${{ matrix.jdk }} Maven ${{ matrix.maven }}
name: ${{ matrix.name }} AMD64 Ubuntu 22.04 JDK ${{ matrix.jdk }} Maven ${{ matrix.maven }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use "Ubuntu 24.04" for conda-java-jni-cdata?
(Or we may want to use just "Ubuntu".)

n_jobs=$(nproc)
;;
Darwin)
n_jobs=$(sysctl -n hw.ncpu)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general, hw.logicalcpu is better than hw.ncpu:

Suggested change
n_jobs=$(sysctl -n hw.ncpu)
n_jobs=$(sysctl -n hw.logicalcpu)

https://developer.apple.com/documentation/kernel/1387446-sysctlbyname/determining_system_capabilities

hw.activecpu

    The number of enabled logical processor cores in the SoC. This is an alias of hw.logicalcpu.
hw.ncpu

    The number of logical processor cores in the SoC. This is an alias of hw.logicalcpu_max.
hw.logicalcpu

    The number of enabled logical processor cores in the SoC. This is an alias of hw.activecpu.
hw.logicalcpu_max

    The number of logical processor cores in the SoC. This is an alias of hw.ncpu.
hw.physicalcpu

    The number of enabled physical processor cores in the SoC.
hw.physicalcpu_max

    The number of physical processor cores in the SoC.


Comment on lines 51 to 52
# docker compose build java-jni-cdata
# docker compose run java-jni-cdata
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# docker compose build java-jni-cdata
# docker compose run java-jni-cdata
# docker compose build conda-java-jni-cdata
# docker compose run conda-java-jni-cdata

/bin/bash -c "
/arrow-java/ci/scripts/java_build.sh /arrow-java /build &&
/arrow-java/ci/scripts/java_test.sh /arrow-java /build"

conda-java-jni-cdata:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may want to remove the -java part because this repository is only for the Java implementation.

@lidavidm
Copy link
Member Author

lidavidm commented Dec 4, 2024

Updated.

maven: [3.9.9]
image: [java, conda-jni-cdata]
include:
- image: java
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we rename this "java" too?
"ubuntu"? Because maven image uses Ubuntu.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated, I also tweaked the CI job names a bit so that "Conda" is in the name.

Copy link
Member

@kou kou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@kou kou merged commit d650aa0 into apache:main Dec 4, 2024
12 checks passed
@lidavidm lidavidm deleted the gh-14 branch December 4, 2024 06:38
@lidavidm lidavidm added this to the 18.2.0 milestone Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add test CI: C data interface
4 participants