|
| 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: Faiss Vector Index Tests |
| 20 | + |
| 21 | +on: |
| 22 | + push: |
| 23 | + paths: |
| 24 | + - 'paimon-faiss/**' |
| 25 | + - 'paimon-faiss-jni/**' |
| 26 | + - '.github/workflows/faiss-vector-index-tests.yml' |
| 27 | + pull_request: |
| 28 | + paths: |
| 29 | + - 'paimon-faiss/**' |
| 30 | + - 'paimon-faiss-jni/**' |
| 31 | + - '.github/workflows/faiss-vector-index-tests.yml' |
| 32 | + |
| 33 | +env: |
| 34 | + JDK_VERSION: 8 |
| 35 | + MAVEN_OPTS: -Dmaven.wagon.httpconnectionManager.ttlSeconds=30 -Dmaven.wagon.http.retryHandler.requestSentEnabled=true |
| 36 | + |
| 37 | +concurrency: |
| 38 | + group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.number || github.run_id }} |
| 39 | + cancel-in-progress: true |
| 40 | + |
| 41 | +jobs: |
| 42 | + build_test: |
| 43 | + runs-on: ubuntu-latest |
| 44 | + timeout-minutes: 90 |
| 45 | + steps: |
| 46 | + - name: Checkout code |
| 47 | + uses: actions/checkout@v4 |
| 48 | + |
| 49 | + - name: Set up JDK ${{ env.JDK_VERSION }} |
| 50 | + uses: actions/setup-java@v4 |
| 51 | + with: |
| 52 | + java-version: ${{ env.JDK_VERSION }} |
| 53 | + distribution: 'temurin' |
| 54 | + |
| 55 | + - name: Setup FAISS and build paimon-faiss |
| 56 | + uses: ./.github/actions/setup-faiss |
| 57 | + |
| 58 | + - name: List bundled libraries |
| 59 | + run: | |
| 60 | + echo "=== Bundled libraries ===" |
| 61 | + ls -la paimon-faiss-jni/src/main/resources/linux/amd64/ |
| 62 | + echo "" |
| 63 | + echo "=== Library dependencies ===" |
| 64 | + ldd paimon-faiss-jni/src/main/resources/linux/amd64/libpaimon_faiss_jni.so || true |
| 65 | +
|
| 66 | + - name: Test paimon-faiss-jni |
| 67 | + timeout-minutes: 10 |
| 68 | + run: | |
| 69 | + mvn -T 1C -B test -pl paimon-faiss-jni -DskipFaissTests=false -Ppaimon-faiss-vector |
| 70 | + env: |
| 71 | + MAVEN_OPTS: -Xmx2048m |
| 72 | + |
| 73 | + - name: Test paimon-faiss |
| 74 | + timeout-minutes: 30 |
| 75 | + run: | |
| 76 | + mvn -T 1C -B test -pl paimon-faiss -Ppaimon-faiss-vector |
| 77 | + env: |
| 78 | + MAVEN_OPTS: -Xmx4096m |
| 79 | + |
| 80 | + - name: Build Vector E2E Test Module |
| 81 | + run: mvn -T 2C -B clean install -DskipTests -Pspark3,flink1,paimon-faiss-vector -pl paimon-vector-e2e-test -am |
| 82 | + |
| 83 | + - name: Run Vector E2E Tests |
| 84 | + timeout-minutes: 30 |
| 85 | + run: | |
| 86 | + # run tests with random timezone to find out timezone related bugs |
| 87 | + . .github/workflows/utils.sh |
| 88 | + jvm_timezone=$(random_timezone) |
| 89 | + echo "JVM timezone is set to $jvm_timezone" |
| 90 | + mvn -T 2C -B verify -Pspark3,flink1,paimon-faiss-vector -pl paimon-vector-e2e-test -Duser.timezone=$jvm_timezone |
| 91 | + env: |
| 92 | + MAVEN_OPTS: -Xmx4096m |
0 commit comments