|
| 1 | +# Licensed to the Apache Software Foundation (ASF) under one |
| 2 | +# or more contributor license agreements. See the NOTICE file |
| 3 | +# distributed with this work for additional information |
| 4 | +# regarding copyright ownership. The ASF licenses this file |
| 5 | +# to you under the Apache License, Version 2.0 (the |
| 6 | +# "License"); you may not use this file except in compliance |
| 7 | +# with the License. You may obtain a copy of the License at |
| 8 | +# |
| 9 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +# |
| 11 | +# Unless required by applicable law or agreed to in writing, |
| 12 | +# software distributed under the License is distributed on an |
| 13 | +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 14 | +# KIND, either express or implied. See the License for the |
| 15 | +# specific language governing permissions and limitations |
| 16 | +# under the License. |
| 17 | + |
| 18 | +name: SQL Catalog Tests |
| 19 | + |
| 20 | +on: |
| 21 | + push: |
| 22 | + branches: |
| 23 | + - '**' |
| 24 | + - '!dependabot/**' |
| 25 | + tags: |
| 26 | + - '**' |
| 27 | + pull_request: |
| 28 | + types: [opened, synchronize, reopened, ready_for_review] |
| 29 | + |
| 30 | +concurrency: |
| 31 | + group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }} |
| 32 | + cancel-in-progress: true |
| 33 | + |
| 34 | +permissions: |
| 35 | + contents: read |
| 36 | + |
| 37 | +env: |
| 38 | + ICEBERG_HOME: /tmp/iceberg |
| 39 | + |
| 40 | +jobs: |
| 41 | + sql-catalog: |
| 42 | + if: ${{ github.event_name != 'pull_request' || github.event.pull_request.draft == false }} |
| 43 | + name: SQL Catalog (${{ matrix.title }}) |
| 44 | + runs-on: ${{ matrix.runs-on }} |
| 45 | + timeout-minutes: 45 |
| 46 | + strategy: |
| 47 | + fail-fast: false |
| 48 | + matrix: |
| 49 | + include: |
| 50 | + - title: AMD64 Ubuntu 24.04 |
| 51 | + runs-on: ubuntu-24.04 |
| 52 | + CC: gcc-14 |
| 53 | + CXX: g++-14 |
| 54 | + cmake_build_type: Debug |
| 55 | + cmake_extra_args: "" |
| 56 | + - title: AArch64 macOS 26 |
| 57 | + runs-on: macos-26 |
| 58 | + cmake_build_type: Debug |
| 59 | + cmake_extra_args: "" |
| 60 | + - title: AMD64 Windows 2025 |
| 61 | + runs-on: windows-2025 |
| 62 | + cmake_build_type: Release |
| 63 | + cmake_extra_args: -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake |
| 64 | + steps: |
| 65 | + - name: Checkout iceberg-cpp |
| 66 | + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
| 67 | + with: |
| 68 | + persist-credentials: false |
| 69 | + - name: Set up MSVC Developer Command Prompt |
| 70 | + if: ${{ startsWith(matrix.runs-on, 'windows') }} |
| 71 | + uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0 |
| 72 | + with: |
| 73 | + arch: x64 |
| 74 | + - name: Install dependencies on Ubuntu |
| 75 | + if: ${{ startsWith(matrix.runs-on, 'ubuntu') }} |
| 76 | + shell: bash |
| 77 | + run: sudo apt-get update && sudo apt-get install -y libsqlite3-dev |
| 78 | + - name: Set Ubuntu Compilers |
| 79 | + if: ${{ startsWith(matrix.runs-on, 'ubuntu') }} |
| 80 | + run: | |
| 81 | + echo "CC=${{ matrix.CC }}" >> $GITHUB_ENV |
| 82 | + echo "CXX=${{ matrix.CXX }}" >> $GITHUB_ENV |
| 83 | + - name: Install dependencies on macOS |
| 84 | + if: ${{ startsWith(matrix.runs-on, 'macos') }} |
| 85 | + shell: bash |
| 86 | + run: | |
| 87 | + brew install fmt |
| 88 | + echo "CMAKE_PREFIX_PATH=$(brew --prefix fmt):${CMAKE_PREFIX_PATH:-}" >> "${GITHUB_ENV}" |
| 89 | + - name: Install dependencies on Windows |
| 90 | + if: ${{ startsWith(matrix.runs-on, 'windows') }} |
| 91 | + shell: pwsh |
| 92 | + run: | |
| 93 | + vcpkg install zlib:x64-windows nlohmann-json:x64-windows nanoarrow:x64-windows roaring:x64-windows sqlite3:x64-windows |
| 94 | + - name: Configure Iceberg |
| 95 | + shell: bash |
| 96 | + run: | |
| 97 | + cmake -S . -B build -G Ninja \ |
| 98 | + -DCMAKE_INSTALL_PREFIX="${ICEBERG_HOME}" \ |
| 99 | + -DCMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }} \ |
| 100 | + -DICEBERG_BUILD_STATIC=ON \ |
| 101 | + -DICEBERG_BUILD_SHARED=ON \ |
| 102 | + -DICEBERG_BUILD_REST=OFF \ |
| 103 | + -DICEBERG_BUILD_SQL_CATALOG=ON \ |
| 104 | + -DICEBERG_SQL_SQLITE=ON \ |
| 105 | + ${{ matrix.cmake_extra_args }} |
| 106 | + - name: Build SQL catalog tests |
| 107 | + shell: bash |
| 108 | + run: cmake --build build --target sql_catalog_test |
| 109 | + - name: Run SQL catalog tests |
| 110 | + shell: bash |
| 111 | + run: ctest --test-dir build -R '^sql_catalog_test$' --output-on-failure -C ${{ matrix.cmake_build_type }} |
0 commit comments