Commit Graph

327 Commits

Author SHA1 Message Date
Akash Levy 0785f7721f pyosys fixups 2025-11-12 09:47:23 -08:00
Akash Levy fba5aa5bec Try again 2025-11-05 14:41:23 -08:00
Akash Levy f3512ef5ad Build docs thing 2025-11-04 22:56:27 -08:00
Akash Levy 11731c91f4 Merge from upstream 2025-11-04 22:20:34 -08:00
Miodrag Milanovic e89c5914fe CodeQL CI fix 2025-11-05 07:10:08 +01:00
KrystalDelusion 52c108cd6a
Merge pull request #4596 from YosysHQ/emil/path-sep-refactor
Refactor getting dirs and filenames from paths to files
2025-11-05 09:12:54 +13:00
Mohamed Gaber 51c8193643
hotfix: update libffi in wheels ci
update libffi to a version where https://github.com/libffi/libffi/issues/852 is fixed
2025-11-04 14:58:48 +02:00
Mohamed Gaber 3a54ed6916
hotfix: don't use uv when building wheels 2025-11-04 14:39:51 +02:00
Miodrag Milanovic ad3ae52e9a Upload only on manual action 2025-11-04 09:30:04 +01:00
Miodrag Milanovic db76eebc0f Remove mentions of Boost 2025-11-04 08:35:07 +01:00
Miodrag Milanovic 35e4d967c6 install UV in wheels.yml 2025-11-04 08:00:35 +01:00
Krystine Sherwin 17c1388303 Drop boost-python 2025-11-04 07:40:36 +01:00
Krystine Sherwin 684bbf6a25 CI: Move libbz2 to iverilog setup
Needed for vcd2fst.
2025-11-04 07:40:36 +01:00
Krystine Sherwin bf7c79cc85 CI: vcd2fst needs deps 2025-11-04 07:40:36 +01:00
Krystine Sherwin cc5642c904 Docs: Bringing prereqs in line
Add comments in setup-build-env/action.yml for where to document prereqs (and the separation between build/run and test).
Add some initial (very basic) text for `test_suites.rst`, listing prereqs and how to run the tests (with subsections for the different optional tests, which is currently docs, functional and unit).
Add sphinx-inline-tabs, use it for tidying up prereq instructions based on OS/platform (mostly helpful in the test suites doc where there are multiple sections split by OS).
Also fixes some single backticks that should be double backtick.
2025-11-04 07:40:36 +01:00
Krystine Sherwin a4bd40e199 CI: Fix iverilog deps 2025-11-04 07:39:06 +01:00
Krystine Sherwin 1f6ac5f392 CI: Split dependency setup
Split into common + build/docs/test (common always installs, build/docs/test are installed as requested with `build-*-deps` input flag).
2025-11-04 07:39:06 +01:00
Krystine Sherwin c597bf70b0 CI: Save iverilog cache in action
We still want to cache iverilog even if the rest of the action fails, so explicitly save/restore instead of standard cache.
2025-11-04 07:39:06 +01:00
Krystine Sherwin 0e2d24edd3 CI: iverilog setup as composite action
Called during setup-build-env.
2025-11-04 07:39:06 +01:00
Krystine Sherwin 2d778a94fa action.yml: Playing with apt cache 2025-11-04 07:39:05 +01:00
Mohamed Gaber e9733d681d
pyosys: uv for non-wheel builds, update instructions
- add `uv` to dependencies: saves builder(s) from manually having to manage a venv for python build dependencies
  - when building wheels, pip automatically creates the environment with those dependencies, so no need for uv
  - when running simply `make ENABLE_PYOSYS=1`, this is not the case. people attempting to `pip3 install --upgrade pybind11 cxxheaderparser` to add it to their system packages will be met with a scare message about "breaking system packages"
- update installation instructions to drop boost and add uv instead
- update ci scripts to use `macos-15[-intel]` (`macos-13` sunset in early december)
2025-11-03 15:39:31 +02:00
Mohamed Gaber dec28f65ae
Merge remote-tracking branch 'donn/pyosys_bugfixes' into merge_pybind11 2025-10-26 02:39:43 +03:00
Emil Jiří Tywoniak d1a628ab26 CI: bump WASI SDK from 19 to 27 2025-10-14 15:47:08 +02:00
Mohamed Gaber 80fcce64da
pyosys: fix ref-only classes, implicit conversions
+ cleanup
2025-10-03 11:54:44 +03:00
Mohamed Gaber 447a6cb3f0
misc: `WITH_PYTHON` -> `YOSYS_ENABLE_PYTHON`
For consistency.

