Skip to content

Commit 56e1d72

Browse files
authored
Merge pull request #25 from gtfierro/faster-cross-compilation
Faster cross compilation
2 parents 13de15f + 9aa8ea6 commit 56e1d72

File tree

20 files changed

+38107
-29420
lines changed

20 files changed

+38107
-29420
lines changed

.github/workflows/artifacts.yml

Lines changed: 29 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -168,56 +168,43 @@ jobs:
168168
name: pyontoenv_alias_${{ github.run_attempt }}
169169
path: pyontoenv-shim/dist/*
170170

171-
wheel_linux:
172-
runs-on: ubuntu-latest
173-
strategy:
174-
matrix:
175-
architecture: [ "x86_64", "aarch64" ]
176-
continue-on-error: true
177-
steps:
178-
- uses: actions/checkout@v3
179-
with:
180-
submodules: true
181-
- uses: docker/setup-qemu-action@v2
182-
with:
183-
platforms: linux/${{ matrix.architecture }}
184-
if: (github.event_name == 'release' || github.event_name == 'workflow_dispatch' && github.event.inputs.run_full_matrix == 'true') && matrix.architecture != 'x86_64'
185-
- uses: ./.github/actions/setup-rust
186-
with:
187-
version: stable
188-
- run: sed "s/%arch%/${{ matrix.architecture }}/g" .github/workflows/manylinux_build.sh | sed "s/%for_each_version%/${{ (github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && github.event.inputs.run_full_matrix == 'true')) && 'true' || '' }}/g" > .github/workflows/manylinux_build_script.sh
189-
- run: docker run -v "$(pwd)":/workdir --platform linux/${{ matrix.architecture }} quay.io/pypa/manylinux_2_28_${{ matrix.architecture }} /bin/bash /workdir/.github/workflows/manylinux_build_script.sh
190-
if: github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && github.event.inputs.run_full_matrix == 'true') || matrix.architecture == 'x86_64'
191-
- uses: actions/upload-artifact@v4
192-
with:
193-
name: pyontoenv_${{ matrix.architecture }}_linux_gnu_${{ github.run_attempt }}
194-
path: target/wheels/*.whl
195-
196-
wheel_linux_musl:
197-
runs-on: ubuntu-latest
171+
wheel_linux_cross:
172+
runs-on: macos-14
198173
strategy:
199174
matrix:
200-
architecture: [ "x86_64", "aarch64" ]
201-
continue-on-error: true
175+
arch: [ x86_64, aarch64 ]
202176
steps:
203177
- uses: actions/checkout@v4
204178
with:
205179
submodules: true
206-
- uses: docker/setup-qemu-action@v2
207-
with:
208-
platforms: linux/${{ matrix.architecture }}
209-
if: (github.event_name == 'release' || github.event_name == 'workflow_dispatch' && github.event.inputs.run_full_matrix == 'true') && matrix.architecture != 'x86_64'
210-
- uses: ./.github/actions/setup-rust
180+
- uses: dtolnay/rust-toolchain@stable
211181
with:
212-
version: stable
213-
- run: sed "s/%arch%/${{ matrix.architecture }}/g" .github/workflows/musllinux_build.sh | sed "s/%for_each_version%/${{ (github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && github.event.inputs.run_full_matrix == 'true')) && 'true' || '' }}/g" > .github/workflows/musllinux_build_script.sh
214-
- run: docker run -v "$(pwd)":/workdir --platform linux/${{ matrix.architecture }} quay.io/pypa/musllinux_1_2_${{ matrix.architecture }} /bin/bash /workdir/.github/workflows/musllinux_build_script.sh
215-
if: github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && github.event.inputs.run_full_matrix == 'true') || matrix.architecture == 'x86_64'
216-
- run: find .
182+
targets: x86_64-unknown-linux-gnu,aarch64-unknown-linux-gnu
183+
- name: Install zig
184+
run: brew install zig
185+
- name: Install uv
186+
uses: astral-sh/setup-uv@v5
187+
with:
188+
enable-cache: true
189+
- name: Install Python 3.12
190+
run: uv python install 3.12
191+
- name: Build Linux ${{ matrix.arch }} wheel (uv+maturin+zig)
192+
working-directory: python
193+
env:
194+
UV_PYTHON_DOWNLOAD_MISSING: 1
195+
run: |
196+
uv tool run --python 3.12 \
197+
maturin build \
198+
--release \
199+
--target ${{ matrix.arch }}-unknown-linux-gnu \
200+
--interpreter python3.12 \
201+
--features "abi3 cli" \
202+
--compatibility manylinux2014 \
203+
--zig
217204
- uses: actions/upload-artifact@v4
218205
with:
219-
name: pyontoenv_${{ matrix.architecture }}_linux_musl_${{ github.run_attempt }}
220-
path: target/wheels/*.whl
206+
name: pyontoenv_${{ matrix.arch }}_linux_gnu_${{ github.run_attempt }}
207+
path: python/target/wheels/*.whl
221208

222209
wheel_mac:
223210
runs-on: macos-latest
@@ -299,8 +286,7 @@ jobs:
299286
- python_pyontoenv_alias
300287
- wheel_windows
301288
- wheel_mac
302-
- wheel_linux
303-
- wheel_linux_musl
289+
- wheel_linux_cross
304290
steps:
305291
- uses: actions/download-artifact@v4
306292
with:

.github/workflows/manylinux_build.sh

Lines changed: 0 additions & 32 deletions
This file was deleted.

.github/workflows/musllinux_build.sh

Lines changed: 0 additions & 18 deletions
This file was deleted.

Cargo.lock

Lines changed: 36 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ members = [
88
resolver = "2"
99

1010
[workspace.package]
11-
version = "0.4.0"
11+
version = "0.4.1-a1"
1212
authors = ["Gabe Fierro <[email protected]>"]
1313
license = "BSD-3-Clause"
1414
edition = "2021"
@@ -38,11 +38,12 @@ oxigraph = "0.5"
3838
memmap2 = "0.9"
3939
zstd = "0.13"
4040
rand = "0.9"
41+
blake3 = "1.5"
4142

42-
rdf5d = { version = "0.4.0", path = "rdf5d", features = ["oxigraph", "zstd"] }
43+
rdf5d = { version = "0.4.1-a1", path = "rdf5d", features = ["oxigraph", "zstd"] }
4344

44-
ontoenv = { version = "0.4.0", path = "lib" }
45-
ontoenv-cli = { version = "0.4.0", path = "cli" }
45+
ontoenv = { version = "0.4.1-a1", path = "lib" }
46+
ontoenv-cli = { version = "0.4.1-a1", path = "cli" }
4647

4748
[profile.profiling]
4849
inherits = "release"

0 commit comments

Comments
 (0)