Skip to content

Commit

Permalink
merge upstream main
Browse files Browse the repository at this point in the history
  • Loading branch information
twuebi committed Jul 17, 2024
2 parents 1e0d8bc + f30d872 commit bcdcbef
Show file tree
Hide file tree
Showing 67 changed files with 5,091 additions and 2,640 deletions.
40 changes: 40 additions & 0 deletions .github/actions/setup-builder/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# 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.

# This file is heavily inspired by
# [datafusion](https://github.com/apache/datafusion/blob/main/.github/actions/setup-builder/action.yaml).
name: Prepare Rust Builder
description: 'Prepare Rust Build Environment'
inputs:
rust-version:
description: 'version of rust to install (e.g. stable)'
required: true
default: 'stable'
runs:
using: "composite"
steps:
- name: Setup Rust toolchain
shell: bash
run: |
echo "Installing ${{ inputs.rust-version }}"
rustup toolchain install ${{ inputs.rust-version }}
rustup default ${{ inputs.rust-version }}
rustup component add rustfmt clippy
- name: Fixup git permissions
# https://github.com/actions/checkout/issues/766
shell: bash
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
49 changes: 46 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,29 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
cancel-in-progress: true

env:
rust_msrv: "1.77.1"

jobs:
check:
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
steps:
- uses: actions/checkout@v4

- name: Check License Header
uses: apache/skywalking-eyes/header@v0.6.0

- name: Install cargo-sort
run: make install-cargo-sort

- name: Install taplo-cli
run: make install-taplo-cli

- name: Cargo format
run: make check-fmt

Expand All @@ -50,8 +64,29 @@ jobs:
- name: Cargo sort
run: make cargo-sort

- name: Cargo Machete
run: make cargo-machete

build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
steps:
- uses: actions/checkout@v4

- name: Setup Rust toolchain
uses: ./.github/actions/setup-builder
with:
rust-version: ${{ env.rust_msrv }}

- name: Build
run: make build

build_with_no_default_features:
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand All @@ -62,15 +97,23 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Build
run: cargo build
run: cargo build -p iceberg --no-default-features

unit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup Rust toolchain
uses: ./.github/actions/setup-builder
with:
rust-version: ${{ env.rust_msrv }}

- name: Test
run: cargo test --no-fail-fast --all-targets --all-features --workspace


- name: Async-std Test
run: cargo test --no-fail-fast --all-targets --no-default-features --features "async-std" --features "storage-fs" --workspace

- name: Doc Test
run: cargo test --no-fail-fast --doc --all-features --workspace
6 changes: 2 additions & 4 deletions .github/workflows/ci_typos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,5 @@ jobs:
FORCE_COLOR: 1
steps:
- uses: actions/checkout@v4
- run: curl -LsSf https://github.com/crate-ci/typos/releases/download/v1.14.8/typos-v1.14.8-x86_64-unknown-linux-musl.tar.gz | tar zxf - -C ${CARGO_HOME:-~/.cargo}/bin

- name: do typos check with typos-cli
run: typos
- name: Check typos
uses: crate-ci/typos@v1.23.2
16 changes: 8 additions & 8 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,11 @@ on:
push:
tags:
- '*'
pull_request:
branches:
- main
paths:
- ".github/workflows/publish.yml"
workflow_dispatch:

env:
rust_msrv: "1.77.1"

jobs:
publish:
runs-on: ubuntu-latest
Expand All @@ -42,9 +40,11 @@ jobs:
- "crates/catalog/rest"
steps:
- uses: actions/checkout@v4
- name: Dryrun ${{ matrix.package }}
working-directory: ${{ matrix.package }}
run: cargo publish --all-features --dry-run

- name: Setup Rust toolchain
uses: ./.github/actions/setup-builder
with:
rust-version: ${{ env.rust_msrv }}

- name: Publish ${{ matrix.package }}
working-directory: ${{ matrix.package }}
Expand Down
29 changes: 15 additions & 14 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,22 @@ rust-version = "1.77.1"
anyhow = "1.0.72"
apache-avro = "0.16"
array-init = "2"
arrow-arith = { version = "51" }
arrow-array = { version = "51" }
arrow-ord = { version = "51" }
arrow-schema = { version = "51" }
arrow-select = { version = "51" }
arrow-arith = { version = "52" }
arrow-array = { version = "52" }
arrow-ord = { version = "52" }
arrow-schema = { version = "52" }
arrow-select = { version = "52" }
arrow-string = { version = "52" }
async-stream = "0.3.5"
async-trait = "0.1"
async-std = "1.12.0"
aws-config = "1.1.8"
aws-sdk-glue = "1.21.0"
bimap = "0.6"
bitvec = "1.0.1"
bytes = "1.5"
chrono = "0.4.34"
ctor = "0.2.8"
derive_builder = "0.20.0"
either = "1"
env_logger = "0.11.0"
Expand All @@ -60,18 +63,17 @@ iceberg = { version = "0.2.0", path = "./crates/iceberg" }
iceberg-catalog-rest = { version = "0.2.0", path = "./crates/catalog/rest" }
iceberg-catalog-hms = { version = "0.2.0", path = "./crates/catalog/hms" }
itertools = "0.13"
lazy_static = "1"
log = "^0.4"
mockito = "^1"
murmur3 = "0.5.2"
once_cell = "1"
opendal = "0.46"
opendal = "0.47"
ordered-float = "4.0.0"
parquet = "51"
pilota = "0.11.0"
parquet = "52"
pilota = "0.11.2"
pretty_assertions = "1.4.0"
port_scanner = "0.1.5"
reqwest = { version = "^0.12", features = ["json"] }
reqwest = { version = "^0.12", default-features = false, features = ["json"] }
rust_decimal = "1.31.0"
serde = { version = "^1.0", features = ["rc"] }
serde_bytes = "0.11.8"
Expand All @@ -80,11 +82,10 @@ serde_json = "^1.0"
serde_repr = "0.1.16"
serde_with = "3.4.0"
tempfile = "3.8"
tokio = { version = "1", features = ["macros"] }
tokio = { version = "1", default-features = false }
typed-builder = "^0.18"
url = "2"
urlencoding = "2"
uuid = { version = "1.6.1", features = ["v7"] }
volo-thrift = "0.9.2"
hive_metastore = "0.0.2"
volo-thrift = "0.10"
hive_metastore = "0.1.0"
tera = "1"
31 changes: 19 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,30 +17,37 @@

.EXPORT_ALL_VARIABLES:

RUST_LOG = debug

build:
cargo build
cargo build --all-targets --all-features --workspace

check-fmt:
cargo fmt --all -- --check
cargo fmt --all -- --check

check-clippy:
cargo clippy --all-targets --all-features --workspace -- -D warnings
cargo clippy --all-targets --all-features --workspace -- -D warnings

install-cargo-sort:
cargo install cargo-sort@1.0.9

cargo-sort:
cargo install cargo-sort
cargo-sort: install-cargo-sort
cargo sort -c -w

fix-toml:
cargo install taplo-cli --locked
install-cargo-machete:
cargo install cargo-machete

cargo-machete: install-cargo-machete
cargo machete

install-taplo-cli:
cargo install taplo-cli@0.9.0

fix-toml: install-taplo-cli
taplo fmt

check-toml:
cargo install taplo-cli --locked
check-toml: install-taplo-cli
taplo check

check: check-fmt check-clippy cargo-sort check-toml
check: check-fmt check-clippy cargo-sort check-toml cargo-machete

doc-test:
cargo test --no-fail-fast --doc --all-features --workspace
Expand Down
Loading

0 comments on commit bcdcbef

Please sign in to comment.