From 02ea37ed88f09cb731553750fcd348eee0cd8d2f Mon Sep 17 00:00:00 2001 From: govindchari Date: Wed, 11 Mar 2026 13:00:18 -0700 Subject: [PATCH 1/4] Fix build --- .github/workflows/build.yml | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a54eb97..d9b09bc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,9 +1,6 @@ -# Taken from osqp-python - name: Build Wheels on: - # Triggers the workflow on push or pull request events push: branches: - "*" @@ -18,14 +15,15 @@ jobs: runs-on: ubuntu-latest strategy: fail-fast: false + steps: - - uses: actions/checkout@master + - uses: actions/checkout@v4 with: - submodules: "recursive" + submodules: recursive - name: Build source and wheel run: | - python -m pip install build + python -m pip install --upgrade pip build python -m build --outdir=wheelhouse - name: Upload sdist and wheel to github @@ -38,6 +36,7 @@ jobs: build_wheels: name: Building wheels on ${{ matrix.os }} runs-on: ${{ matrix.os }} + strategy: fail-fast: false matrix: @@ -49,12 +48,22 @@ jobs: fetch-depth: 0 submodules: true - - uses: pypa/cibuildwheel@v2.21 + - name: Cache cibuildwheel + uses: actions/cache@v4 + with: + path: | + ~/.cache/cibuildwheel + ~/Library/Caches/cibuildwheel + key: cibuildwheel-${{ runner.os }} + + - name: Build wheels + uses: pypa/cibuildwheel@v2.21 env: CIBW_SKIP: "pp38-*" + CIBW_BUILD_VERBOSITY: 1 - name: Upload wheels uses: actions/upload-artifact@v4 with: name: cibw-wheels-${{ matrix.os }} - path: wheelhouse/*.whl \ No newline at end of file + path: wheelhouse/*.whl From c17581c419f8d68f7e744c2b3da0cc5cd53dc257 Mon Sep 17 00:00:00 2001 From: govindchari Date: Wed, 11 Mar 2026 13:03:08 -0700 Subject: [PATCH 2/4] Add token --- .github/workflows/build.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d9b09bc..f45773a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -56,6 +56,15 @@ jobs: ~/Library/Caches/cibuildwheel key: cibuildwheel-${{ runner.os }} + - name: Pre-download virtualenv + run: | + mkdir -p ~/Library/Caches/cibuildwheel + curl -L -H "Authorization: Bearer $GITHUB_TOKEN" \ + https://github.com/pypa/get-virtualenv/raw/20.26.6/public/virtualenv.pyz \ + -o ~/Library/Caches/cibuildwheel/virtualenv-20.26.6.pyz + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Build wheels uses: pypa/cibuildwheel@v2.21 env: From c76670c6a7eb9d2e8375aa245d8ef3a7e5b1f518 Mon Sep 17 00:00:00 2001 From: govindchari Date: Wed, 11 Mar 2026 13:10:42 -0700 Subject: [PATCH 3/4] fix windows --- .github/workflows/build.yml | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f45773a..ba2ab6c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -54,23 +54,17 @@ jobs: path: | ~/.cache/cibuildwheel ~/Library/Caches/cibuildwheel + C:\Users\runneradmin\AppData\Local\pypa\cibuildwheel\Cache key: cibuildwheel-${{ runner.os }} - - name: Pre-download virtualenv - run: | - mkdir -p ~/Library/Caches/cibuildwheel - curl -L -H "Authorization: Bearer $GITHUB_TOKEN" \ - https://github.com/pypa/get-virtualenv/raw/20.26.6/public/virtualenv.pyz \ - -o ~/Library/Caches/cibuildwheel/virtualenv-20.26.6.pyz - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Install virtualenv + run: python -m pip install virtualenv - name: Build wheels uses: pypa/cibuildwheel@v2.21 env: CIBW_SKIP: "pp38-*" CIBW_BUILD_VERBOSITY: 1 - - name: Upload wheels uses: actions/upload-artifact@v4 with: From dee8450bc36c41c415417598646700af8e01a1a4 Mon Sep 17 00:00:00 2001 From: govindchari Date: Wed, 11 Mar 2026 13:13:03 -0700 Subject: [PATCH 4/4] Fix --- .github/workflows/build.yml | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ba2ab6c..452c323 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -57,14 +57,37 @@ jobs: C:\Users\runneradmin\AppData\Local\pypa\cibuildwheel\Cache key: cibuildwheel-${{ runner.os }} - - name: Install virtualenv - run: python -m pip install virtualenv + # Pre-download virtualenv for macOS + - name: Pre-download virtualenv (macOS) + if: runner.os == 'macOS' + run: | + mkdir -p ~/Library/Caches/cibuildwheel + curl -L -H "Authorization: Bearer $GITHUB_TOKEN" \ + https://github.com/pypa/get-virtualenv/raw/20.26.6/public/virtualenv.pyz \ + -o ~/Library/Caches/cibuildwheel/virtualenv-20.26.6.pyz + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + # Pre-download virtualenv for Windows + - name: Pre-download virtualenv (Windows) + if: runner.os == 'Windows' + shell: pwsh + run: | + $cache = "$env:LOCALAPPDATA\pypa\cibuildwheel\Cache" + New-Item -ItemType Directory -Force -Path $cache + Invoke-WebRequest ` + -Headers @{Authorization="Bearer $env:GITHUB_TOKEN"} ` + -Uri "https://github.com/pypa/get-virtualenv/raw/20.26.6/public/virtualenv.pyz" ` + -OutFile "$cache\virtualenv-20.26.6.pyz" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Build wheels uses: pypa/cibuildwheel@v2.21 env: CIBW_SKIP: "pp38-*" CIBW_BUILD_VERBOSITY: 1 + - name: Upload wheels uses: actions/upload-artifact@v4 with: