Skip to content

Commit e687b60

Browse files
authored
Merge pull request #856 from davidhewitt/aarch64-manylinux
build aarch64 with manylinux2_28
2 parents 6cfdaa8 + c4c5f9b commit e687b60

File tree

3 files changed

+32
-139
lines changed

3 files changed

+32
-139
lines changed

.github/workflows/release.yml

Lines changed: 30 additions & 130 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,17 @@ on:
88

99
jobs:
1010
linux:
11-
runs-on: ubuntu-latest
12-
container: quay.io/pypa/manylinux_2_28_x86_64
11+
runs-on: ${{ matrix.platform.runs-on }}
12+
container: quay.io/pypa/manylinux_2_28_${{ matrix.platform.arch }}
1313
strategy:
1414
matrix:
15-
python-version: [[310, "3.10"], [311, "3.11"], [312, "3.12"], [313, "3.13"]]
15+
platform:
16+
[
17+
{ "arch": "x86_64", "runs-on": "ubuntu-latest" },
18+
{ "arch": "aarch64", "runs-on": "ubuntu-22.04-arm" },
19+
]
20+
python-version:
21+
[[310, "3.10"], [311, "3.11"], [312, "3.12"], [313, "3.13"]]
1622
steps:
1723
- uses: actions/checkout@v5
1824

@@ -66,80 +72,17 @@ jobs:
6672

