Skip to content

Commit 4c02bb3

Browse files
authored
Merge branch 'master' into 6880
2 parents e6b2f0c + 9500936 commit 4c02bb3

File tree

408 files changed

+25982
-3270
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

408 files changed

+25982
-3270
lines changed
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
name: 'Build FAISS Native Library'
2+
description: 'Build FAISS native library for specified platform'
3+
inputs:
4+
platform:
5+
description: 'Target platform (linux-amd64, linux-aarch64, darwin-aarch64)'
6+
required: true
7+
faiss-version:
8+
description: 'FAISS version to build (e.g., 1.7.4)'
9+
required: false
10+
default: '1.7.4'
11+
use-homebrew:
12+
description: 'Whether to use Homebrew for dependencies (macOS)'
13+
required: false
14+
default: 'false'
15+
16+
runs:
17+
using: 'composite'
18+
steps:
19+
- name: Install native dependencies (Linux)
20+
if: inputs.use-homebrew == 'false'
21+
shell: bash
22+
run: |
23+
sudo apt-get update
24+
sudo apt-get install -y \
25+
build-essential \
26+
libopenblas-dev \
27+
liblapack-dev \
28+
patchelf \
29+
libgomp1 \
30+
wget
31+
32+
- name: Install GCC 9 (Linux)
33+
if: inputs.use-homebrew == 'false'
34+
shell: bash
35+
run: |
36+
sudo apt-get install -y gcc-9 g++-9 || sudo apt-get install -y gcc g++
37+
if command -v gcc-9 &>/dev/null; then
38+
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 90
39+
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 90
40+
fi
41+
gcc --version
42+
43+
- name: Install CMake 3.30.1 (Linux)
44+
if: inputs.use-homebrew == 'false'
45+
shell: bash
46+
run: |
47+
CMAKE_VERSION="3.30.1"
48+
if [[ "${{ inputs.platform }}" == *"amd64"* ]]; then
49+
CMAKE_ARCH="x86_64"
50+
else
51+
CMAKE_ARCH="aarch64"
52+
fi
53+
wget -q https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-${CMAKE_ARCH}.tar.gz
54+
tar -xzf cmake-${CMAKE_VERSION}-linux-${CMAKE_ARCH}.tar.gz
55+
sudo mv cmake-${CMAKE_VERSION}-linux-${CMAKE_ARCH} /opt/cmake
56+
sudo ln -sf /opt/cmake/bin/cmake /usr/local/bin/cmake
57+
cmake --version
58+
59+
- name: Install FAISS (Linux)
60+
if: inputs.use-homebrew == 'false'
61+
shell: bash
62+
run: |
63+
git clone --depth 1 --branch v${{ inputs.faiss-version }} https://github.com/facebookresearch/faiss.git /tmp/faiss
64+
cd /tmp/faiss
65+
cmake -B build \
66+
-DFAISS_ENABLE_GPU=OFF \
67+
-DFAISS_ENABLE_PYTHON=OFF \
68+
-DBUILD_TESTING=OFF \
69+
-DCMAKE_BUILD_TYPE=Release
70+
cmake --build build -j $(nproc)
71+
sudo cmake --install build
72+
73+
- name: Install dependencies (macOS)
74+
if: inputs.use-homebrew == 'true'
75+
shell: bash
76+
run: |
77+
brew install cmake libomp openblas faiss
78+
79+
- name: Build native library
80+
shell: bash
81+
run: |
82+
./paimon-faiss/paimon-faiss-jni/scripts/build-native.sh --clean --fat-lib --faiss-version ${{ inputs.faiss-version }}
83+
84+
- name: List built libraries (Linux)
85+
if: inputs.use-homebrew == 'false' && inputs.platform == 'linux-amd64'
86+
shell: bash
87+
run: |
88+
echo "=== Built libraries ==="
89+
ls -la paimon-faiss/paimon-faiss-jni/src/main/resources/linux/amd64/
90+
echo ""
91+
echo "=== Library dependencies ==="
92+
ldd paimon-faiss/paimon-faiss-jni/src/main/resources/linux/amd64/libpaimon_faiss_jni.so || true
93+
94+
- name: List built libraries (Linux AARCH64)
95+
if: inputs.use-homebrew == 'false' && inputs.platform == 'linux-aarch64'
96+
shell: bash
97+
run: |
98+
echo "=== Built libraries ==="
99+
ls -la paimon-faiss/paimon-faiss-jni/src/main/resources/linux/aarch64/
100+
echo ""
101+
echo "=== Library dependencies ==="
102+
ldd paimon-faiss/paimon-faiss-jni/src/main/resources/linux/aarch64/libpaimon_faiss_jni.so || true
103+
104+
- name: List built libraries (macOS)
105+
if: inputs.use-homebrew == 'true'
106+
shell: bash
107+
run: |
108+
echo "=== Built libraries ==="
109+
ls -la paimon-faiss/paimon-faiss-jni/src/main/resources/darwin/aarch64/
110+
echo ""
111+
echo "=== Library dependencies ==="
112+
otool -L paimon-faiss/paimon-faiss-jni/src/main/resources/darwin/aarch64/libpaimon_faiss_jni.dylib || true
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
################################################################################
2+
# Licensed to the Apache Software Foundation (ASF) under one
3+
# or more contributor license agreements. See the NOTICE file
4+
# distributed with this work for additional information
5+
# regarding copyright ownership. The ASF licenses this file
6+
# to you under the Apache License, Version 2.0 (the
7+
# "License"); you may not use this file except in compliance
8+
# with the License. You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
################################################################################
18+
19+
name: Build FAISS Native Library
20+
21+
on:
22+
workflow_call:
23+
inputs:
24+
platform:
25+
description: 'Target platform (linux-amd64, linux-aarch64, darwin-aarch64)'
26+
required: false
27+
type: string
28+
default: 'linux-amd64'
29+
jdk-version:
30+
description: 'JDK version to use'
31+
required: false
32+
type: string
33+
default: '8'
34+
artifact-name:
35+
description: 'Name for the uploaded artifact'
36+
required: false
37+
type: string
38+
default: 'faiss-native-linux-amd64'
39+
retention-days:
40+
description: 'Number of days to retain the artifact'
41+
required: false
42+
type: number
43+
default: 1
44+
45+
jobs:
46+
build_native:
47+
runs-on: ubuntu-latest
48+
steps:
49+
- name: Checkout code
50+
uses: actions/checkout@v6
51+
52+
- name: Set up JDK ${{ inputs.jdk-version }}
53+
uses: actions/setup-java@v5
54+
with:
55+
java-version: ${{ inputs.jdk-version }}
56+
distribution: 'temurin'
57+
58+
- name: Build FAISS native library
59+
uses: ./.github/actions/build-faiss-native
60+
with:
61+
platform: ${{ inputs.platform }}
62+
63+
- name: Upload native library artifact
64+
uses: actions/upload-artifact@v6
65+
with:
66+
name: ${{ inputs.artifact-name }}
67+
path: paimon-faiss/paimon-faiss-jni/src/main/resources/linux/amd64/
68+
retention-days: ${{ inputs.retention-days }}

