Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 22 additions & 17 deletions .github/workflows/aws_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,30 @@ name: AWS Tests

on:
push:
branches:
- main
tags:
- '**'
branches: [main]
paths: &module_paths
- 'src/iceberg/arrow/**'
- 'src/iceberg/catalog/rest/auth/**'
- 'src/iceberg/catalog/rest/http_*'
- 'src/iceberg/catalog/rest/rest_file_io.*'
- 'src/iceberg/catalog/rest/CMakeLists.txt'
- 'src/iceberg/test/*arrow*io*'
- 'src/iceberg/test/sigv4*'
- 'ci/scripts/build_iceberg.sh'
- 'ci/scripts/start_object_store.sh'
- '!**/*.md'
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
# Run for code/build changes and this suite's workflow dependencies.
- '**'
- '!.asf.yaml'
- '!.devcontainer/**'
- '!.github/**'
- '!**/*.md'
- '!dev/**'
- '!mkdocs/**'
- '.github/workflows/aws_test.yml'
- '.github/actions/**'
paths: *module_paths
workflow_call:
inputs:
pr_head_sha:
description: PR head commit selected by the comment command
type: string
required: true

concurrency:
group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }}
group: aws-${{ github.event_name }}-${{ github.event.pull_request.number || github.event.issue.number || github.sha }}
cancel-in-progress: true

permissions:
Expand Down Expand Up @@ -88,6 +92,7 @@ jobs:
- name: Checkout iceberg-cpp
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ inputs.pr_head_sha }}
persist-credentials: false
- name: Install dependencies on Ubuntu
if: ${{ startsWith(matrix.runs-on, 'ubuntu') }}
Expand Down Expand Up @@ -151,7 +156,7 @@ jobs:
--sigv4 ${{ matrix.sigv4 }} \
--bundle-awssdk ${{ matrix.bundle_awssdk }}
- name: Save sccache
if: always()
if: always() && github.event_name != 'issue_comment'
uses: ./.github/actions/save-sccache
with:
key-prefix: sccache-aws-${{ matrix.runs-on }}-bundle${{ matrix.bundle_awssdk }}-s3${{ matrix.s3 }}-sigv4${{ matrix.sigv4 }}
Expand Down
111 changes: 111 additions & 0 deletions .github/workflows/hive_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

name: Hive Tests

on:
push:
branches: [main]
paths: &module_paths
- 'src/iceberg/catalog/hive/**'
- 'thirdparty/hive_metastore/**'
- 'src/iceberg/test/hive_*'
- 'src/iceberg/test/hms_*'
- 'dev/update_hive_thrift.sh'
- 'ci/scripts/build_iceberg.sh'
- '!**/*.md'
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths: *module_paths
workflow_call:
inputs:
pr_head_sha:
description: PR head commit selected by the comment command
type: string
required: true

concurrency:
group: hive-${{ github.event_name }}-${{ github.event.pull_request.number || github.event.issue.number || github.sha }}
cancel-in-progress: true

permissions:
contents: read

env:
ICEBERG_HOME: /tmp/iceberg

jobs:
hive:
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.draft == false }}
name: AMD64 Ubuntu 26.04 Hive (C++23)
runs-on: ubuntu-26.04
timeout-minutes: 45
strategy:
fail-fast: false
env:
SCCACHE_DIR: ${{ github.workspace }}/.sccache
SCCACHE_CACHE_SIZE: "2G"
ICEBERG_EXTRA_CMAKE_ARGS: "-DICEBERG_BUILD_HIVE=ON"
steps:
- name: Checkout iceberg-cpp
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ inputs.pr_head_sha }}
persist-credentials: false
- name: Install dependencies
shell: bash
run: sudo apt-get update && sudo apt-get install -y libcurl4-openssl-dev libssl-dev
- name: Set up Python
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
with:
python-version: '3.13'
# Arrow's bundled Boost.Locale 1.88.0 is incompatible with CMake 4.5.
- name: Pin CMake to 4.4.5
shell: bash
run: |
python -m pip install "cmake==4.4.5"
cmake --version
test "$(cmake --version | head -n 1)" = "cmake version 4.4.5"
- name: Restore sccache cache
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ${{ github.workspace }}/.sccache
key: sccache-test-hive-${{ github.run_id }}
restore-keys: |
sccache-test-hive-
sccache-test-ubuntu-
- name: Setup sccache
uses: mozilla-actions/sccache-action@fc920bf0ec8de6ee65d409111f7ec508035751ba # v0.0.11
- name: Build and test Iceberg with Hive
shell: bash
env:
CC: gcc-14
CXX: g++-14
run: |
ci/scripts/build_iceberg.sh \
--source-dir "$(pwd)" \
--build-type Debug \
--sccache ON
- name: Show sccache stats
shell: bash
run: sccache --show-stats
- name: Save sccache cache
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ${{ github.workspace }}/.sccache
key: sccache-test-hive-${{ github.run_id }}
101 changes: 101 additions & 0 deletions .github/workflows/module_ci_comment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