6773
- uses: actions/upload-artifact@v4
6874
with:
69-
name: "ubuntu-latest-${{ matrix.python-version[1] }}"
70-
path: connectorx-python/target/wheels/*.whl
71-
72-
linux-aarch:
73-
runs-on: ubuntu-22.04-arm
74-
strategy:
75-
matrix:
76-
python-version: ["3.10", "3.11", "3.12", "3.13"]
77-
steps:
78-
- name: Checkout Repository
79-
uses: actions/checkout@v5
80-
81-
# Check architecture of the target machine
82-
- name: Check Target Architecture
83-
run: |
84-
echo "Architecture: $(uname -m)"
85-
if [[ $(uname -m) != "aarch64" ]]; then
86-
echo "Error: This workflow requires ARM architecture (aarch64)."
87-
exit 1
88-
fi
89-
90-
- name: Setup Python
91-
uses: actions/setup-python@v5
92-
with:
93-
python-version: ${{ matrix.python-version }}
94-
95-
- name: Setup Rust
96-
uses: actions-rs/toolchain@v1
97-
with:
98-
toolchain: stable
99-
components: rustfmt
100-
target: aarch64-unknown-linux-gnu
101-
default: true
102-
103-
- name: Setup Just
104-
uses: extractions/setup-just@v3
105-
env:
106-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
107-
108-
- name: Install Tools
109-
run: |
110-
sudo apt-get update -y
111-
sudo apt-get install -y mysql-client libpq-dev freetds-dev krb5-locales clang libkrb5-dev build-essential gcc musl-tools libsasl2-modules-gssapi-mit libgssapi-krb5-2 krb5-user
112-
- name: Setup Poetry
113-
uses: Gr1N/setup-poetry@v9
114-
115-
- name: Setup Project
116-
run: |
117-
just bootstrap-python
118-
python -m pip install --upgrade pip
119-
pip install maturin
120-
121-
- name: Build Wheel (Native)
122-
run: |
123-
maturin build -m connectorx-python/Cargo.toml --target aarch64-unknown-linux-gnu -i python${{ matrix.python-version }} --release
124-
env:
125-
SQLITE3_STATIC: 1
126-
KRB5_INCLUDE_DIR: /usr/include
127-
KRB5_LIB_DIR: /usr/lib/aarch64-linux-gnu
128-
129-
- name: Upload Artifact
130-
uses: actions/upload-artifact@v4
131-
with:
132-
name: "linux-arm-${{ matrix.python-version }}"
75+
name: "linux-${{matrix.platform.arch}}-${{ matrix.python-version[1] }}"
13376
path: connectorx-python/target/wheels/*.whl
13477

13578
win-and-mac:
13679
runs-on: ${{ matrix.os }}
13780
strategy:
13881
matrix:
139-
os: ["windows-latest", "macos-13"]
82+
os: ["windows-latest", "macos-15-intel"]
14083
python-version: ["3.10", "3.11", "3.12", "3.13"]
14184
include:
142-
- os: "macos-13"
85+
- os: "macos-15-intel"
14386
features: "--features integrated-auth-gssapi"
14487
steps:
14588
- uses: actions/checkout@v5
@@ -236,30 +179,22 @@ jobs:
236179
strategy:
237180
matrix:
238181
python-version: ["3.10", "3.11", "3.12", "3.13"]
239-
os: [macos-13, ubuntu-latest, windows-latest]
240-
steps:
241-
- uses: actions/checkout@v5
242-
243-
- uses: actions/setup-python@v5
244-
with:
245-
python-version: ${{ matrix.python-version }}
246-
architecture: x64
247-
248-
- uses: actions/download-artifact@v5
249-
with:
250-
name: "${{ matrix.os }}-${{ matrix.python-version }}"
251-
252-
- run: |
253-
pip install *.whl
254-
python -c "import connectorx"
255-
256-
verify-apple-arm:
257-
runs-on: ${{ matrix.os }}
258-
needs: [apple-arm]
259-
strategy:
260-
matrix:
261-
python-version: ["3.10", "3.11", "3.12", "3.13"]
262-
os: [macos-latest]
182+
os:
183+
[
184+
macos-15-intel,
185+
ubuntu-latest,
186+
windows-latest,
187+
ubuntu-22.04-arm,
188+
macos-latest,
189+
]
190+
include:
191+
# override artifact-prefix for linux variants
192+
- os: "ubuntu-latest"
193+
artifact-prefix: "linux-x86_64"
194+
- os: "ubuntu-22.04-arm"
195+
artifact-prefix: "linux-aarch64"
196+
- os: "macos-latest"
197+
artifact-prefix: "macos-arm"
263198
steps:
264199
- uses: actions/checkout@v5
265200

@@ -269,50 +204,15 @@ jobs:
269204

270205
- uses: actions/download-artifact@v5
271206
with:
272-
name: "macos-arm-${{ matrix.python-version }}"
207+
name: "${{ matrix.artifact-prefix || matrix.os }}-${{ matrix.python-version }}"
273208

274209
- run: |
275210
pip install *.whl
276211
python -c "import connectorx"
277212
278-
verify-linux-arm:
279-
runs-on: ubuntu-22.04-arm
280-
needs: [linux-aarch]
281-
strategy:
282-
matrix:
283-
python-version: ["3.10", "3.11", "3.12", "3.13"]
284-
steps:
285-
- name: Checkout Repository
286-
uses: actions/checkout@v5
287-
288-
# Check architecture of the target machine
289-
- name: Check Target Architecture
290-
run: |
291-
echo "Architecture: $(uname -m)"
292-
if [[ $(uname -m) != "aarch64" ]]; then
293-
echo "Error: This workflow requires ARM architecture (aarch64)."
294-
exit 1
295-
fi
296-
297-
- name: Setup Python
298-
uses: actions/setup-python@v5
299-
with:
300-
python-version: ${{ matrix.python-version }}
301-
302-
- name: Download Artifact
303-
uses: actions/download-artifact@v5
304-
with:
305-
name: "linux-arm-${{ matrix.python-version }}"
306-
307-
- name: Install and Test
308-
run: |
309-
python -m pip install --upgrade pip
310-
pip install *.whl
311-
python -c 'import connectorx'
312-
313213
upload:
314214
runs-on: ubuntu-latest
315-
needs: [verify, verify-apple-arm, verify-linux-arm]
215+
needs: [verify]
316216
steps:
317217
- name: Download all artifacts
318218
uses: actions/download-artifact@v5

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ cx.read_sql("postgresql://username:password@server:port/database", "SELECT * FRO
2929

3030
The function will partition the query by **evenly** splitting the specified column to the amount of partitions.
3131
ConnectorX will assign one thread for each partition to load and write data in parallel.
32-
Currently, we support partitioning on **numerical** columns (**cannot contain NULL**) for **SPJA** queries.
32+
Currently, we support partitioning on **numerical** columns (**cannot contain NULL**) for **SPJA** queries.
3333

3434
**Experimental: We are now providing federated query support, you can write a single query to join tables from two or more databases!**
3535
```python
@@ -48,8 +48,6 @@ Check out more detailed usage and examples [here](https://sfu-db.github.io/conne
4848
pip install connectorx
4949
```
5050

51-
_For AArch64 or ARM64 Linux users, `connectorx==0.4.3 & above` is only available for distributions using `glibc 2.35` and above. Specifically, the re-release for this architecture was tested on Ubuntu 22.04. For older distributions, the latest version available is `connectorx==0.2.3` due to dependency limitations._
52-
5351
Check out [here](https://sfu-db.github.io/connector-x/install.html#build-from-source-code) to see how to build python wheel from source.
5452

5553
# Performance
@@ -86,7 +84,7 @@ is not specified, the count query will be `SELECT COUNT(*) FROM (SELECT * FROM l
8684
Finally, ConnectorX will use the schema info as well as the count info to allocate memory and download data by executing the queries normally.
8785

8886
Once the downloading begins, there will be one thread for each partition so that the data are downloaded in parallel at the partition level. The thread will issue the query of the corresponding
89-
partition to the database and then write the returned data to the destination row-wise or column-wise (depends on the database) in a streaming fashion.
87+
partition to the database and then write the returned data to the destination row-wise or column-wise (depends on the database) in a streaming fashion.
9088

9189

9290
# Supported Sources & Destinations

docs/install.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@ The easiest way to install ConnectorX is using pip, with the following command:
1010
pip install connectorx
1111
```
1212

13-
```{note}
14-
For AArch64 or ARM64 Linux users, `connectorx==0.4.3 & above` is only available for distributions using `glibc 2.35` and above. Specifically, the re-release for this architecture was tested on Ubuntu 22.04. For older distributions, the latest version available is `connectorx==0.2.3` due to dependency limitations.
15-
```
16-
1713
### Build from source code
1814

1915
* Step 0: Install tools.
@@ -47,4 +43,3 @@ just build-python-wheel
4743
NOTES:
4844
* `OPENSSL_NO_VENDOR=1` might required to compile for windows users.
4945
* Dynamic library is required for the python installation. (e.g. If you are using `pyenv`, use command `PYTHON_CONFIGURE_OPTS=“--enable-shared” pyenv install {version}` to install python since dylib is not enabled by default.)
50-

0 commit comments

Comments
 (0)