.github/workflows/check-licensing.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,24 +40,24 @@ jobs:
4040
MVN_VALIDATION_DIR: "/tmp/paimon-validation-deployment"
4141

4242
steps:
43-
- uses: actions/checkout@v4
43+
- uses: actions/checkout@v6
4444

4545
- name: Set JDK
46-
uses: actions/setup-java@v4
46+
uses: actions/setup-java@v5
4747
with:
4848
java-version: 8
4949
distribution: 'temurin'
5050
- name: Build
5151
run: |
5252
set -o pipefail
5353
54-
mvn clean deploy ${{ env.MVN_COMMON_OPTIONS }} -DskipTests \
54+
mvn clean deploy ${{ env.MVN_COMMON_OPTIONS }} -ntp -DskipTests \
5555
-DaltDeploymentRepository=validation_repository::default::file:${{ env.MVN_VALIDATION_DIR }} \
5656
| tee ${{ env.MVN_BUILD_OUTPUT_FILE }}
5757
5858
- name: Check licensing
5959
run: |
60-
mvn ${{ env.MVN_COMMON_OPTIONS }} exec:java@check-licensing -N \
60+
mvn ${{ env.MVN_COMMON_OPTIONS }} -ntp exec:java@check-licensing -N \
6161
-Dexec.args="${{ env.MVN_BUILD_OUTPUT_FILE }} $(pwd) ${{ env.MVN_VALIDATION_DIR }}" \
6262
-Dlog4j.configurationFile=file://$(pwd)/tools/ci/log4j.properties
6363
env:

.github/workflows/docs-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333

3434
steps:
3535
- name: Checkout code
36-
uses: actions/checkout@v4
36+
uses: actions/checkout@v6
3737

3838
- name: Setup Hugo
3939
uses: peaceiris/actions-hugo@v3

.github/workflows/e2e-tests-flink-1.x.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,16 @@ jobs:
4747
flink_version: [ '1.20' ]
4848
steps:
4949
- name: Checkout code
50-
uses: actions/checkout@v4
50+
uses: actions/checkout@v6
5151

5252
- name: Set up JDK ${{ env.JDK_VERSION }}
53-
uses: actions/setup-java@v4
53+
uses: actions/setup-java@v5
5454
with:
5555
java-version: ${{ env.JDK_VERSION }}
5656
distribution: 'temurin'
5757

5858
- name: Build Flink
59-
run: mvn -T 2C -B clean install -DskipTests -Pflink1,spark3 -pl paimon-e2e-tests -am -Pflink-${{ matrix.flink_version }}
59+
run: mvn -T 2C -B -ntp clean install -DskipTests -Pflink1,spark3 -pl paimon-e2e-tests -am -Pflink-${{ matrix.flink_version }}
6060

6161
- name: Test Flink
6262
run: |
@@ -66,9 +66,9 @@ jobs:
6666
echo "JVM timezone is set to $jvm_timezone"
6767
profile="flink-${{ matrix.flink_version }}"
6868
if [ "${{ matrix.flink_version }}" = "${{ matrix.flink_version[-1] }}" ]; then
69-
mvn -T 1C -B test -Pflink1,spark3 -pl paimon-e2e-tests -Duser.timezone=$jvm_timezone
69+
mvn -T 1C -B -ntp test -Pflink1,spark3 -pl paimon-e2e-tests -Duser.timezone=$jvm_timezone
7070
else
71-
mvn -T 1C -B test -Pflink1,spark3 -pl paimon-e2e-tests -Duser.timezone=$jvm_timezone -P${profile}
71+
mvn -T 1C -B -ntp test -Pflink1,spark3 -pl paimon-e2e-tests -Duser.timezone=$jvm_timezone -P${profile}
7272
fi
7373
env:
7474
MAVEN_OPTS: -Xmx4096m

.github/workflows/e2e-tests-flink-2.x-jdk11.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,17 @@ jobs:
4343
flink_version: [ '2.2' ]
4444
steps:
4545
- name: Checkout code
46-
uses: actions/checkout@v4
46+
uses: actions/checkout@v6
4747

4848
- name: Set up JDK ${{ env.JDK_VERSION }}
49-
uses: actions/setup-java@v4
49+
uses: actions/setup-java@v5
5050
with:
5151
java-version: ${{ env.JDK_VERSION }}
5252
distribution: 'temurin'
5353

5454
- name: Build Flink
5555
run: |
56-
mvn -T 2C -B clean install -DskipTests -Pflink2,spark3 -pl paimon-e2e-tests -am -Pflink-${{ matrix.flink_version }},java11
56+
mvn -T 2C -B -ntp clean install -DskipTests -Pflink2,spark3 -pl paimon-e2e-tests -am -Pflink-${{ matrix.flink_version }},java11
5757
5858
- name: Test Flink
5959
run: |
@@ -63,9 +63,9 @@ jobs:
6363
echo "JVM timezone is set to $jvm_timezone"
6464
profile="flink-${{ matrix.flink_version }}"
6565
if [ "${{ matrix.flink_version }}" = "${{ matrix.flink_version[-1] }}" ]; then
66-
mvn -T 1C -B test -Pflink2,spark3 -pl paimon-e2e-tests -Duser.timezone=$jvm_timezone -Pjava11
66+
mvn -T 1C -B -ntp test -Pflink2,spark3 -pl paimon-e2e-tests -Duser.timezone=$jvm_timezone -Pjava11
6767
else
68-
mvn -T 1C -B test -Pflink2,spark3 -pl paimon-e2e-tests -Duser.timezone=$jvm_timezone -P${profile},java11
68+
mvn -T 1C -B -ntp test -Pflink2,spark3 -pl paimon-e2e-tests -Duser.timezone=$jvm_timezone -P${profile},java11
6969
fi
7070
env:
7171
MAVEN_OPTS: -Xmx4096m

.github/workflows/file-size-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
runs-on: ubuntu-latest
2727
steps:
2828
- name: Checkout code
29-
uses: actions/checkout@v4
29+
uses: actions/checkout@v6
3030
with:
3131
fetch-depth: 0
3232

0 commit comments

Comments
 (0)