Also trying a new thing: only rebuilding objects that use the pybind11 library. The idea is these are the only objects that include the Python/pybind headers and thus the only ones that depend on the Python ABI in any capacity, so other objects can be reused across wheel builds. This has the potential to cut down build times.
2025-10-03 11:54:44 +03:00
Mohamed Gaber dc88906c91
tests/pyosys: print log on failed test, fix make clean 2025-10-03 11:54:44 +03:00
Mohamed Gaber 88be728353
pyosys: rewrite using pybind11
- Rewrite all Python features to use the pybind11 library instead of boost::python.
  Unlike boost::python, pybind11 is a header-only library that is just included by Pyosys code, saving a lot of compile time on wheels.
- Factor out as much "translation" code from the generator into proper C++ files
- Fix running the embedded interpreter not supporting "from pyosys import libyosys as ys" like wheels
- Move Python-related elements to `pyosys` directory at the root of the repo
- Slight shift in bridging semantics:
  - Containers are declared as "opaque types" and are passed by reference to Python - many methods have been implemented to make them feel right at home without the overhead/ambiguity of copying to Python and then copying back after mutation
  - Monitor/Pass use "trampoline" pattern to support virual methods overridable in Python: virtual methods no longer require `py_` prefix
- Create really short test set for pyosys that just exercises basic functionality
2025-10-03 11:54:44 +03:00
Akash Levy c26f38faeb
Merge branch 'YosysHQ:main' into main 2025-09-30 11:14:33 -07:00
Emil J. Tywoniak dc7764e247 .github: typos 2025-09-30 11:03:19 +02:00
Emil J. Tywoniak b2adaeec69 .github: replace Slack and GitHub Discussions with Discourse in issue templates 2025-09-29 23:03:54 +02:00
Emil J. Tywoniak 4c17ac5ac2 .github: suggest Discourse in PR template 2025-09-29 23:03:29 +02:00
Akash Levy fbc2b71ed4 Revert some stuff 2025-09-29 00:43:49 -07:00
Akash Levy 507d43a9b8 Fixups 2025-09-28 06:16:07 -07:00
Akash Levy 5efc95f7d9 Clean up 2025-09-28 05:10:05 -07:00
Akash Levy bbaeb90a23 Forgot libnsl-dev 2025-09-28 02:15:58 -07:00
Akash Levy 652a9a63b2 Update to latest and fix all disabled tests 2025-09-28 01:33:08 -07:00
Miodrag Milanović fcc3d7132d
Fix building and running unit tests (#5374)
* Fix building and running unit tests

* Enable unit tests

* Add gtest always

* test-sanitizers.yml: Use makefile.conf

* proper test setup

* make it run on macOS

* Run libyosys build only for unit tests after testing is done

* Disable LTO on public CI

---------

Co-authored-by: Krystine Sherwin <93062060+KrystalDelusion@users.noreply.github.com>
2025-09-23 17:10:18 +02:00
Akash Levy ab006776d0 Bump 2025-09-23 00:40:20 -07:00
KrystalDelusion 991561fe98
Merge pull request #5363 from KrystalDelusion/krys/yosyshq-only-jobs 2025-09-23 17:27:43 +12:00
Krystine Sherwin 6f7cd637cb
CI: Check repo for YosysHQ specific jobs
Prevents unintended bumps on the flake.lock and Yosys version on forks (provided the forks synchronize their main after this gets merged).
Update version.yml to use the same style of `if` on the job, rather than on specific actions.
Wheels will still build as a cron job, but won't try to upload if it's a fork.
2025-09-23 15:08:04 +12:00
Akash Levy 60d969530b Bump to latest 2025-09-21 01:10:04 -07:00
Krystine Sherwin 19667dd6f1
CI: Don't use self-hosted runner on forks 2025-09-19 11:43:22 +12:00
Krystine Sherwin 042aff7c77
Bump test-compile to gcc-14 as newest 2025-09-19 11:39:24 +12:00
Akash Levy 5894296ab5
Update test-sanitizers.yml 2025-09-15 09:46:20 -07:00
Akash Levy 46223c59df
Update test-sanitizers.yml 2025-09-15 09:07:40 -07:00
Akash Levy ab83a36d23
Update test-sanitizers.yml 2025-09-15 08:46:11 -07:00
Akash Levy 8dce3f1716
Update test-sanitizers.yml 2025-09-15 08:26:42 -07:00
Akash Levy 9f2b5e0bbb
Update wheels.yml 2025-09-15 08:22:58 -07:00
Akash Levy 5c68d0c153
Update wheels.yml 2025-09-15 08:22:40 -07:00
Akash Levy a639c12445
Update action.yml 2025-09-15 08:05:19 -07:00