Skip to content

Commit 31d5cf8

Browse files
committed
Revert "Avoid building the wheel if possible during documentation generation"
This reverts commit 1a8a7a4.
1 parent 1a8a7a4 commit 31d5cf8

File tree

1 file changed

+14
-73
lines changed

1 file changed

+14
-73
lines changed

.github/workflows/docs.yaml

Lines changed: 14 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,19 @@ on:
77
pull_request:
88
branches:
99
- main
10-
# Run after build workflow completes so we can get the built artifact
11-
workflow_run:
12-
workflows: ["Python Release Build"]
13-
types:
14-
- completed
1510

1611
name: Deploy DataFusion Python site
1712

1813
jobs:
19-
debug-github-context:
14+
debug-github-context:
2015
name: Print github context
2116
runs-on: ubuntu-latest
2217
steps:
23-
- name: Dump GitHub context
24-
env:
25-
GITHUB_CONTEXT: ${{ toJson(github) }}
26-
run: |
27-
echo "$GITHUB_CONTEXT"
28-
18+
- name: Dump GitHub context
19+
env:
20+
GITHUB_CONTEXT: ${{ toJson(github) }}
21+
run: |
22+
echo "$GITHUB_CONTEXT"
2923
build-docs:
3024
name: Build docs
3125
runs-on: ubuntu-latest
@@ -43,86 +37,33 @@ jobs:
4337
echo "Unsupported input: ${{ github.ref }} / ${{ github.ref_type }}"
4438
exit 1
4539
fi
46-
4740
- name: Checkout docs sources
4841
uses: actions/checkout@v5
49-
5042
- name: Checkout docs target branch
5143
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref_type == 'tag')
5244
uses: actions/checkout@v5
5345
with:
5446
fetch-depth: 0
5547
ref: ${{ steps.target-branch.outputs.value }}
5648
path: docs-target
57-
5849
- name: Setup Python
5950
uses: actions/setup-python@v5
6051
with:
6152
python-version: "3.11"
6253

63-
- name: Install dependencies
64-
uses: astral-sh/setup-uv@v6
54+
- name: Install Protoc
55+
uses: arduino/setup-protoc@v3
6556
with:
66-
enable-cache: true
57+
version: '27.4'
58+
repo-token: ${{ secrets.GITHUB_TOKEN }}
6759

68-
# Try to download pre-built wheel from the build workflow
69-
- name: Download wheel from build workflow
70-
id: download-wheel
71-
continue-on-error: true
72-
uses: actions/download-artifact@v5
60+
- name: Install dependencies and build
61+
uses: astral-sh/setup-uv@v6
7362
with:
74-
name: dist
75-
path: wheels/
76-
# For workflow_run events, get artifacts from the triggering workflow
77-
run-id: ${{ github.event.workflow_run.id || github.run_id }}
63+
enable-cache: true
7864

79-
# Check if we have a compatible wheel
80-
- name: Check for compatible wheel
81-
id: check-wheel
65+
- name: Build repo
8266
run: |
83-
set -x
84-
if [ -d "wheels/" ] && [ "$(ls -A wheels/)" ]; then
85-
echo "Available wheels:"
86-
ls -la wheels/
87-
88-
# Find a compatible wheel for Linux x86_64 (the docs runner)
89-
WHEEL=$(find wheels/ -name "*linux_x86_64*.whl" -o -name "*manylinux*x86_64*.whl" | head -1)
90-
if [ -n "$WHEEL" ]; then
91-
echo "Found compatible wheel: $WHEEL"
92-
echo "wheel-found=true" >> "$GITHUB_OUTPUT"
93-
echo "wheel-path=$WHEEL" >> "$GITHUB_OUTPUT"
94-
else
95-
echo "No compatible wheel found for Linux x86_64"
96-
echo "wheel-found=false" >> "$GITHUB_OUTPUT"
97-
fi
98-
else
99-
echo "No wheels directory or wheels found"
100-
echo "wheel-found=false" >> "$GITHUB_OUTPUT"
101-
fi
102-
103-
# Install from pre-built wheel if available
104-
- name: Install from pre-built wheel
105-
if: steps.check-wheel.outputs.wheel-found == 'true'
106-
run: |
107-
set -x
108-
uv venv
109-
# Install documentation dependencies
110-
uv sync --dev --no-install-package datafusion --group docs
111-
# Install the pre-built wheel
112-
uv pip install "${{ steps.check-wheel.outputs.wheel-path }}"
113-
echo "Installed datafusion from pre-built wheel"
114-
115-
# Fallback: Build from source if no wheel is available
116-
- name: Build from source (fallback)
117-
if: steps.check-wheel.outputs.wheel-found != 'true'
118-
run: |
119-
set -x
120-
echo "No compatible pre-built wheel found, building from source"
121-
122-
# Install Protoc for building from source
123-
sudo apt-get update
124-
sudo apt-get install -y protobuf-compiler
125-
12667
uv venv
12768
uv sync --dev --no-install-package datafusion --group docs
12869
uv run --no-project maturin develop --uv

0 commit comments

Comments
 (0)