Skip to content

CERT-5173 cross-compile to ARM on Linux #32

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

Merged
merged 5 commits into from
Mar 7, 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
61 changes: 51 additions & 10 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ orbs:
jobs:
unit-tests:
docker:
- image: cimg/rust:1.72.0
- image: cimg/rust:1.76.0
steps:
- checkout
- run:
Expand Down Expand Up @@ -84,7 +84,7 @@ jobs:
- store_artifacts: *store-wheel
- persist_to_workspace: *persist-wheel

build-linux-wheel:
build-linux-x64-wheel:
docker:
- image: quay.io/pypa/manylinux2014_x86_64:latest
steps:
Expand All @@ -94,7 +94,24 @@ jobs:
name: Install Maturin and Build wheel
command: |
cd src/python_wrapper
PYBIN_DIR="/opt/python/cp37-cp37m/bin"
PYBIN_DIR="/opt/python/cp39-cp39/bin"
"${PYBIN_DIR}/pip" install maturin
"${PYBIN_DIR}/maturin" build --bindings=pyo3
- store_artifacts: *store-wheel
- persist_to_workspace: *persist-wheel

build-linux-aarch64-wheel:
docker:
- image: quay.io/pypa/manylinux2014_aarch64:latest
resource_class: arm.medium
steps:
- checkout
- rust/install
- run:
name: Install Maturin and Build wheel
command: |
cd src/python_wrapper
PYBIN_DIR="/opt/python/cp39-cp39/bin"
"${PYBIN_DIR}/pip" install maturin
"${PYBIN_DIR}/maturin" build --bindings=pyo3
- store_artifacts: *store-wheel
Expand Down Expand Up @@ -133,9 +150,25 @@ jobs:
- store_artifacts: *store-wheel
- persist_to_workspace: *persist-wheel

integration-test-linux:
integration-test-linux-x64:
docker:
- image: python:3.7
- image: python:3.9
steps:
- attach_workspace:
at: .
- run:
name: Downgrade pip to earliest compatible version, to test manylinux compatibility
command: pip install pip==19.3
- run:
name: Install wheel
command: pip install wheels/*manylinux*
- run:
<<: *smoke-test

integration-test-linux-aarch64:
docker:
- image: python:3.9
resource_class: arm.medium
steps:
- attach_workspace:
at: .
Expand Down Expand Up @@ -219,7 +252,10 @@ workflows:
unit-test-build-and-integration-test:
jobs:
- unit-tests
- build-linux-wheel:
- build-linux-x64-wheel:
requires:
- unit-tests
- build-linux-aarch64-wheel:
requires:
- unit-tests
- build-macos-wheel:
Expand All @@ -228,9 +264,12 @@ workflows:
- build-windows-wheel:
requires:
- unit-tests
- integration-test-linux:
- integration-test-linux-x64:
requires:
- build-linux-x64-wheel
- integration-test-linux-aarch64:
requires:
- build-linux-wheel
- build-linux-aarch64-wheel
- integration-test-macos:
requires:
- build-macos-wheel
Expand All @@ -239,15 +278,17 @@ workflows:
- build-windows-wheel
- publish-to-testpypi:
requires:
- integration-test-linux
- integration-test-linux-x64
- integration-test-linux-aarch64
- integration-test-macos
- integration-test-windows
filters:
branches:
only: master
- publish-to-pypi:
requires:
- integration-test-linux
- integration-test-linux-x64
- integration-test-linux-aarch64
- integration-test-macos
- integration-test-windows
filters:
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# Changelog
## [2.0.1] - 2024-03-06
### Added
- Now compiling to `linux-aarch64` aka ARM on Linux
### Changed
- Minimum supported Python version is now `3.9`

## [2.0.0] - 2023-09-13
### Added
- Support parsing of `hook`, `use`, `using`, `import` statements.
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cvldoc_parser_core"
version = "2.0.0"
version = "2.0.1"
edition = "2021"

[dependencies]
Expand Down
6 changes: 3 additions & 3 deletions src/python_wrapper/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
[package]
name = "cvldoc_parser_py"
version = "2.0.0"
version = "2.0.1"
edition = "2021"

[lib]
name = "cvldoc_parser"
crate-type = ["cdylib"]

[dependencies]
pyo3 = { version = "0.19", features = ["extension-module", "abi3-py37"] }
pyo3 = { version = "0.20", features = ["extension-module", "abi3-py39"] }
cvldoc_parser_core = { path = "../.." }
color-eyre = "0.6.2"
indoc = "2"
itertools = "0.10.5"
lsp-types = "0.94"
serde_json = "1"
serde = { version = "1", features = ["derive"] }
pythonize = "0.19.0"
pythonize = "0.20"
6 changes: 3 additions & 3 deletions src/python_wrapper/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[build-system]
requires = ["maturin>=1.2.3"]
requires = ["maturin>=1.5.0"]
build-backend = "maturin"

[project]
name = "cvldoc_parser"
version = "2.0.0b2"
requires-python = ">=3.7"
version = "2.0.1"
requires-python = ">=3.9"
classifiers = [
"Programming Language :: Rust",
"Programming Language :: Python :: Implementation :: CPython",
Expand Down