Skip to content

Commit 5488c94

Browse files
committed
Fix CI/CD workflow issues: justfile environment variables and manylinux setup
## Issues Fixed ### 1. justfile AUTOBAHN_USE_NVX Override - justfile was hardcoding AUTOBAHN_USE_NVX=1, ignoring environment variables - Changed to: AUTOBAHN_USE_NVX=${AUTOBAHN_USE_NVX:-1} (respects existing setting) - Now workflows can control NVX via environment variables ### 2. manylinux Container Environment - Fixed Python path issues in manylinux containers (/opt/python/*/bin) - Added proper PATH setup for all Python versions - Ensured python3 symlink availability in /usr/local/bin - Fixed tool installation and PATH persistence (uv, rust) - Added comprehensive environment verification ### 3. Workflow Artifact Naming - Renamed "pure-python-wheel" to "linux-wheels-no-nvx" (more accurate) - Updated all download/upload steps to use consistent naming - Fixed artifact listing and verification steps ## Key Changes **justfile**: Environment-aware NVX setting **wheels-docker.yml**: Proper manylinux container setup with Python path fixes **wheels.yml**: Consistent artifact naming and verification The workflows should now properly: - Build pure Python wheels on Linux (AUTOBAHN_USE_NVX=0) - Build binary wheels with NVX on macOS/Windows (AUTOBAHN_USE_NVX=1) - Build manylinux binary wheels with NVX in Docker containers - Handle manylinux Python environment correctly
1 parent d892736 commit 5488c94

3 files changed

Lines changed: 60 additions & 24 deletions

File tree

.github/workflows/wheels-docker.yml

Lines changed: 40 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -80,17 +80,31 @@ jobs:
8080
dnf install -y snappy-devel || echo "snappy-devel not available, skipping"
8181
fi
8282
83-
- name: Verify Python installation
83+
- name: Setup Python environment
8484
run: |
85-
# manylinux images come with multiple Python versions pre-installed
85+
# manylinux images come with multiple Python versions pre-installed in /opt/python/
8686
echo "==> Available Python versions:"
8787
ls -la /opt/python/*/bin/python* 2>/dev/null || echo "No /opt/python found"
88+
89+
# Add all Python versions to PATH for uv/just to discover
90+
for pyver in /opt/python/*/bin; do
91+
if [ -d "$pyver" ]; then
92+
echo "Adding $pyver to PATH"
93+
export PATH="$pyver:$PATH"
94+
fi
95+
done
96+
97+
# Also ensure we have a working python3 symlink
98+
which python3 || ln -sf $(find /opt/python -name python3 | head -1) /usr/local/bin/python3
99+
88100
echo ""
89-
echo "==> Default Python version:"
90-
python3 --version 2>/dev/null || python --version 2>/dev/null || echo "No default Python found"
91-
echo ""
101+
echo "==> Current Python version:"
102+
python3 --version
92103
echo "==> pip version:"
93-
python3 -m pip --version 2>/dev/null || pip --version 2>/dev/null || echo "No pip found"
104+
python3 -m pip --version
105+
106+
# Save the updated PATH for subsequent steps
107+
echo "PATH=$PATH" >> $GITHUB_ENV
94108
95109
- name: Install Just
96110
run: |
@@ -100,12 +114,20 @@ jobs:
100114
- name: Install uv
101115
run: |
102116
curl -LsSf https://astral.sh/uv/install.sh | sh
117+
# Add to both GITHUB_PATH and current environment
103118
echo "/root/.cargo/bin" >> $GITHUB_PATH
119+
echo "PATH=/root/.cargo/bin:$PATH" >> $GITHUB_ENV
120+
export PATH="/root/.cargo/bin:$PATH"
121+
uv --version
104122
105123
- name: Install Rust
106124
run: |
107125
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable
126+
# Add to both GITHUB_PATH and current environment
108127
echo "/root/.cargo/bin" >> $GITHUB_PATH
128+
echo "PATH=/root/.cargo/bin:$PATH" >> $GITHUB_ENV
129+
export PATH="/root/.cargo/bin:$PATH"
130+
rustc --version
109131
110132
- name: Verify toolchain
111133
run: |
@@ -120,10 +142,21 @@ jobs:
120142
echo "glibc: $(ldd --version 2>/dev/null | head -1 || echo 'N/A')"
121143
122144
- name: Build manylinux wheels with NVX
145+
env:
146+
AUTOBAHN_USE_NVX: 1
123147
run: |
148+
# Ensure tools are in PATH
124149
export PATH="/root/.cargo/bin:$PATH"
150+
151+
# Verify environment
152+
echo "==> Environment verification:"
153+
echo "AUTOBAHN_USE_NVX=$AUTOBAHN_USE_NVX"
154+
echo "PATH=$PATH"
155+
echo "Python: $(python3 --version)"
156+
echo "uv: $(uv --version)"
157+
echo "just: $(just --version)"
158+
125159
# Build binary wheels WITH NVX acceleration for manylinux
126-
export AUTOBAHN_USE_NVX=1
127160
just build-all
128161
129162
- name: Generate build metadata

