From 673fd9b7cd73baa598ae0c4fa9d4fa8ee03ec9fe Mon Sep 17 00:00:00 2001 From: Andy Lee Date: Fri, 25 Jul 2025 00:20:21 -0700 Subject: [PATCH] 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 --- .github/workflows/build-cibuildwheel.yml | 5 +-- .github/workflows/build-reusable.yml | 34 ++++++++++++++++--- .github/workflows/release-manual.yml | 6 ++-- .../leann-backend-diskann/third_party/DiskANN | 2 +- 4 files changed, 36 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build-cibuildwheel.yml b/.github/workflows/build-cibuildwheel.yml index 5ef5f49..b5b38ef 100644 --- a/.github/workflows/build-cibuildwheel.yml +++ b/.github/workflows/build-cibuildwheel.yml @@ -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 \ No newline at end of file diff --git a/.github/workflows/build-reusable.yml b/.github/workflows/build-reusable.yml index 77c79b0..9ecada2 100644 --- a/.github/workflows/build-reusable.yml +++ b/.github/workflows/build-reusable.yml @@ -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/ \ No newline at end of file diff --git a/.github/workflows/release-manual.yml b/.github/workflows/release-manual.yml index 200963d..9a61b86 100644 --- a/.github/workflows/release-manual.yml +++ b/.github/workflows/release-manual.yml @@ -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 diff --git a/packages/leann-backend-diskann/third_party/DiskANN b/packages/leann-backend-diskann/third_party/DiskANN index af2a264..25339b0 160000 --- a/packages/leann-backend-diskann/third_party/DiskANN +++ b/packages/leann-backend-diskann/third_party/DiskANN @@ -1 +1 @@ -Subproject commit af2a26481e65232b57b82d96e68833cdee9f7635 +Subproject commit 25339b03413b5067c25b6092ea3e0f77ef8515c8