name: PR Module CI

on:
# Trusted jobs authorize and report. Only the read-only, cache-read-only test job runs PR code.
issue_comment: # zizmor: ignore[dangerous-triggers]
types: [created]

permissions:
contents: read
cache-mode: read

env:
PR_NUMBER: ${{ github.event.issue.number }}

jobs:
authorize:
if: >-
github.event.issue.pull_request && github.event.issue.state == 'open' &&
startsWith(github.event.comment.body, '/ci ')
runs-on: ubuntu-24.04
timeout-minutes: 5
permissions:
pull-requests: read
outputs:
module: ${{ steps.request.outputs.module }}
pr_head_sha: ${{ steps.request.outputs.pr_head_sha }}
steps:
- name: Verify command and resolve PR head
id: request
env:
GH_TOKEN: ${{ github.token }}
COMMAND: ${{ github.event.comment.body }}
COMMENT_AUTHOR: ${{ github.event.comment.user.login }}
run: |
case "$COMMAND" in
'/ci aws'|'/ci hive'|'/ci sql') module=${COMMAND#/ci } ;;
*) exit 0 ;;
esac

permission=$(gh api "repos/$GITHUB_REPOSITORY/collaborators/$COMMENT_AUTHOR/permission" --jq '.permission')
[[ "$permission" =~ ^(write|maintain|admin)$ ]] || exit 0

sha=$(gh api "repos/$GITHUB_REPOSITORY/pulls/$PR_NUMBER" --jq 'select(.state == "open") | .head.sha')
[[ -n "$sha" ]] || exit 0
echo "module=$module" >> "$GITHUB_OUTPUT"
echo "pr_head_sha=$sha" >> "$GITHUB_OUTPUT"

aws:
needs: authorize
if: needs.authorize.outputs.module == 'aws'
uses: ./.github/workflows/aws_test.yml
with: &pr_head
pr_head_sha: ${{ needs.authorize.outputs.pr_head_sha }}

hive:
needs: authorize
if: needs.authorize.outputs.module == 'hive'
uses: ./.github/workflows/hive_test.yml
with: *pr_head

sql:
needs: authorize
if: needs.authorize.outputs.module == 'sql'
uses: ./.github/workflows/sql_catalog_test.yml
with: *pr_head

report:
needs: [authorize, aws, hive, sql]
if: always() && needs.authorize.outputs.module != ''
runs-on: ubuntu-24.04
timeout-minutes: 5
permissions:
pull-requests: write
steps:
- name: Post test result to the PR
env:
GH_TOKEN: ${{ github.token }}
MODULE: ${{ needs.authorize.outputs.module }}
SHA: ${{ needs.authorize.outputs.pr_head_sha }}
RESULT: ${{ needs[needs.authorize.outputs.module].result }}
run: |
run_url="$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID/attempts/$GITHUB_RUN_ATTEMPT"
gh pr comment "$PR_NUMBER" --repo "$GITHUB_REPOSITORY" \
--body "Module CI for $MODULE at $SHA finished with **$RESULT**. [View run]($run_url)"
32 changes: 15 additions & 17 deletions .github/workflows/sql_catalog_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,23 @@ name: SQL Catalog Tests

on:
push:
branches:
- main
tags:
- '**'
branches: [main]
paths: &module_paths
- 'src/iceberg/catalog/sql/**'
- 'src/iceberg/test/sql_catalog_*'
- '!**/*.md'
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
# Run for code/build changes and this suite's workflow dependencies.
- '**'
- '!.asf.yaml'
- '!.devcontainer/**'
- '!.github/**'
- '!**/*.md'
- '!dev/**'
- '!mkdocs/**'
- '.github/workflows/sql_catalog_test.yml'
- '.github/actions/**'
paths: *module_paths
workflow_call:
inputs:
pr_head_sha:
description: PR head commit selected by the comment command
type: string
required: true

concurrency:
group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }}
group: sql-catalog-${{ github.event_name }}-${{ github.event.pull_request.number || github.event.issue.number || github.sha }}
cancel-in-progress: true

permissions:
Expand Down Expand Up @@ -75,6 +72,7 @@ jobs:
- name: Checkout iceberg-cpp
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ inputs.pr_head_sha }}
persist-credentials: false
- name: Set up MSVC Developer Command Prompt
if: ${{ startsWith(matrix.runs-on, 'windows') }}
Expand Down Expand Up @@ -135,7 +133,7 @@ jobs:
shell: bash
run: cmake --build build --target sql_catalog_test
- name: Save sccache
if: always()
if: always() && github.event_name != 'issue_comment'
uses: ./.github/actions/save-sccache
with:
key-prefix: sccache-sqlcatalog-${{ matrix.runs-on }}
Expand Down
Loading
Loading