Skip to content

Commit

Permalink
merge origin/main
Browse files Browse the repository at this point in the history
  • Loading branch information
flaneur2020 committed Jan 24, 2025
2 parents 569bb7a + ee4e063 commit 5b36838
Show file tree
Hide file tree
Showing 47 changed files with 3,262 additions and 966 deletions.
16 changes: 11 additions & 5 deletions .github/actions/setup-builder/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,24 @@ 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'
description: 'version of rust to install and use'
runs:
using: "composite"
steps:
- name: Setup Rust toolchain
- name: Setup specified Rust toolchain
shell: bash
if: ${{ inputs.rust-version != '' }}
run: |
echo "Installing ${{ inputs.rust-version }}"
rustup toolchain install ${{ inputs.rust-version }}
rustup default ${{ inputs.rust-version }}
rustup override set ${{ inputs.rust-version }}
rustup component add rustfmt clippy
- name: Setup Rust toolchain according to rust-toolchain.toml
shell: bash
if: ${{ inputs.rust-version == '' }}
run: |
echo "Installing toolchain according to rust-toolchain.toml"
rustup show
rustup component add rustfmt clippy
- name: Fixup git permissions
# https://github.com/actions/checkout/issues/766
Expand Down
54 changes: 43 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,18 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Setup Rust toolchain
uses: ./.github/actions/setup-builder

- 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
uses: taiki-e/install-action@v2
with:
tool: [email protected]
- name: Check toml format
run: make check-toml

- name: Cargo format
run: make check-fmt
Expand All @@ -61,11 +65,19 @@ jobs:
- name: Cargo clippy
run: make check-clippy

- name: Install cargo-sort
uses: taiki-e/install-action@v2
with:
tool: [email protected]
- name: Cargo sort
run: make cargo-sort
run: cargo sort -c -w

- name: Install cargo-machete
uses: taiki-e/install-action@v2
with:
tool: cargo-machete
- name: Cargo Machete
run: make cargo-machete
run: cargo machete

build:
runs-on: ${{ matrix.os }}
Expand All @@ -80,12 +92,10 @@ jobs:

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

- name: Cache Rust artifacts
uses: Swatinem/rust-cache@v2

- name: Build
run: make build

Expand All @@ -100,6 +110,9 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Setup Rust toolchain
uses: ./.github/actions/setup-builder

- name: Cache Rust artifacts
uses: Swatinem/rust-cache@v2

Expand All @@ -113,8 +126,6 @@ jobs:

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

- name: Cache Rust artifacts
uses: Swatinem/rust-cache@v2
Expand All @@ -127,3 +138,24 @@ jobs:

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

msrv:
name: Verify MSRV
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Nightly Rust toolchain
uses: ./.github/actions/setup-builder
- name: Generate minimal versions lockfile
run: |
cargo generate-lockfile -Z direct-minimal-versions -Z minimal-versions
# Some dependencies don't correctly specify a minimal version for their dependencies and will fail to build.
# So we update these transitive dependencies here.
cargo update tap faststr metainfo linkedbytes
- name: Setup MSRV Rust toolchain
uses: ./.github/actions/setup-builder
with:
rust-version: ${{ env.rust_msrv }}
- name: Check MSRV
run: |
cargo +${{ env.rust_msrv }} check --locked --workspace --exclude iceberg-datafusion --exclude iceberg-catalog-s3tables --exclude iceberg-integration-tests
2 changes: 1 addition & 1 deletion .github/workflows/ci_typos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Check typos
uses: crate-ci/typos@v1.28.4
uses: crate-ci/typos@v1.29.4
Loading

0 comments on commit 5b36838

Please sign in to comment.