WS: Sync WebSocket Overhaul #1455
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and test | |
| on: | |
| workflow_call: | |
| pull_request: | |
| branches: | |
| - main | |
| push: | |
| branches: | |
| - main | |
| - bugfix/* | |
| - feature/* | |
| - release/* | |
| - chore/* | |
| - security/* | |
| permissions: | |
| contents: read | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.10" | |
| - name: Lint | |
| run: | | |
| pip install ruff | |
| ruff check --exclude issues | |
| sdist: | |
| name: Build sdist wheel | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.10" | |
| - name: build sdist | |
| run: | | |
| make preprocess | |
| pip install build | |
| python -m build --sdist | |
| pip install ./dist/*.tar.gz | |
| - name: upload artifacts | |
| uses: actions/upload-artifact@v4 # https://github.com/actions/upload-artifact/issues/478 | |
| with: | |
| name: curl_cffi-${{ github.sha }}-sdist.zip | |
| path: ./dist/*.tar.gz | |
| bdist: | |
| name: Build bdist wheels and test | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-24.04, macos-15-intel, macos-14, windows-2022, windows-11-arm] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - if: runner.os == 'Linux' | |
| uses: docker/setup-qemu-action@v3 | |
| with: | |
| platforms: all | |
| # macOS make is too old | |
| - if: runner.os == 'macOS' | |
| run: | | |
| brew install make automake libtool | |
| - name: Build and test wheels | |
| uses: pypa/cibuildwheel@v3.3.1 | |
| # - name: Setup tmate session | |
| # uses: mxschmitt/action-tmate@v3 | |
| - uses: actions/upload-artifact@v4 # https://github.com/actions/upload-artifact/issues/478 | |
| with: | |
| name: curl_cffi-${{ github.sha }}-${{ matrix.os }}.zip | |
| path: ./wheelhouse/*.whl | |
| bdist_android: | |
| name: Build Android wheels | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '17' | |
| - uses: android-actions/setup-android@v3 | |
| - name: Build wheels (Android) | |
| uses: pypa/cibuildwheel@v3.3.1 | |
| env: | |
| CIBW_PLATFORM: android | |
| CIBW_BUILD: cp313-android_arm64_v8a | |
| ANDROID_HOME: ${{ env.ANDROID_SDK_ROOT }} | |
| ANDROID_API_LEVEL: 24 | |
| - uses: actions/upload-artifact@v4 # https://github.com/actions/upload-artifact/issues/478 | |
| with: | |
| name: curl_cffi-${{ github.sha }}-android.zip | |
| path: ./wheelhouse/*.whl | |
| # Make our build process future-proof | |
| build_latest: | |
| name: Build bdist on latest OSes | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| # For linux, it's built inside a container, no need to test for latest versions. | |
| os: [macos-latest, windows-latest, windows-11-arm] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - if: runner.os == 'Linux' | |
| uses: docker/setup-qemu-action@v3 | |
| with: | |
| platforms: all | |
| # macOS make is too old | |
| - if: runner.os == 'macOS' | |
| run: | | |
| brew install make automake libtool | |
| - name: Build and test wheels | |
| uses: pypa/cibuildwheel@v3.3.1 |