@@ -52,57 +52,11 @@ jobs:
5252 java-version : ${{ env.JDK_VERSION }}
5353 distribution : ' temurin'
5454
55- - name : Install native dependencies
56- run : |
57- sudo apt-get update
58- sudo apt-get install -y \
59- build-essential \
60- libopenblas-dev \
61- liblapack-dev \
62- patchelf \
63- libgomp1 \
64- wget
65-
66- - name : Install GCC 9
67- run : |
68- sudo apt-get install -y gcc-9 g++-9
69- sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 90
70- sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 90
71- gcc --version
72-
73- - name : Install CMake 3.30.1
74- run : |
75- CMAKE_VERSION="3.30.1"
76- wget -q https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-x86_64.tar.gz
77- tar -xzf cmake-${CMAKE_VERSION}-linux-x86_64.tar.gz
78- sudo mv cmake-${CMAKE_VERSION}-linux-x86_64 /opt/cmake
79- sudo ln -sf /opt/cmake/bin/cmake /usr/local/bin/cmake
80- cmake --version
81-
82- - name : Install FAISS
83- run : |
84- git clone --depth 1 --branch v1.7.4 https://github.com/facebookresearch/faiss.git /tmp/faiss
85- cd /tmp/faiss
86- cmake -B build \
87- -DFAISS_ENABLE_GPU=OFF \
88- -DFAISS_ENABLE_PYTHON=OFF \
89- -DBUILD_TESTING=OFF \
90- -DCMAKE_BUILD_TYPE=Release
91- cmake --build build -j $(nproc)
92- sudo cmake --install build
93-
94- - name : Build native library
95- run : |
96- cd paimon-faiss-jni
97- ./scripts/build-native.sh --clean --fat-lib
98-
99- - name : List built libraries
100- run : |
101- echo "=== Built libraries ==="
102- ls -la paimon-faiss-jni/src/main/resources/linux/amd64/
103- echo ""
104- echo "=== Library dependencies ==="
105- ldd paimon-faiss-jni/src/main/resources/linux/amd64/libpaimon_faiss_jni.so || true
55+ - name : Build FAISS native library
56+ uses : ./.github/actions/build-faiss-native
57+ with :
58+ platform : linux-amd64
59+ cmake-arch : x86_64
10660
10761 - name : Upload native library
10862 uses : actions/upload-artifact@v4
@@ -124,59 +78,11 @@ jobs:
12478 java-version : ${{ env.JDK_VERSION }}
12579 distribution : ' temurin'
12680
127- - name : Install native dependencies
128- run : |
129- sudo apt-get update
130- sudo apt-get install -y \
131- build-essential \
132- libopenblas-dev \
133- liblapack-dev \
134- patchelf \
135- libgomp1 \
136- wget
137-
138- - name : Install GCC 9
139- run : |
140- sudo apt-get install -y gcc-9 g++-9 || sudo apt-get install -y gcc g++
141- if command -v gcc-9 &>/dev/null; then
142- sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 90
143- sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 90
144- fi
145- gcc --version
146-
147- - name : Install CMake 3.30.1
148- run : |
149- CMAKE_VERSION="3.30.1"
150- wget -q https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-aarch64.tar.gz
151- tar -xzf cmake-${CMAKE_VERSION}-linux-aarch64.tar.gz
152- sudo mv cmake-${CMAKE_VERSION}-linux-aarch64 /opt/cmake
153- sudo ln -sf /opt/cmake/bin/cmake /usr/local/bin/cmake
154- cmake --version
155-
156- - name : Install FAISS
157- run : |
158- git clone --depth 1 --branch v1.7.4 https://github.com/facebookresearch/faiss.git /tmp/faiss
159- cd /tmp/faiss
160- cmake -B build \
161- -DFAISS_ENABLE_GPU=OFF \
162- -DFAISS_ENABLE_PYTHON=OFF \
163- -DBUILD_TESTING=OFF \
164- -DCMAKE_BUILD_TYPE=Release
165- cmake --build build -j $(nproc)
166- sudo cmake --install build
167-
168- - name : Build native library
169- run : |
170- cd paimon-faiss-jni
171- ./scripts/build-native.sh --clean --fat-lib
172-
173- - name : List built libraries
174- run : |
175- echo "=== Built libraries ==="
176- ls -la paimon-faiss-jni/src/main/resources/linux/aarch64/
177- echo ""
178- echo "=== Library dependencies ==="
179- ldd paimon-faiss-jni/src/main/resources/linux/aarch64/libpaimon_faiss_jni.so || true
81+ - name : Build FAISS native library
82+ uses : ./.github/actions/build-faiss-native
83+ with :
84+ platform : linux-aarch64
85+ cmake-arch : aarch64
18086
18187 - name : Upload native library
18288 uses : actions/upload-artifact@v4
@@ -198,22 +104,12 @@ jobs:
198104 java-version : ${{ env.JDK_VERSION }}
199105 distribution : ' temurin'
200106
201- - name : Install dependencies
202- run : |
203- brew install cmake libomp openblas faiss
204-
205- - name : Build native library
206- run : |
207- cd paimon-faiss-jni
208- ./scripts/build-native.sh --clean --fat-lib
209-
210- - name : List built libraries
211- run : |
212- echo "=== Built libraries ==="
213- ls -la paimon-faiss-jni/src/main/resources/darwin/aarch64/
214- echo ""
215- echo "=== Library dependencies ==="
216- otool -L paimon-faiss-jni/src/main/resources/darwin/aarch64/libpaimon_faiss_jni.dylib || true
107+ - name : Build FAISS native library
108+ uses : ./.github/actions/build-faiss-native
109+ with :
110+ platform : darwin-aarch64
111+ cmake-arch : aarch64
112+ use-homebrew : ' true'
217113
218114 - name : Upload native library
219115 uses : actions/upload-artifact@v4
0 commit comments