|
| 1 | +# Copyright (c) Facebook, Inc. and its affiliates. |
| 2 | +# |
| 3 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +# you may not use this file except in compliance with the License. |
| 5 | +# You may obtain a copy of the License at |
| 6 | +# |
| 7 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +# |
| 9 | +# Unless required by applicable law or agreed to in writing, software |
| 10 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +# See the License for the specific language governing permissions and |
| 13 | +# limitations under the License. |
| 14 | + |
| 15 | +# Tests the BUNDLED dependency resolution path on a plain Ubuntu runner |
| 16 | +# (no container). Triggered on PRs that change dependency scripts or |
| 17 | +# CMake modules, and on a nightly schedule. |
| 18 | + |
| 19 | +name: Ubuntu Bundled Dependencies |
| 20 | + |
| 21 | +on: |
| 22 | + schedule: |
| 23 | + - cron: 0 5 * * * |
| 24 | + workflow_dispatch: {} |
| 25 | + pull_request: |
| 26 | + paths: |
| 27 | + - scripts/setup-*.sh |
| 28 | + - scripts/setup-common.sh |
| 29 | + - scripts/setup-versions.sh |
| 30 | + - scripts/setup-helper-functions.sh |
| 31 | + - CMake/** |
| 32 | + - CMakeLists.txt |
| 33 | + - .github/workflows/ubuntu-bundled-deps.yml |
| 34 | + |
| 35 | +permissions: |
| 36 | + contents: read |
| 37 | + |
| 38 | +concurrency: |
| 39 | + group: ${{ github.workflow }}-${{ github.repository }}-${{ github.head_ref || github.sha }} |
| 40 | + cancel-in-progress: true |
| 41 | + |
| 42 | +jobs: |
| 43 | + ubuntu-debug-bundled-deps: |
| 44 | + runs-on: 16-core-ubuntu |
| 45 | + if: ${{ github.repository == 'facebookincubator/velox' }} |
| 46 | + name: Ubuntu debug with bundled dependencies |
| 47 | + env: |
| 48 | + CCACHE_DIR: ${{ github.workspace }}/ccache |
| 49 | + defaults: |
| 50 | + run: |
| 51 | + shell: bash |
| 52 | + working-directory: velox |
| 53 | + steps: |
| 54 | + |
| 55 | + - name: Get Ccache Stash |
| 56 | + uses: apache/infrastructure-actions/stash/restore@3354c1565d4b0e335b78a76aedd82153a9e144d4 |
| 57 | + with: |
| 58 | + path: ${{ env.CCACHE_DIR }} |
| 59 | + key: ccache-ubuntu-debug-bundled-deps |
| 60 | + |
| 61 | + - name: Ensure Stash Dirs Exists |
| 62 | + working-directory: ${{ github.workspace }} |
| 63 | + run: | |
| 64 | + mkdir -p "$CCACHE_DIR" |
| 65 | +
|
| 66 | + - uses: actions/checkout@v5 |
| 67 | + with: |
| 68 | + path: velox |
| 69 | + persist-credentials: false |
| 70 | + |
| 71 | + - name: Install Dependencies |
| 72 | + run: | |
| 73 | + source scripts/setup-ubuntu.sh && install_apt_deps && install_faiss_deps |
| 74 | +
|
| 75 | + - name: Clear CCache Statistics |
| 76 | + run: | |
| 77 | + ccache -sz |
| 78 | +
|
| 79 | + - name: Make Debug Build |
| 80 | + env: |
| 81 | + VELOX_DEPENDENCY_SOURCE: BUNDLED |
| 82 | + ICU_SOURCE: SYSTEM |
| 83 | + MAKEFLAGS: NUM_THREADS=16 MAX_HIGH_MEM_JOBS=4 MAX_LINK_JOBS=2 |
| 84 | + run: | |
| 85 | + EXTRA_CMAKE_FLAGS=( |
| 86 | + "-DCMAKE_LINK_LIBRARIES_STRATEGY=REORDER_FREELY" |
| 87 | + "-DVELOX_ENABLE_BENCHMARKS=ON" |
| 88 | + "-DVELOX_ENABLE_EXAMPLES=ON" |
| 89 | + "-DVELOX_ENABLE_ARROW=ON" |
| 90 | + "-DVELOX_ENABLE_GEO=ON" |
| 91 | + "-DVELOX_ENABLE_PARQUET=ON" |
| 92 | + "-DVELOX_MONO_LIBRARY=ON" |
| 93 | + "-DVELOX_BUILD_SHARED=ON" |
| 94 | + "-DVELOX_ENABLE_FAISS=ON" |
| 95 | + "-DVELOX_ENABLE_REMOTE_FUNCTIONS=ON" |
| 96 | + ) |
| 97 | + make debug |
| 98 | +
|
| 99 | + - name: CCache after |
| 100 | + run: | |
| 101 | + ccache -vs |
| 102 | +
|
| 103 | + - uses: apache/infrastructure-actions/stash/save@3354c1565d4b0e335b78a76aedd82153a9e144d4 |
| 104 | + with: |
| 105 | + path: ${{ env.CCACHE_DIR }} |
| 106 | + key: ccache-ubuntu-debug-bundled-deps |
| 107 | + |
| 108 | + - name: Run Tests |
| 109 | + run: | |
| 110 | + cd _build/debug && ctest -j 8 --output-on-failure --no-tests=error |
0 commit comments