Skip to content

Commit

Permalink
Feature/rustls (#70)
Browse files Browse the repository at this point in the history
* rustls-tsl backend for reqwest

* dev workflow manylinux adjustment

* dev workflow manylinux adjustment
  • Loading branch information
dbernaciak authored Sep 13, 2024
1 parent 6256b45 commit 43b20f9
Show file tree
Hide file tree
Showing 4 changed files with 138 additions and 7 deletions.
52 changes: 46 additions & 6 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ jobs:
name: artifacts-manylinux-${{ matrix.platform.target }}-${{ matrix.python-versions }}
path: dist

linux-arm:
linux-arm-aarch64:
#needs: tests
runs-on: ubuntu-latest
strategy:
Expand All @@ -223,8 +223,8 @@ jobs:
platform:
- target: "aarch64-unknown-linux-gnu"
arch: aarch64
- target: "armv7-unknown-linux-gnueabihf"
arch: armv7
# - target: "armv7-unknown-linux-gnueabihf"
# arch: armv7
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -239,7 +239,7 @@ jobs:
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
manylinux: "auto"
manylinux: "2_28"
args: --locked --release -j $(nproc) -i python${{ matrix.python-versions }} --out dist
sccache: 'true'
docker-options: -e OPENSSL_DIR=/usr -e OPENSSL_LIB_DIR=/usr/lib/x86_64-linux-gnu -e OPENSSL_INCLUDE_DIR=/usr/include/openssl
Expand Down Expand Up @@ -283,7 +283,47 @@ jobs:
name: artifacts-manylinux-${{ matrix.platform.target }}-${{ matrix.python-versions }}
path: dist



linux-arm-armv7:
#needs: tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-versions: ["3.9", "3.10", "3.11", "3.12"]
platform:
# - target: "aarch64-unknown-linux-gnu"
# arch: aarch64
- target: "armv7-unknown-linux-gnueabihf"
arch: armv7
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-versions }}
- run: pip install uv

- name: Build Wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
manylinux: "auto"
args: --locked --release -j $(nproc) -i python${{ matrix.python-versions }} --out dist
sccache: 'true'
docker-options: -e OPENSSL_DIR=/usr -e OPENSSL_LIB_DIR=/usr/lib/x86_64-linux-gnu -e OPENSSL_INCLUDE_DIR=/usr/include/openssl
before-script-linux: |
apt update
apt install -y libssl-dev
- name: Upload Wheels
uses: actions/upload-artifact@v4
with:
name: artifacts-manylinux-${{ matrix.platform.target }}-${{ matrix.python-versions }}
path: dist

linux-powerpc:
runs-on: ubuntu-latest
strategy:
Expand Down Expand Up @@ -651,7 +691,7 @@ jobs:

# Define the artifact check job that runs on ubuntu-latest
artifact-check:
needs: [sdist-n-tests, linux-x86, linux-arm, linux-powerpc, linux-musllinux, windows, macos-x86_64, macos-aarch64]
needs: [sdist-n-tests, linux-x86, linux-arm-aarch64, linux-arm-armv7, linux-powerpc, linux-musllinux, windows, macos-x86_64, macos-aarch64]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
Expand Down
90 changes: 90 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
chrono = { version = "0.4.38", features = ["serde"] }
bincode = "1.3.3"
reqwest = { version = "0.12", features = ["json"] }
reqwest = { version = "0.12", features = ["json", "rustls-tls"] }
tokio = { version = "1.39", features = ["rt-multi-thread"] }
url = { version = "2.5", features = [] }
json = { version = "0.12" }
Expand Down
1 change: 1 addition & 0 deletions src/auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@ impl Default for AuthToken {

fn build_client(proxies: &Option<HashMap<String, String>>) -> PyResult<reqwest::Client> {
client_builder_from_proxies(proxies.as_ref().unwrap_or(&HashMap::new()))
.use_rustls_tls()
.build()
.map_err(|err| CredentialError::new_err(format!("Error creating HTTP client: {}", err)))
}
Expand Down

0 comments on commit 43b20f9

Please sign in to comment.