Skip to content

Commit

Permalink
# This is a combination of 3 commits.
Browse files Browse the repository at this point in the history
# This is the 1st commit message:

chore: remove x86 support (rust-lang/cargo#13546)

# The commit message #2 will be skipped:

# ci: try dnf install gcc?

# The commit message #3 will be skipped:

# ci: try manylinux2014
  • Loading branch information
Angel-Dijoux committed Nov 15, 2024
1 parent d7efd48 commit cd9cf27
Show file tree
Hide file tree
Showing 3 changed files with 98 additions and 12 deletions.
52 changes: 41 additions & 11 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches:
- main
tags:
- '*'
- "*"
pull_request:
merge_group:
workflow_dispatch:
Expand All @@ -26,18 +26,42 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: "3.10"
- name: Calculate openssl-vendored
shell: bash
id: is-openssl-vendored
run: |
if [[ "${{ startsWith(matrix.target, 'x86') }}" == "true" ]]; then
echo "enabled=" >> $GITHUB_OUTPUT
else
echo "enabled=--features vendored-openssl" >> $GITHUB_OUTPUT
fi
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist
sccache: 'true'
manylinux: auto
args: --release --out dist --find-interpreter ${{ steps.is-openssl-vendored.outputs.enabled }} --features extension-module
sccache: "true"
manylinux: "manylinux2014"
before-script-linux: |
case "${{ matrix.target }}" in
"aarch64" | "armv7" | "s390x" | "ppc64le")
# NOTE: pypa/manylinux docker images are Debian based
sudo apt-get update
sudo apt-get install -y pkg-config libssl-dev
sudo apt-get install -y cpanminus
sudo cpanm IPC::Cmd
;;
"x86" | "x86_64")
# NOTE: rust-cross/manylinux docker images are CentOS based
yum update -y
yum install -y openssl openssl-devel perl-IPC-Cmd
;;
esac
docker-options: -e SENTRY_DSN
env:
# Workaround ring 0.17 build issue
CFLAGS_aarch64_unknown_linux_gnu: '-D__ARM_ARCH=8'
CFLAGS_aarch64_unknown_linux_gnu: "-D__ARM_ARCH=8"
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
Expand All @@ -53,14 +77,14 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: "3.10"
architecture: ${{ matrix.target }}
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist
sccache: 'true'
sccache: "true"
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
Expand All @@ -76,13 +100,19 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: "3.10"
- name: Install dependencies
run: brew install openssl pkg-config
- name: Set OpenSSL path
run: echo "OPENSSL_DIR=$(brew --prefix openssl)" >> $GITHUB_ENV
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist
sccache: 'true'
sccache: "true"
env:
OPENSSL_DIR: ${{ env.OPENSSL_DIR }}
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
Expand Down Expand Up @@ -158,4 +188,4 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
cache-to: type=gha,mode=max
53 changes: 53 additions & 0 deletions Cargo.lock

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

5 changes: 4 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ name = "aqora"
[features]
default = []
extension-module = ["pyo3/extension-module", "pyo3/abi3-py39", "pyo3/abi3"]
vendored-openssl = ["openssl/vendored"]

[dependencies]
aqora-archiver = { path = "archiver", features = ["indicatif", "tokio", "tracing"] }
Expand Down Expand Up @@ -92,7 +93,9 @@ tracing-subscriber = { version = "0.3", features = ["json", "env-filter"] }
url = { version = "2.5", features = ["serde"] }
uuid = "1.7"
which = "6.0"
git2 = "0.19.0"
openssl = { version = "0.10.68", features = ["vendored"], optional = true }
openssl-probe = { version = "0.1.5", optional = true }
git2 = { version = "0.19.0" , features = ["vendored-openssl"] }

[build-dependencies]
toml_edit = "0.22"
Expand Down

0 comments on commit cd9cf27

Please sign in to comment.