fix: upgrade to actions v4 and handle manylinux2014 compatibility

- Upgrade all GitHub Actions to v4 (v3 is deprecated)
- Use manual git checkout in manylinux2014 containers to avoid Node.js issues
- Update artifact naming to ensure uniqueness (required by v4)
- Add fail-fast: false to build strategies
- This maintains manylinux2014 compatibility while using latest actions
This commit is contained in:
Andy Lee
2025-07-25 00:20:21 -07:00
parent 84b24b233d
commit 673fd9b7cd
4 changed files with 36 additions and 11 deletions

View File

@@ -14,11 +14,12 @@ jobs:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}
submodules: recursive
@@ -94,7 +95,7 @@ jobs:
CIBW_SKIP: "*-win32 *-manylinux_i686 pp*"
# Pure Python meta-package
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}
path: ./wheelhouse/*.whl

View File

@@ -13,6 +13,7 @@ jobs:
build:
name: Build ${{ matrix.os }} Python ${{ matrix.python }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
@@ -43,15 +44,38 @@ jobs:
container: ${{ matrix.container }}
steps:
# Use v3 for manylinux2014 compatibility (Node.js 16 instead of 20)
- uses: actions/checkout@v3
# For manylinux2014 compatibility, we'll handle checkout differently
- uses: actions/checkout@v4
if: matrix.container == ''
with:
ref: ${{ inputs.ref }}
submodules: recursive
# Manual checkout for containers to avoid Node.js compatibility issues
- name: Manual checkout in container
if: matrix.container != ''
run: |
# Install git if not available
yum install -y git || true
# Clone the repository manually in the container
git init
git remote add origin https://github.com/${GITHUB_REPOSITORY}.git
# Fetch the appropriate ref
if [ -n "${{ inputs.ref }}" ]; then
git fetch --depth=1 origin ${{ inputs.ref }}
else
git fetch --depth=1 origin ${GITHUB_SHA}
fi
git checkout FETCH_HEAD
# Initialize submodules
git submodule update --init --recursive
- name: Setup Python (macOS and regular Ubuntu)
if: matrix.container == ''
uses: actions/setup-python@v4 # v4 for better compatibility
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
@@ -224,7 +248,7 @@ jobs:
find packages/*/dist -name "*.whl" -o -name "*.tar.gz" | sort
- name: Upload artifacts
uses: actions/upload-artifact@v3 # v3 for manylinux2014 compatibility
uses: actions/upload-artifact@v4
with:
name: packages-${{ matrix.os }}-py${{ matrix.python }}
name: packages-${{ matrix.os }}-py${{ matrix.python }}${{ matrix.container && '-manylinux' || '' }}
path: packages/*/dist/

View File

@@ -23,7 +23,7 @@ jobs:
commit-sha: ${{ steps.push.outputs.commit-sha }}
steps:
- uses: actions/checkout@v3 # Compatibility with manylinux2014
- uses: actions/checkout@v4
- name: Validate version
run: |
@@ -72,12 +72,12 @@ jobs:
contents: write
steps:
- uses: actions/checkout@v3 # Consistency with build workflow
- uses: actions/checkout@v4
with:
ref: ${{ needs.update-version.outputs.commit-sha }}
- name: Download all artifacts
uses: actions/download-artifact@v3 # Match upload-artifact version
uses: actions/download-artifact@v4
with:
path: dist-artifacts