Skip to content
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

Use --zig in CI? #2

Closed
kevinheavey opened this issue Feb 18, 2022 · 4 comments
Closed

Use --zig in CI? #2

kevinheavey opened this issue Feb 18, 2022 · 4 comments
Assignees

Comments

@kevinheavey
Copy link

Hey! I like your CI workflow so I copy it quite closely in my projects 😅

I'm curious: do you think you'll use the new feature to cross-compile with Zig? I don't really understand it but I'm guessing you understand it

@messense
Copy link
Owner

Thanks for the suggestion, I'm interested in making an example workflow that cross-compiles with Zig.

@messense messense self-assigned this Feb 19, 2022
@messense
Copy link
Owner

messense commented Feb 20, 2022

I've added --zig support in maturin-action: PyO3/maturin-action#27 , the usage is quite simple:

diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml
index e8b2931..60294f6 100644
--- a/.github/workflows/CI.yml
+++ b/.github/workflows/CI.yml
@@ -120,7 +121,8 @@ jobs:
       with:
         target: ${{ matrix.target }}
         manylinux: auto
-        args: --release --out dist
+        args: --release --out dist --zig
     - uses: uraimo/run-on-arch-action@v2.0.5
       if: matrix.target != 'ppc64'
       name: Install built wheel

It works for cross compiling to aarch64, but other architectures doesn't not work right now mostly due to ziglang/zig#4911. So currently it's not ready to replace Docker.

@messense
Copy link
Owner

As of today, with zig 0.10 and maturin 0.14, only s390x fails: https://github.com/messense/rjieba-py/actions/runs/3801172545/jobs/6465356959

@messense
Copy link
Owner

messense commented Feb 3, 2023

@messense messense closed this as completed Feb 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants