You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iceberg.apache.org by li...@apache.org on 2026/07/06 09:22:03 UTC
(iceberg-rust) branch main updated: ci: split lint checks and slim clippy (#2771)
This is an automated email from the ASF dual-hosted git repository.
blackmwk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iceberg-rust.git
The following commit(s) were added to refs/heads/main by this push:
new 22e80a63d ci: split lint checks and slim clippy (#2771)
22e80a63d is described below
commit 22e80a63dbb4e58e034672b4ff665a6eae82fa02
Author: Abanoub Doss <ab...@gmail.com>
AuthorDate: Mon Jul 6 04:21:57 2026 -0500
ci: split lint checks and slim clippy (#2771)
## Which issue does this PR close?
- None. Implements the `check` job split from discussion #2753.
## What changes are included in this PR?
Splits the old `check` job (ubuntu + macos) into two ubuntu jobs:
- `lint`: the non-compiling checks (license header, toml format, cargo
fmt, Cargo.lock, cargo-machete, typos). The standalone Typos workflow is
folded in, and taplo and cargo-machete come as prebuilt binaries.
- `clippy`: `make check-clippy` only.
As suggested in #2753, the heavier jobs now have `needs: lint`, so a fmt
or typo mistake fails fast without spinning up builds. The tradeoff is
that a lint failure blocks all downstream jobs.
This also removes the macOS clippy run. Nothing in the repo is gated on
`target_os`, so clippy output is identical across platforms, and macOS
compile coverage stays in the build jobs. The macOS `check` job was CI's
slowest at 10 to 12 minutes.
## Are these changes tested?
CI-only change, exercised by this PR's own CI run.
Co-authored-by: Abanoub Doss <ab...@gmail.com>
---
.github/workflows/ci.yml | 53 ++++++++++++++++++++++++++++--------------
.github/workflows/ci_typos.yml | 50 ---------------------------------------
Makefile | 2 ++
3 files changed, 38 insertions(+), 67 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 970263e1e..d3c171348 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -44,14 +44,8 @@ permissions:
contents: read
jobs:
- check:
- runs-on: ${{ matrix.os }}
- strategy:
- max-parallel: 15
- matrix:
- os:
- - ubuntu-latest
- - macos-latest
+ lint:
+ runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
@@ -60,16 +54,17 @@ jobs:
- name: Setup Rust toolchain
uses: ./.github/actions/setup-builder
+ - name: Install lint tools
+ # Keep versions in sync with the local install targets in Makefile.
+ uses: taiki-e/install-action@9e1e5806d4a4822de933115878265be9aaa786d9 # v2.82.2
+ with:
+ tool: taplo@0.9.3,cargo-machete@0.7.0
+
- name: Check License Header
uses: apache/skywalking-eyes/header@61275cc80d0798a405cb070f7d3a8aaf7cf2c2c1 # v0.8.0
- name: Check toml format
- run: make check-toml
-
- - name: Install protoc
- uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0
- with:
- repo-token: ${{ secrets.GITHUB_TOKEN }}
+ run: taplo fmt --check
- name: Cargo format
run: make check-fmt
@@ -80,13 +75,33 @@ jobs:
- name: Check Cargo.lock is up-to-date
run: cargo update --workspace --locked
+ - name: Cargo Machete
+ run: cargo machete
+
+ - name: Check typos
+ uses: crate-ci/typos@37bb98842b0d8c4ffebdb75301a13db0267cef89 # v1.47.2
+
+ clippy:
+ needs: lint
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
+ with:
+ persist-credentials: false
+
+ - name: Setup Rust toolchain
+ uses: ./.github/actions/setup-builder
+
+ - name: Install protoc
+ uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0
+ with:
+ repo-token: ${{ secrets.GITHUB_TOKEN }}
+
- name: Cargo clippy
run: make check-clippy
- - name: Cargo Machete
- run: make cargo-machete
-
build:
+ needs: lint
runs-on: ${{ matrix.os }}
env:
CARGO_INCREMENTAL: "0"
@@ -122,6 +137,7 @@ jobs:
# Checks each crate individually to catch missing feature declarations that
# are otherwise masked by Cargo's feature unification across the workspace.
check_standalone:
+ needs: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
@@ -151,6 +167,7 @@ jobs:
# Verifies the core iceberg crate compiles without default features, ensuring
# optional functionality is properly gated behind feature flags.
build_with_no_default_features:
+ needs: lint
runs-on: ${{ matrix.os }}
env:
CARGO_INCREMENTAL: "0"
@@ -179,6 +196,7 @@ jobs:
run: cargo build -p iceberg --no-default-features
tests:
+ needs: lint
runs-on: ubuntu-latest
env:
CARGO_INCREMENTAL: "0"
@@ -240,6 +258,7 @@ jobs:
msrv:
name: Verify MSRV
+ needs: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
diff --git a/.github/workflows/ci_typos.yml b/.github/workflows/ci_typos.yml
deleted file mode 100644
index bd86fdeec..000000000
--- a/.github/workflows/ci_typos.yml
+++ /dev/null
@@ -1,50 +0,0 @@
-# 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: Typos Check
-
-on:
- push:
- branches:
- - main
- pull_request:
- branches:
- - main
-
-concurrency:
- group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
- cancel-in-progress: true
-
-env:
- RUST_BACKTRACE: 1
-
-permissions:
- contents: read
-
-jobs:
- typos-check:
- name: typos check
- runs-on: ubuntu-slim
- timeout-minutes: 10
- env:
- FORCE_COLOR: 1
- steps:
- - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- with:
- persist-credentials: false
- - name: Check typos
- uses: crate-ci/typos@37bb98842b0d8c4ffebdb75301a13db0267cef89 # v1.47.2
diff --git a/Makefile b/Makefile
index a2f05e802..c5748718a 100644
--- a/Makefile
+++ b/Makefile
@@ -26,6 +26,7 @@ check-fmt:
check-clippy:
cargo clippy --all-targets --all-features --workspace -- -D warnings
+# Keep version in sync with the CI lint install step in .github/workflows/ci.yml.
install-cargo-machete:
cargo install --locked cargo-machete@0.7.0
@@ -38,6 +39,7 @@ install-cargo-nextest:
nextest: install-cargo-nextest
cargo nextest run --all-targets --all-features --workspace
+# Keep version in sync with the CI lint install step in .github/workflows/ci.yml.
install-taplo-cli:
cargo install --locked taplo-cli@0.9.3