Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.3.0 | The Client is now thread-safe #5

Merged
merged 6 commits into from
Apr 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 30 additions & 45 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,74 +19,59 @@ permissions:
contents: read

jobs:
linux_x86_64:
linux:
runs-on: ${{ matrix.platform.runner }}
strategy:
matrix:
platform:
- runner: ubuntu-latest
target: x86_64
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out dist --zig -i python${{ matrix.python-version }}
sccache: 'true'
manylinux: auto
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-linux-${{ matrix.platform.target }}-python${{ matrix.python-version }}
path: dist
- name: pytest
shell: bash
run: |
set -e
pip install pyreqwest_impersonate --find-links dist --no-index --force-reinstall
pip install pytest
pytest

linux_aarch64:
runs-on: ${{ matrix.platform.runner }}
strategy:
matrix:
platform:
- runner: ubuntu-latest
target: aarch64
python-version: ['3.10']
- runner: ubuntu-latest
target: armv7
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
python-version: '3.10'
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out dist --zig --find-interpreter
args: --release --out dist --zig
sccache: 'true'
manylinux: auto
env:
CFLAGS_aarch64_unknown_linux_gnu: "-D__ARM_ARCH=8"
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-linux-${{ matrix.platform.target }}-python${{ matrix.python-version }}
name: wheels-linux-${{ matrix.platform.target }}
path: dist
- name: pytest
if: ${{ !startsWith(matrix.platform.target, 'aarch64') }}
if: ${{ startsWith(matrix.platform.target, 'x86_64') }}
shell: bash
run: |
set -e
pip install pyreqwest_impersonate --find-links dist --no-index --force-reinstall
pip install pyreqwest_impersonate --find-links dist --force-reinstall
pip install pytest
pytest
- name: pytest
if: ${{ !startsWith(matrix.platform.target, 'x86') && matrix.platform.target != 'ppc64' }}
uses: uraimo/[email protected]
with:
arch: ${{ matrix.platform.target }}
distro: ubuntu22.04
githubToken: ${{ github.token }}
install: |
apt-get update
apt-get install -y --no-install-recommends python3 python3-pip
pip3 install -U pip pytest
run: |
set -e
pip3 install pyreqwest_impersonate --find-links dist --force-reinstall
pytest

windows:
runs-on: ${{ matrix.platform.runner }}
Expand All @@ -107,19 +92,19 @@ jobs:
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out dist --find-interpreter
args: --release --out dist
sccache: 'true'
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-windows-${{ matrix.platform.target }}-python${{ matrix.python-version }}
name: wheels-windows-${{ matrix.platform.target }}
path: dist
- name: pytest
if: ${{ !startsWith(matrix.platform.target, 'aarch64') }}
shell: bash
run: |
set -e
pip install pyreqwest_impersonate --find-links dist --no-index --force-reinstall
pip install pyreqwest_impersonate --find-links dist --force-reinstall
pip install pytest
pytest

Expand All @@ -141,19 +126,19 @@ jobs:
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out dist --find-interpreter
args: --release --out dist
sccache: 'true'
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-macos-${{ matrix.platform.target }}-python${{ matrix.python-version }}
name: wheels-macos-${{ matrix.platform.target }}
path: dist
- name: pytest
if: ${{ !startsWith(matrix.platform.target, 'aarch64') }}
shell: bash
run: |
set -e
pip install pyreqwest_impersonate --find-links dist --no-index --force-reinstall
pip install pyreqwest_impersonate --find-links dist --force-reinstall
pip install pytest
pytest

Expand All @@ -176,7 +161,7 @@ jobs:
name: Release
runs-on: ubuntu-latest
if: "startsWith(github.ref, 'refs/tags/')"
needs: [linux_x86_64, linux_aarch64, windows, macos, sdist]
needs: [linux, windows, macos, sdist]
steps:
- uses: actions/download-artifact@v4
- name: Publish to PyPI
Expand Down
Loading
Loading