|
14 | 14 | RETRY: .github/bin/retry |
15 | 15 |
|
16 | 16 | jobs: |
17 | | - test: |
| 17 | + arrowflight-java-tests: |
18 | 18 | runs-on: ubuntu-latest |
19 | 19 | strategy: |
20 | 20 | fail-fast: false |
@@ -48,6 +48,161 @@ jobs: |
48 | 48 | export MAVEN_OPTS="${MAVEN_INSTALL_OPTS}" |
49 | 49 | ./mvnw install ${MAVEN_FAST_INSTALL} -am -pl ${{ matrix.modules }} |
50 | 50 |
|
51 | | - # Run Maven tests for the target module |
| 51 | + # Run Maven tests for the target module, excluding native tests |
52 | 52 | - name: Maven Tests |
53 | | - run: ./mvnw test ${MAVEN_TEST} -pl ${{ matrix.modules }} |
| 53 | + run: ./mvnw test ${MAVEN_TEST} -pl ${{ matrix.modules }} -Dtest="*,!TestArrowFlightNativeQueries" |
| 54 | + |
| 55 | + prestocpp-linux-build-for-test: |
| 56 | + runs-on: ubuntu-22.04 |
| 57 | + container: |
| 58 | + image: prestodb/presto-native-dependency:0.292-20250204112033-cf8ba84 |
| 59 | + env: |
| 60 | + CCACHE_DIR: "${{ github.workspace }}/ccache" |
| 61 | + DEPENDENCY_DIR: "${{ github.workspace }}/adapter-deps/download" |
| 62 | + INSTALL_PREFIX: "${{ github.workspace }}/adapter-deps/install" |
| 63 | + steps: |
| 64 | + - uses: actions/checkout@v4 |
| 65 | + |
| 66 | + - name: Fix git permissions |
| 67 | + # Usually actions/checkout does this but as we run in a container |
| 68 | + # it doesn't work |
| 69 | + run: git config --global --add safe.directory ${GITHUB_WORKSPACE} |
| 70 | + |
| 71 | + - name: Update velox |
| 72 | + run: | |
| 73 | + cd presto-native-execution |
| 74 | + make velox-submodule |
| 75 | +
|
| 76 | + - name: Install Arrow Flight |
| 77 | + run: | |
| 78 | + mkdir -p ${DEPENDENCY_DIR}/adapter-deps/download |
| 79 | + mkdir -p ${INSTALL_PREFIX}/adapter-deps/install |
| 80 | + source /opt/rh/gcc-toolset-12/enable |
| 81 | + set -xu |
| 82 | + cd presto-native-execution |
| 83 | + PROMPT_ALWAYS_RESPOND=n ./scripts/setup-adapters.sh arrow_flight |
| 84 | +
|
| 85 | + - name: Install Github CLI for using apache/infrastructure-actions/stash |
| 86 | + run: | |
| 87 | + curl -L https://github.com/cli/cli/releases/download/v2.63.2/gh_2.63.2_linux_amd64.rpm > gh_2.63.2_linux_amd64.rpm |
| 88 | + rpm -iv gh_2.63.2_linux_amd64.rpm |
| 89 | +
|
| 90 | + - uses: apache/infrastructure-actions/stash/restore@4ab8682fbd4623d2b4fc1c98db38aba5091924c3 |
| 91 | + with: |
| 92 | + path: '${{ env.CCACHE_DIR }}' |
| 93 | + key: ccache-prestocpp-linux-build-for-test |
| 94 | + |
| 95 | + - name: Zero ccache statistics |
| 96 | + run: ccache -sz |
| 97 | + |
| 98 | + - name: Build engine |
| 99 | + run: | |
| 100 | + source /opt/rh/gcc-toolset-12/enable |
| 101 | + cd presto-native-execution |
| 102 | + cmake \ |
| 103 | + -B _build/release \ |
| 104 | + -GNinja \ |
| 105 | + -DTREAT_WARNINGS_AS_ERRORS=1 \ |
| 106 | + -DENABLE_ALL_WARNINGS=1 \ |
| 107 | + -DVELOX_ENABLE_ARROW=OFF \ |
| 108 | + -DVELOX_ENABLE_PARQUET=OFF \ |
| 109 | + -DPRESTO_ENABLE_ARROW_FLIGHT_CONNECTOR=ON \ |
| 110 | + -DCMAKE_PREFIX_PATH=/usr/local \ |
| 111 | + -DThrift_ROOT=/usr/local \ |
| 112 | + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ |
| 113 | + -DMAX_LINK_JOBS=4 |
| 114 | + ninja -C _build/release -j 4 |
| 115 | +
|
| 116 | + - name: Ccache after |
| 117 | + run: ccache -s |
| 118 | + |
| 119 | + - uses: apache/infrastructure-actions/stash/save@4ab8682fbd4623d2b4fc1c98db38aba5091924c3 |
| 120 | + with: |
| 121 | + path: '${{ env.CCACHE_DIR }}' |
| 122 | + key: ccache-prestocpp-linux-build-for-test |
| 123 | + |
| 124 | + - name: Upload artifacts |
| 125 | + uses: actions/upload-artifact@v4 |
| 126 | + with: |
| 127 | + name: arrow-flight-presto-native-build |
| 128 | + path: presto-native-execution/_build/release/presto_cpp/main/presto_server |
| 129 | + |
| 130 | + - name: Upload Arrow Flight install artifacts |
| 131 | + uses: actions/upload-artifact@v4 |
| 132 | + with: |
| 133 | + name: arrow-flight-install |
| 134 | + path: ${{ env.INSTALL_PREFIX }}/lib64/libarrow_flight* |
| 135 | + |
| 136 | + arrowflight-native-e2e-tests: |
| 137 | + needs: prestocpp-linux-build-for-test |
| 138 | + runs-on: ubuntu-22.04 |
| 139 | + container: |
| 140 | + image: prestodb/presto-native-dependency:0.292-20250204112033-cf8ba84 |
| 141 | + env: |
| 142 | + INSTALL_PREFIX: "${{ github.workspace }}/adapter-deps/install" |
| 143 | + strategy: |
| 144 | + fail-fast: false |
| 145 | + matrix: |
| 146 | + modules: |
| 147 | + - ":presto-base-arrow-flight" # Only run tests for the `presto-base-arrow-flight` module |
| 148 | + |
| 149 | + timeout-minutes: 80 |
| 150 | + concurrency: |
| 151 | + group: ${{ github.workflow }}-test-${{ matrix.modules }}-${{ github.event.pull_request.number }} |
| 152 | + cancel-in-progress: true |
| 153 | + |
| 154 | + steps: |
| 155 | + - uses: actions/checkout@v4 |
| 156 | + |
| 157 | + - name: Fix git permissions |
| 158 | + # Usually actions/checkout does this but as we run in a container |
| 159 | + # it doesn't work |
| 160 | + run: git config --global --add safe.directory ${GITHUB_WORKSPACE} |
| 161 | + |
| 162 | + - name: Download artifacts |
| 163 | + uses: actions/download-artifact@v4 |
| 164 | + with: |
| 165 | + name: arrow-flight-presto-native-build |
| 166 | + path: presto-native-execution/_build/release/presto_cpp/main |
| 167 | + |
| 168 | + - name: Download Arrow Flight install artifacts |
| 169 | + uses: actions/download-artifact@v4 |
| 170 | + with: |
| 171 | + name: arrow-flight-install |
| 172 | + path: ${{ env.INSTALL_PREFIX }}/lib64 |
| 173 | + |
| 174 | + # Permissions are lost when uploading. Details here: https://github.com/actions/upload-artifact/issues/38 |
| 175 | + - name: Restore execute permissions and library path |
| 176 | + run: | |
| 177 | + chmod +x ${GITHUB_WORKSPACE}/presto-native-execution/_build/release/presto_cpp/main/presto_server |
| 178 | + # Ensure transitive dependency libboost-iostreams is found. |
| 179 | + ldconfig /usr/local/lib |
| 180 | +
|
| 181 | + - name: Install OpenJDK8 |
| 182 | + uses: actions/setup-java@v4 |
| 183 | + with: |
| 184 | + distribution: 'temurin' |
| 185 | + java-version: 8 |
| 186 | + cache: 'maven' |
| 187 | + - name: Download nodejs to maven cache |
| 188 | + run: .github/bin/download_nodejs |
| 189 | + |
| 190 | + - name: Maven install |
| 191 | + env: |
| 192 | + # Use different Maven options to install. |
| 193 | + MAVEN_OPTS: "-Xmx2G -XX:+ExitOnOutOfMemoryError" |
| 194 | + run: | |
| 195 | + export MAVEN_OPTS="${MAVEN_INSTALL_OPTS}" |
| 196 | + ./mvnw install ${MAVEN_FAST_INSTALL} -am -pl ${{ matrix.modules }} |
| 197 | +
|
| 198 | + - name: Run arrowflight native e2e tests |
| 199 | + run: | |
| 200 | + export PRESTO_SERVER_PATH="${GITHUB_WORKSPACE}/presto-native-execution/_build/release/presto_cpp/main/presto_server" |
| 201 | + mvn test \ |
| 202 | + ${MAVEN_TEST} \ |
| 203 | + -pl ${{ matrix.modules }} \ |
| 204 | + -Dtest="TestArrowFlightNativeQueries" \ |
| 205 | + -DPRESTO_SERVER=${PRESTO_SERVER_PATH} \ |
| 206 | + -DDATA_DIR=${RUNNER_TEMP} \ |
| 207 | + -Duser.timezone=America/Bahia_Banderas \ |
| 208 | + -T1C |
0 commit comments