Skip to content

Commit a7ed2f6

Browse files
committed
Try only running clippy when we can reuse build artifacts
1 parent bf0bb97 commit a7ed2f6

File tree

1 file changed

+7
-21
lines changed

1 file changed

+7
-21
lines changed

.github/workflows/build.yml

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -139,29 +139,13 @@ jobs:
139139
with:
140140
key: ${{ inputs.build_mode }}
141141

142-
- name: Install Python
143-
uses: actions/setup-python@v5
144-
with:
145-
python-version: ${{ matrix.python-version }}
146-
147142
- uses: astral-sh/setup-uv@v6
148143
with:
149144
enable-cache: true
150145

151146
- name: Install dependencies
152147
run: uv sync --dev --no-install-package datafusion
153148

154-
- name: Run Clippy
155-
run: cargo clippy --all-targets --features protoc,substrait -- -D warnings
156-
157-
- name: Build (${{ inputs.build_mode }} mode)
158-
run: |
159-
if [[ "${{ inputs.build_mode }}" == "release" ]]; then
160-
uv run --no-project maturin build --release --strip --manylinux 2014 --features protoc,substrait
161-
else
162-
uv run --no-project maturin build --manylinux 2014 --features protoc,substrait
163-
fi
164-
165149
- name: Build (release mode)
166150
uses: PyO3/maturin-action@v1
167151
if: inputs.build_mode == 'release'
@@ -213,11 +197,6 @@ jobs:
213197
with:
214198
key: ${{ inputs.build_mode }}
215199

216-
# - name: Install Python
217-
# uses: actions/setup-python@v5
218-
# with:
219-
# python-version: ${{ matrix.python-version }}
220-
221200
- uses: astral-sh/setup-uv@v6
222201
with:
223202
enable-cache: true
@@ -298,6 +277,13 @@ jobs:
298277
- name: Install dependencies
299278
run: uv sync --dev --no-install-package datafusion
300279

280+
# Run clippy BEFORE maturin so we can avoid rebuilding. The features must match
281+
# exactly the features used by maturin. Linux maturin builds need to happen in a
282+
# container so only run this for our mac runner.
283+
- name: Run Clippy
284+
if: matrix.os != 'windows-latest'
285+
run: cargo clippy --no-deps --all-targets --features protoc,substrait -- -D warnings
286+
301287
- name: Build Python package (release mode)
302288
if: inputs.build_mode == 'release'
303289
run: uv run --no-project maturin build --release --strip --features substrait

0 commit comments

Comments
 (0)