forked from apache/iceberg-rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
113 changed files
with
9,827 additions
and
4,248 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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/[email protected] | ||
|
||
- 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 | ||
|
||
|
@@ -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: | ||
|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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/[email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,6 +47,11 @@ jobs: | |
- name: Copy asf file | ||
run: cp .asf.yaml ./website/book/.asf.yaml | ||
|
||
- name: Build API docs | ||
run: | | ||
cargo doc --no-deps --workspace --all-features | ||
cp -r target/doc ./website/book/api | ||
- name: Deploy to gh-pages | ||
uses: peaceiris/[email protected] | ||
if: github.event_name == 'push' && github.ref_name == 'main' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 [email protected] | ||
|
||
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 [email protected] | ||
|
||
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 | ||
|
Oops, something went wrong.