Commit Graph

230 Commits

Author SHA1 Message Date
Miodrag Milanović 86ef7f7ede
Update wheels to Trusted Publisher 2025-08-04 17:43:03 +02:00
Matt Young 555c08a98a docs: update issues template with Discourse link 2025-08-01 11:30:42 +10:00
N. Engelhardt 81f87ce6ed
Revert "Add groups to command reference" 2025-07-23 14:41:49 +00:00
Krystine Sherwin 4722b07485
Docs: docs/source/cmd is source only
i.e. we don't need to clean it, and we don't need to include it in the docs artifact
2025-07-21 10:34:54 +12:00
Krystine Sherwin e6961d8c9f
CI: Test with ASAN as well
New matrix variable for sanitizer, running `undefined` and `address` separately
(because they are mutually exclusive).  Probably don't need to run both
sanitizers on both os targets, but it's probably fine.
2025-06-28 11:33:18 +12:00
Miodrag Milanovic a5edbc8836 Update CI, windows-2019 is deprecated 2025-06-09 19:07:53 +02:00
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
KrystalDelusion a2e1d0165f
Merge pull request #5016 from YosysHQ/krys/zizmor
CI: Fixes from zizmor
2025-04-12 09:02:59 +12: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
Catherine f5c53a99e7 CI: Sanitize for undefined behavior. 2025-02-03 10:19:19 +01:00
Miodrag Milanovic 6b449970ef test-build: Fix missing bzlib.h 2025-01-20 16:08:42 +01:00
KrystalDelusion 90b1ccf67b
test-compile: Set oldest clang to 10
clang-11 through clang-16 fail under 24.04, but clang-10 works, so we can move that up to the oldest supported and drop the extra target for ubuntu-20.04
2025-01-20 11:57:47 +13:00
KrystalDelusion 2403c406fb
test-compile: Update latest clang
Use clang-19 as latest
2025-01-20 11:21:17 +13:00
KrystalDelusion 37acfce8c4
test-compile: Update oldest clang for 24.04
Oldest clang on 24.04 appears to be 16.
2025-01-20 11:07:40 +13: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
KrystalDelusion 1e0e367aed
test-compile: Drop back to gcc-13 2024-11-26 10:18:09 +13:00
KrystalDelusion 6ff5823d6a
test-compile: Use clang-18 and gcc-14
The 'newest' compilers are actually not all that new, they're just the default for the image.  Instead provide explicit versions.
2024-11-26 09:59:52 +13:00
Emil J c1907ef5b7
Merge pull request #4668 from YosysHQ/emil/vendor-submodules
actions: vendor sources with submodules for releases
2024-10-21 15:37:51 +02:00
Miodrag Milanovic be8c75a3a5 CI: make CI continue even if brew objects 2024-10-18 08:38:36 +02:00
Krystine Sherwin f881ba6200
test-docs-build: Install docs prereqs 2024-10-18 05:38:49 +13:00
Emil J. Tywoniak d29499a10f actions: vendor sources with submodules for releases 2024-10-17 00:11:10 +02:00
Krystine Sherwin d1c6699125
test-docs-build: Use fast runner 2024-10-17 07:15:11 +13:00
Krystine Sherwin 5d14c3017e
test-build.yml: Add test-docs-build
Try use self hosted linux runner to build html and latexpdf to check for errors.
Trying to use the build artifact didn't seem to work, so just run it on its own.
Upload docs/build folder as artifact to enable review without having to build
locally.  Note: doesn't include verific, so will differ slightly from final
published docs.
2024-10-17 06:10:12 +13:00
Krystine Sherwin c93fd54e43
ci: Install docs/reqs (namely, furo-ys) 2024-10-15 11:37:52 +13:00
Miodrag Milanović ecec156965
Merge pull request #4643 from donn/fix_wheels
wheels: fix missing yosys-abc/share directory
2024-10-09 18:05:58 +02:00
Miodrag Milanovic a6ccf22047 force brew formula update 2024-10-09 14:09:10 +02: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
Miodrag Milanovic c93c7f8307 CI: lld is now separate brew package 2024-10-09 09:50:36 +02:00
Miodrag Milanović 535b3304cc
Merge pull request #4534 from donn/test_wheels
Pyosys Wheels
2024-10-08 11:24:16 +02:00
Krystine Sherwin c1604424aa
ci: Call make html directly
Since `docs/prep` is a prerequisite of `docs`, and should be the *only* prerequisite, calling `make docs` could end up hiding a problem with files missing from the uploaded artifact. Instead, call `make` from the docs directory which should be closer to what will run on RTDs.
2024-10-08 08:11:35 +13:00
Krystine Sherwin b15103625b
ci: Switch test build docs to our runner 2024-10-08 07:49:14 +13: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
KrystalDelusion f72d0219d1
Update test-build.yml
Call make docs from root
2024-10-07 22:52:33 +13:00
Krystine Sherwin 33930e44ac
ci: Test build docs 2024-10-07 22:22:10 +13:00
Krystine Sherwin 2e1181a092
ci: Run make docs on PRs 2024-10-07 21:25:15 +13:00
Krystine Sherwin d8038c11d1
Add -j flag to make docs CI 2024-10-07 10:07:17 +13:00
Roland Coeurjoly 5fca9b867d Add Get vcd2fst step to test-yosys job
Co-authored-by: Miodrag Milanovic <mmicko@gmail.com>
Co-authored-by: Roland Coeurjoly <rolandcoeurjoly@gmail.com>
2024-09-30 16:25:32 +02:00
Miodrag Milanović b20df72e1e
Merge pull request #4536 from YosysHQ/functional
Functional Backend
2024-09-06 10:05:04 +02:00
Miodrag Milanovic fc10a6eee2 Run functional tests on private runner only 2024-09-06 08:47:43 +02:00
Krystine Sherwin 25623b1010
ci: test-verific no longer needs special casing 2024-09-03 11:45:00 +12:00
Krystine Sherwin e92de01ab3
ci: Split out prepare-docs 2024-09-03 11:40:47 +12:00
Krystine Sherwin 6c833d83b8
ci: Use docs/prep target 2024-09-03 11:31:06 +12:00
Krystine Sherwin a97d99cbac
ci: Verific skipping conditional on github.ref
Docs jobs should not skip on concurrent jobs (in case a non-docs job is already
running, such as when a commit has been tagged for docs-preview). However, a
successful `test-verific` can allow for a future docs job to skip testing and go
straight to the preview.
2024-09-03 11:29:47 +12:00
Krystine Sherwin a20756676c
ci: Update RTDs trigger conditional
Trigger on main, on a branch called `docs-preview*`, or on any tag.
2024-08-27 10:06:26 +12:00
Krystine Sherwin 83692075df
ci: Don't cancel previous builds
Which is what the comment said, but the code didn't match.
2024-08-27 10:06:26 +12:00
Krystine Sherwin 7d779c64a3
docs: Only trigger RTDs on main 2024-08-20 04:26:58 +12:00
Emil J 9de534892e
Merge pull request #4515 from RCoeurjoly/nix_on_macos
Run nix build also on macos. Build with more logs
2024-08-19 15:49:23 +02:00
Krystine Sherwin 8773cf7721
test-verific: Use fast runner 2024-08-19 21:24:48 +12:00
Krystine Sherwin 7bd3c7b968
Fix test-verific.yml 2024-08-16 10:43:51 +12:00
Krystine Sherwin 3b63ab07ae
docs: Build RTD artifacts directly
Use rtds-action instead of yosys-cmd-ref repo.
Add rtds_action to docs configuration.
Add `.readthedocs.yaml`.
Update `DOCS_USAGE_` make target to be able to use pre-generated executables without forcing a remake.
2024-08-16 10:43:51 +12:00
Krystine Sherwin d709177770
test-compile: Downgrade to focal 2024-08-15 09:44:20 +12:00
Emil J. Tywoniak eeecb54532 Makefile: no LTO and lld by default 2024-08-05 19:28:09 +02:00
Roland Coeurjoly 7e34142965 Run nix build also on macos. Build with more logs 2024-07-30 22:47:30 +02:00
Emil J e21dd292fc
Merge pull request #4502 from YosysHQ/emil/build-opt-levels
Release build configuration improvements
2024-07-29 15:13:52 +02:00
Emil J. Tywoniak 29d53bc94a actions: try fix GITHUB_PATH 2024-07-24 19:50:34 +02:00
Emil J. Tywoniak ad47844bbf actions: macos install lld from llvm package 2024-07-24 18:32:04 +02:00
Miodrag Milanovic ead4718e56 Enable extensions for CI 2024-07-09 09:22:37 +02:00
Miodrag Milanovic 141a2e3638 Make C++17 compiler required 2024-06-17 16:55:36 +02:00
Miodrag Milanović 803703a833
Update flake lock workflow
Update workflow so it creates trigger as user so  GitHub Action is triggering actual build
2024-06-02 19:25:05 +02:00
Krystine Sherwin d135c0bf87
extra-builds.yml: Fix indentation 2024-05-24 09:41:31 +12:00
Krystine Sherwin 1aae0bcd40
ci: Move nix build to extra-builds.yml
Skip duplicate actions on nix build.
2024-05-24 09:09:48 +12:00
Roland Coeurjoly 9884bb57a1 Add update flake lock github action 2024-05-13 14:28:32 +02:00
Roland Coeurjoly dd6178c74b Fix nix version to 2.18.1, known working version 2024-05-13 14:21:35 +02:00
Roland Coeurjoly 8c8fb1399c Update github action 2024-05-13 13:53:53 +02:00
Roland Coeurjoly badd803beb
Merge branch 'YosysHQ:main' into nix 2024-05-14 16:23:50 +02:00
Miodrag Milanović 40c7162036
Merge pull request #4392 from YosysHQ/krys/refactor-workflows
test-docs should not ignore docs changes
2024-05-13 15:04:14 +02:00
Miodrag Milanović c2ad12147c
Merge pull request #4356 from YosysHQ/krys/docs_issue_template
Add template for documentation issues
2024-05-13 15:03:53 +02:00
Krystine Sherwin 26b148f455
test-build.yml: Remove duplicated yosys-config 2024-05-11 11:28:16 +12:00
Krystine Sherwin 95bd7c9b08
test-build.yml Use pre_docs_job for build-yosys
pre_job will never skip something that is not skipped by pre_docs_job, so we can gate the build step by pre_docs_job to skip it when the two later jobs are both being skipped.
2024-05-11 11:00:58 +12:00
Krystine Sherwin a8bad3060c
test-build.yml: test-docs should not ignore docs changes 2024-05-11 10:51:08 +12:00
Miodrag Milanovic 6dde8107c3 Remove checkout for specific iverilog git version 2024-05-10 15:46:32 +02:00
Krystine Sherwin c24a9063b6
Fix submodules 2024-05-10 10:15:03 +12:00
Krystine Sherwin 7905921bd0
Remove test-docs.yml in favour of test-build 2024-05-10 10:00:33 +12:00
Krystine Sherwin ff730f486a
ci: Add autoconf to macos dependencies 2024-05-10 09:54:38 +12:00
Krystine Sherwin 6908330005
ci: Reduce number of jobs
Limit compilers to oldest and newest.
Oldest compilers test with minimum supported standard.
Newest compilers test with minimum *and* maximum supported standard.
2024-05-10 09:53:46 +12:00
Krystine Sherwin 24b3690c25
test-build: Use macos-latest (macOS 14, M1) 2024-05-10 09:53:46 +12:00
Miodrag Milanovic eae7356c70
Cleanups and update of VS action 2024-05-10 09:53:46 +12:00
Krystine Sherwin 8fc7dcb516
ci: Drop python2 2024-05-10 09:51:37 +12:00
Krystine Sherwin fc48c3a871
ci: Update OS/compiler targets 2024-05-10 09:51:37 +12:00
Krystine Sherwin 144d3c9601
Add empty line to action.yml 2024-05-10 09:51:37 +12:00
Krystine Sherwin 7d8928af4b
ci: Remove macOS from test-docs
macOS fails due to missing gvpack, but trying to install graphviz
triggers a Python update which breaks the macOS runner.
2024-05-10 09:51:37 +12:00
Krystine Sherwin c89c5c34a0
ci: Disable fail fast for test runs 2024-05-10 09:51:37 +12:00
Krystine Sherwin 7fbf286b3f
ci: Update for main branch rename 2024-05-10 09:51:37 +12:00
Krystine Sherwin 0720020226
ci: Drop gcc-12
Setup script unable to install gcc-12 under ubuntu-20.04.
2024-05-10 09:51:37 +12:00
Krystine Sherwin 6f602e79d4
docs: Debugging macro test fail
Call yosys-config post build extraction for sanity check.
Report absolute path for yosys exe if it can't be found.
2024-05-10 09:51:36 +12:00
Krystine Sherwin 112a5cfc67
ci: Add testing for newer compilers 2024-05-10 09:49:34 +12:00
Krystine Sherwin 6451a6a0dc
ci: Fix action.yml 2024-05-10 09:49:34 +12:00
Krystine Sherwin 3c65ddbea0
ci: Checkout goes first 2024-05-10 09:49:34 +12:00
Krystine Sherwin d07323e7dd
ci: Add action for reusable build env setup 2024-05-10 09:49:34 +12:00
Krystine Sherwin 62440246ec
ci: Add CC_SHORT env var
New Setup Cpp step uses fully qualified paths for $CC and $CXX so ${CC%%-*} no longer works.
Remove os_name since it's not needed anymore.
2024-05-10 09:49:33 +12:00
Krystine Sherwin 616848b773
ci: Use aminya/setup-cpp 2024-05-10 09:49:33 +12:00
Krystine Sherwin 326d802220
ci: split test-compile from test-build 2024-05-10 09:49:33 +12:00
Krystine Sherwin 154464e7ce
ci: add macos test build 2024-05-10 09:45:31 +12:00