.github/workflows/wheels.yml

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -209,15 +209,18 @@ jobs:
209209
path: dist/*.whl
210210
retention-days: 30
211211

212-
- name: Verify pure Python wheel (Linux x86_64 only)
212+
- name: Verify wheels built without NVX (Linux x86_64 only)
213213
if:
214214
matrix.platform == 'linux' && matrix.arch == 'x86_64'
215215
run: |
216-
# Verify that pure Python wheel was built (should be automatic from build step above)
217-
echo "Pure Python wheel verification:"
218-
ls -la dist/*py3-none-any.whl || echo "No pure Python wheel found (this is expected since Linux builds pure Python wheels)"
219-
echo "All Linux wheels (should be pure Python compatible):"
216+
# Verify that wheels were built without NVX acceleration
217+
echo "==> Wheels built without NVX (should be pure Python or at least NVX-free):"
220218
ls -la dist/*.whl || echo "No wheels found"
219+
echo ""
220+
echo "==> Source distribution:"
221+
ls -la dist/*.tar.gz || echo "No source dist found"
222+
echo ""
223+
echo "==> Wheel count: $(ls dist/*.whl 2>/dev/null | wc -l)"
221224
shell: bash
222225

223226
- name: Upload source distribution (Linux x86_64 only)
@@ -229,13 +232,13 @@ jobs:
229232
path: dist/*.tar.gz
230233
retention-days: 30
231234

232-
- name: Upload pure Python wheel (Linux x86_64 only)
235+
- name: Upload Linux wheels without NVX (Linux x86_64 only)
233236
if:
234237
matrix.platform == 'linux' && matrix.arch == 'x86_64'
235238
uses: actions/upload-artifact@v4
236239
with:
237-
name: pure-python-wheel
238-
path: dist/*py3-none-any.whl
240+
name: linux-wheels-no-nvx
241+
path: dist/*.whl
239242
retention-days: 30
240243

241244
publish-github-releases:
@@ -260,19 +263,19 @@ jobs:
260263
name: source-distribution
261264
path: dist/
262265

263-
- name: Download pure Python wheel
266+
- name: Download Linux wheels without NVX
264267
uses: actions/download-artifact@v4
265268
with:
266-
name: pure-python-wheel
269+
name: linux-wheels-no-nvx
267270
path: dist/
268271

269272
- name: List all artifacts
270273
run: |
271274
echo "All built artifacts:"
272275
ls -la dist/
273276
echo ""
274-
echo "Platform-specific wheels: $(ls dist/*-cp*-*.whl dist/*-pp*-*.whl 2>/dev/null | wc -l)"
275-
echo "Pure Python wheels: $(ls dist/*-py3-none-any.whl 2>/dev/null | wc -l)"
277+
echo "Binary wheels (macOS/Windows): $(ls dist/*macos*.whl dist/*win*.whl 2>/dev/null | wc -l)"
278+
echo "Linux wheels (no NVX): $(ls dist/*linux*.whl 2>/dev/null | wc -l)"
276279
echo "Source distributions: $(ls dist/*.tar.gz 2>/dev/null | wc -l)"
277280
278281
- name: Create GitHub Release
@@ -337,10 +340,10 @@ jobs:
337340
name: source-distribution
338341
path: dist/
339342

340-
- name: Download pure Python wheel
343+
- name: Download Linux wheels without NVX
341344
uses: actions/download-artifact@v4
342345
with:
343-
name: pure-python-wheel
346+
name: linux-wheels-no-nvx
344347
path: dist/
345348

346349
- name: List artifacts for PyPI (selective publishing)
@@ -350,7 +353,7 @@ jobs:
350353
echo ""
351354
echo "macOS wheels: $(ls dist/*macos*.whl 2>/dev/null | wc -l)"
352355
echo "Windows wheels: $(ls dist/*win*.whl 2>/dev/null | wc -l)"
353-
echo "Pure Python wheels: $(ls dist/*py3-none-any.whl 2>/dev/null | wc -l)"
356+
echo "Linux wheels (fallback, no NVX): $(ls dist/*linux*.whl 2>/dev/null | wc -l)"
354357
echo "Source distributions: $(ls dist/*.tar.gz 2>/dev/null | wc -l)"
355358
echo ""
356359
echo "Total PyPI artifacts: $(ls dist/* | wc -l)"

justfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -572,8 +572,8 @@ build venv="": (install-tools venv)
572572
VENV_PATH="{{ VENV_DIR }}/${VENV_NAME}"
573573
VENV_PYTHON=$(just --quiet _get-venv-python "${VENV_NAME}")
574574
echo "==> Building distribution packages..."
575-
# Set environment variable for NVX acceleration
576-
AUTOBAHN_USE_NVX=1 ${VENV_PYTHON} -m build
575+
# Set environment variable for NVX acceleration (defaults to enabled, respects existing setting)
576+
AUTOBAHN_USE_NVX=${AUTOBAHN_USE_NVX:-1} ${VENV_PYTHON} -m build
577577
ls -la dist/
578578
579579
# Meta-recipe to run `build` on all environments

0 commit comments

Comments
 (0)