3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-18 14:49:02 +00:00
Commit graph

12 commits

Author SHA1 Message Date
Miodrag Milanovic c79379db02 Run wheels each Sunday at 10AM 2025-04-14 15:22:38 +02:00
Miodrag Milanović 9f25f972dc
Merge pull request #5008 from donn/wheel_builds_fix
wheels: fix builds, add linux aarch64 to ci
2025-04-14 15:10:37 +02:00
Donn 2bc2105d82 wheels: fix builds, add linux aarch64 to ci
Essentially, something is attempting to build the Yosys EXE when you build libyosys.so now. With `ENABLE_PYTHON_CONFIG_EMBED=0`, the Yosys EXE will always fail to build.

Furthermore, because `ENABLE_PYOSYS` now attempts to build a wheel, building a wheel has become recursive.

This commit uses a supplementary set of libs for the EXE (EXE_LIBS) so it and libyosys.so can be built simultaneously, as well as a new Makefile flag, `ENABLE_WHEEL`, to prevent the aforementioned recursion.

I also enabled aarch64 Linux in the CI because it's publicly available now.
2025-04-09 10:42:40 +02:00
Krystine Sherwin e609a59325
CI: Fixes from zizmor
> A static analysis tool for Github Actions
https://github.com/woodruffw/zizmor

Mostly means adding `persist-credentials: false` to checkouts and replacing `{{ env.VARNAME }}` with shell substitution.
2024-12-12 15:59:16 +13:00
Mohamed Gaber 3d6b8b8e1a
wheels: fix missing yosys-abc/share directory
* `misc/__init__.py`:
  * checks if there's a `yosys-abc` in the same directory - if yes, sets the variable `sys._pyosys_abc`
  * checks if there's a `share` in the same directory - if yes, sets the variable `sys._pyosys_share_dirname`
* `yosys.cc::init_share_dirname`: check for `sys._pyosys_share_dirname`, use it at the highest priority if Python is enabled
* `yosys.cc::init_abc_executable_name`: check for `sys._pyosys_abc`, use it at at the highest priority if Python is enabled
* `Makefile`: add new target, `share`, to only create the extra targets
* `setup.py`: compile libyosys.so, yosys-abc and share, and copy them all as part of the pyosys build
* `test/arch/ecp5/add_sub.py`: ported `add_sub.ys` to Python to act as a test for the share directory and abc with Python wheels, used in CI
2024-10-09 13:09:14 +03:00
Mohamed Gaber d7cf0238fd
wheels: properly migrate to artifact@v4 2024-10-07 20:17:05 +03:00
Mohamed Gaber 0bb1f899e8
wheels: convert versions to match pypa spec, add uploading
* wheel versions now replace `+` with `.post` to match spec at https://packaging.python.org/en/latest/specifications/version-specifiers/
* CI updates:
  * Bump action versions
  * Disabled Windows for now and documented why
  * Added a new job to upload all wheels
  * Added new variable, `PYPI_INDEX`: fallback 'https://pypi.org/' if unset
  * Added new secret, `PYPI_TOKEN`
* .editorconfig now uses 2 spaces for YML (it kept setting mine to tabs
  and GitHub Actions doesn't like that)
2024-10-07 16:39:54 +03:00
Mohamed Gaber 08c23b7632
wheels: skip musllinux for now 2024-10-07 16:39:54 +03:00
Mohamed Gaber 67f17a1c97
wheels: symlink python3-config 2024-10-07 16:39:54 +03:00
Mohamed Gaber ab84c105c1
Add test, shell for windows 2024-10-07 16:39:54 +03:00
Mohamed Gaber ab4ea84679
wheels: more compatibility
* Update manylinux images
* FFI now built as a per-platform static library
* Explicitly set minimum macOS deployment target, use clang on macOS
* Try enabling Windows (as an experiment)
* Disable aarch64-linux, aarch64-windows
2024-10-07 16:39:54 +03:00
Mohamed Gaber 407343a7a1
Pyosys Wheels
* Created `setup.py`: Python package manifest to build `pyosys` wheels with a custom extension to build and include `libyosys.so` using Make
* `.gitignore`: Added byproducts of the Python wheel build process
* `Makefile`: Added `-undefined dynamic_lookup` to `libyosys.so` so missing symbols can be resolved by importing into a Python interpreter
* `kernel/yosys.cc`: Gated `PyImport_AppendInittab` with `!Py_IsInitialized`; as of Python 3.12, the interpreter is already initialized and `PyImport_AppendInittab` would cause an exception to be raised
* Created `wheels.yml`: CI workflow for building wheels for CPython on:
  * Linux (glibc, musl) and Darwin
  * x86-64 and arm64
2024-10-07 16:39:54 +03:00