Commit Graph

48 Commits

Author SHA1 Message Date
John Demme 551e1382bd
[CI] Revert to working image and disable ESI runtime (#7237)
Disable ESI runtime build until #7236 can be figured out.
2024-06-25 22:03:20 -07:00
John Demme 88eeb265f4
[ESI Runtime] Replace Cap'nProto with gRPC (#7217)
After spending a truly obnoxious amount of time fighting capnp and
libkj, we made the decision to switch to another RPC system. We're no
longer modeling and serializing message types in Capnp and we don't need
the performance which capnp/libkj RPC promises, so there's really no
need for the additional complexity. A slower system which is thread safe
should work fine.

This commit breaks the build in a pretty horrible way and is not
intended to be merged on its own. It simply breaks up the diff.
2024-06-21 14:22:54 -07:00
John Demme 017bf548dc [CI] Bump the image versions on CI and integration tests
To accomodate upcoming slang 4 builds. Changes the version of clang in
the integration tests to 16.
2024-02-13 22:14:41 +00:00
Fabian Schuiki 3d8b7d08d9
[ImportVerilog] Add Slang frontend dependency (#6620)
This is the first PR in a longer chain that adds basic SV support to
CIRCT.

Add the Slang Verilog frontend as a CIRCT dependency. This will be the
foundation for CIRCT's Verilog parsing, elaboration, type checking, and
lowering to the core dialects. By default, Slang is built as a static
library from scratch, which is then linked into the new `ImportVerilog`
conversion. Alternatively, CIRCT can also be linked against a local
Slang installation provided by the system.

Add the `ImportVerilog` conversion library. This library statically
links in the Slang dependency and wraps it in an exception-safe,
LLVM-style API. Currently this only consists of the `getSlangVersion`
function and the necessary linking flags to get it to link statically
against Slang.

Add the `circt-verilog` tool, which will provide a fully-flegded
interface to the new `ImportVerilog` library. Later on we'll also add an
MLIR translation library for single-file SV import. But in general, SV
builds take a lot of command line options (macros, search paths, etc.)
and multiple input files, which is why we have a dedicated tool. All the
tool does at the moment is print the linked Slang version. More to come.

Note that this intentionally links against **version 3** of Slang. Newer
versions are available -- 4 and 5 as of this commit -- but they rely on
fairly new C++ compiler features that didn't work out of the box in our
CI images. We'll eventually want to upgrade, but for now Slang 3 is
sufficient to get the ball rolling.

See https://github.com/MikePopoloski/slang for details on Slang.

Co-authored-by: ShiZuoye <albertethon@163.com>
Co-authored-by: hunterzju <hunter_ht@zju.edu.cn>
Co-authored-by: 孙海龙 <hailong.sun@terapines.com>
2024-01-30 13:22:00 -08:00
John Demme 1927491cff
[ESI] Move Cap'nProto into ESI runtime (#6354)
Simplifies the CIRCT proper build. Also mitigates a runtime binary distribution problem by requiring users to compile the runtime themselves.
2023-10-30 13:45:17 -07:00
John Demme 8714e79956 [CI] Add OS label 2023-09-12 02:03:48 +00:00
Schuyler Eldridge e13b8cb13e
[ci] Remove explicit ccache printing
Remove an explicit step in nightly and short integration tests that print
the ccache stats.  This is already, conveniently, printing by the action
as part of the "Post ccache" step.

Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
2023-08-15 11:14:43 -04:00
John Demme 043382a6b1 [CI] Revert ccache changes
Revert 8cb55c2 as it didn't work. The ccache cache wasn't updating since
GH already had something by the same name in its cache.
2023-08-12 01:10:54 +00:00
John Demme 8cb55c2777
[CI] Attempt to fix nightly cache evictions (#5826)
Short integration tests are filling the cache. Hopefully not appending
the timestamp will replace rather than add new ones. Also attempt to
enable sharing cache between nightly and short.
2023-08-10 16:38:52 -07:00
John Demme 66450e461a
[CI] Re-enable gcc debug corner in nightlies
This corner was disabled due to disk space, which isn't a problem anymore.
2023-08-08 22:14:23 -07:00
John Demme fd81677c2d
[CI] Switch back to ccache action for nightlies (#5813)
With our custom ccache stuff, cache hits don't update the ccache. This
is problematic since a the ccache might have a high miss rate. Switching
back to the ccache action as I'm assuming it's smarter than that.
2023-08-08 22:09:26 -07:00
John Demme 98f3b9e439 [CI] Run nightlies on different agents
This should handle our disk space issues.
2023-08-09 00:27:20 +00:00
Will Dietz 802b9f1706
[CI] Use LLVM_USE_SPLIT_DWARF to reduce time and space. (#5692) 2023-07-26 15:10:38 -05:00
John Demme c58fa7015a [CI][Nighly] Fix disable corner
Serves me right for not testing on a branch first.
2023-06-15 18:28:21 +00:00
John Demme ec64b2d456 [CI][Nightly] Disable failing corner
The GCC/Release/Valgrind corner has been failing for some time #5253.
Disabling it until someone has a chance to look into this failure.
2023-06-15 18:24:56 +00:00
Will Dietz 5197a33952
[CI] Update github actions for checkout, cache: v2 -> v3 (#5268)
Node12 -> Node16, primarily.

See: https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/ .

Appears safe, both have some improvements we may enjoy, such as zstd for Windows cache.
2023-05-25 19:21:32 -05:00
Nandor Licker b7eb1d457d
[CI] Add runs with Valgrind to CI (#5085)
Co-authored-by: Nandor Licker <nandorl@sifive.com>
2023-05-21 09:17:36 +03:00
Morten Borup Petersen 83dcb0892c
[CI] Bump CI image (#5155) 2023-05-09 15:02:44 +02:00
Fabian Schuiki e45cd550f9 [CI] Make lit tests output less succinct; NFC
Our llvm-lit arguments default to `-sv`, which makes the output succinct
and nice for interactive everyday use. However, in CI, we likely want to
see a more traditional output such that we can easily observe if tests
get stuck.

Add a `LLVM_LIT_ARGS` define to all CI cmake invocations that passes
just `-v` instead of `-sv`, to make lit output one line per tests that
is easily observable in the CI logs.
2023-03-21 09:01:48 -07:00
Julian Oppermann ded4f0e961
[CI] Bump integration test images. (#4571) 2023-01-24 20:19:10 +13:00
John Demme 8c3baaff07
[CI] Bump integration test images (#4441)
Moves through the following releases, release title included for convenience:

- v11.1: [Add jinja2 to integration test image](https://github.com/circt/images/releases/tag/v11.1)
- v11.1.1: [Bump to get latest Ubuntu security updates](https://github.com/circt/images/releases/tag/v11.1.1)
- v11.1.2: [Add Z3 to integration build image](https://github.com/circt/images/releases/tag/v11.2)

Full commit history: https://github.com/circt/images/compare/v11...v11.2
2022-12-13 15:37:14 -08:00
Will Dietz 43d5d57d0b
Fixes to build system to support unittests again, add to CI (#4082)
1. test: tweak test discovery to enable unittests, fix deps var.

Discovery will find the generated lit.site.cfg.py, which
knows how to load the lit.cfg.py.

This could be gated on whether we're building "standalone",
as flang does, but that still doesn't work as we are not part
of the config mapping.

cc #2750.

Also fixup typo in variable name, .._DEPS -> .._DEPENDS.

2. cmake: gtest is available if built with LLVM, set accordingly.

We only include the unittests directory if we think the GTEST bits
are available, which we were not indicating in the non-standalone case.

Fix this, and FWIW this is also done in flang's CMakeLists.txt .

3. [CI] Add check-circt-unit to testing.
2022-10-12 19:46:06 -05:00
John Demme e5bb57eb2a
[CI] Disable gcc-debug (#3999)
GCC debug binaries are just too large and have been causing disk space issues intermittently. Just disable them for now as it is a longer effort to cut down on the amount of stuff we build. Fixes #3328 .
2022-09-26 16:29:46 -07:00
Morten Borup Petersen 06b7ee9deb
[CI] Move 'show unsupported' to CI cmake config step (#3895) 2022-09-15 20:00:14 +02:00
John Demme 4410be91d8 [CI] Bump to ubuntu-latest for Docker images
Ubuntu 18.04 is being deprecated. Brownouts recently got my attention.
2022-08-22 13:55:58 -07:00
Martin Erhart dd2e9120c1
[ExportSystemC] Basic infrastructure for emission (#3726)
This commit introduces the base classes and utilities to implement
emission patterns and an emission printer which takes the role of a
driver that can be called in a circt-translate pass. Also includes
emission patterns for the builtin module and SCModule operations to
(1) allow to implement some basic unit and integration tests
(2) show the reviewer how emission patterns look like using this
infrastructure.
2022-08-17 00:55:08 +02:00
Andrew Lenharth 95b52fb6ee
Bump LLVM to dd74d3117de0fd96383beeb4b4b913efcb9f4328 (#3492)
Co-authored-by: Mike Urbach <mikeurbach@gmail.com>
2022-07-09 08:21:17 -05:00
Mike Urbach 174793d50c
[CI] Update nightly workflow to not fail fast. (#2899)
If some configurations fail, we still want to test the others.
2022-04-15 10:07:17 -06:00
Hideto Ueno 060703a0f4
[CI] Only build the host backend (#2845)
Fixes #2843
2022-04-05 10:04:30 +09:00
Andrew Lenharth 6d3922d825
bump build env (#2643) 2022-02-16 17:27:08 -06:00
Julian Oppermann 04034db9fc
[CI] Bump image used for integration tests. (#2551) 2022-02-01 11:48:35 +01:00
Julian Oppermann ea351723c1
Revert "[CI] Use most recent integration test image. (#2474)" (#2480)
This reverts commit d2ff58a59c.
2022-01-19 21:06:59 +01:00
Julian Oppermann d2ff58a59c
[CI] Use most recent integration test image. (#2474) 2022-01-18 23:07:56 +01:00
mikeurbach 31299c1624
[CI] Directly use the cache action in the nightly build. (#1593)
Different build configurations were previously trampling on the same
cache directory on the build host. The cache directory wasn't
configurable, so just use the cache action directly.
2021-08-18 15:22:46 -06:00
mikeurbach 8a792f8b59
[Python] Re-work Python bindings using upstream improvements. (#1484)
This is mostly mechanical for us. Some notable changes:

* Require a unified build for Python in CMake, docs, and CI
* New CMake defaults for some variables in CMakeLists.txt
* Use the new CMake functions for Python bindings and PyCDE
* Update imports for generated Python and Python extension libraries
* Update PYTHONPATH to reflect the new location under unified builds
2021-07-29 09:49:58 -06:00
mikeurbach 40ee986d4f
[CI] Update CMake flag to enable building MLIR Python bindings. (#1156)
This flag has been renamed upstream.
2021-05-26 14:04:38 -06:00
Fabian Schuiki 3ef1f3fbd2
[Python] Add Python guidance to README and fix a few things (#1074)
* Use the `Python3_EXECUTABLE` found by CMake itself (alongside the libs
  and includes) to execute integration tests. This should no longer
  require explicitly specifying a python executable in most cases. Where
  needed, users can always override `Python3_EXECUTABLE`.

* Add `capnp` requirement on ESI tests. Otherwise the test fails on
  systems that build the Python bindings but have no capnp.

* Add some guidance for users that are mainly interested in the Python
  bindings of CIRCT. Fixes #1072.
2021-05-18 19:09:39 +02:00
mikeurbach 9b2331e10f
Add Python bindings for the RTL dialect. (#767) 2021-03-23 20:13:49 -06:00
mikeurbach cce113ea55
[LLHD] Add option to specify shared libs to load in llhd-sim (#789)
This adds a -shared-libs option to llhd-sim that is analogous to the
same option for mlir-cpu-runner. If specified, those libraries are
passed to the ExecutionEngine to dynamically load and link.
2021-03-19 08:10:36 -06:00
mikeurbach 186f8faf8f
Lock GitHub workflows to ubuntu-18.04. (#771)
The `ubuntu-latest` tag is starting to point to Ubuntu 20.04, and this seemed to be causing issues related to finding `llvm-lit`. Stick to Ubuntu 18.04 explicitly for now.
2021-03-16 11:42:56 -06:00
mikeurbach d6930641f5
[Python] Set up initial Python bindings for CIRCT. (#727)
This is the first step towards #710. This should be the minimal amount
of boilerplate to set up a Python module such that we can write
`import circt`. Note that this module does not actually bind to or
expose any API at the moment; this is just the boilerplate, and that
will follow.

The setup here is based on both the upstream MLIR Python bindings, as
well as what NPComp does.
2021-03-09 20:03:40 -07:00
John Demme 13af09d1b4 [Integration tests] Verilator 1.102 memory bug caused random DPI fails
A Verilator bug was causing sporadic ESI cosim failures. Upgrading Verilator
fixes it.
2021-03-06 23:10:30 -08:00
Andrew Young c3af64e030 [CI] Expand the Nightly CI build coverage.
This PR expands the nightly builds to run more of our supported build
configurations.  This adds (almost) all combinations of the following
variables:

```
CXX = [clang++, g++]
BUILD_SHARED_LIBS = [ON, OFF]
LLVM_ENABLE_ASSERTION = [ON, OFF]
CMAKE_BUILD_TYPE = [Release, Debug]
```

The gcc+sharedlibs combinations have been disabled (see issue #708).
This  leads to a total of 12 builds.  Every build shares the same cached
version of LLVM and should only take a couple of minutes for each to
complete.
2021-03-04 21:11:51 -08:00
Andrew Young e1a5000d1a [CI] Add BUILD_SHARED_LIBS to the pull request builds
BUILD_SHARED_LIBS builds all libraries as shared libraries.
Historically, this has mostly been used as a developer productivity
flag, as it greatly speeds up linking. The real value in testing with
this flag enabled is that it reveals mistakes in CMake library
dependencies, such as missing dependencies and circular dependencies.
Additionally, there has been recent effort to increase the level of
support for shared libraries to enable MLIR C/Python bindings, and
supporting this flag down the line is probably a must.
2021-02-24 02:36:30 -08:00
John Demme b717f84975 [Integration tests] v3 Docker image includes yosys 2021-01-12 20:51:13 -08:00
John Demme 90812fe552
Switching to v2 image for nightlies (#271)
v2 adds the psutil python package which is required to timeouts in lit.

This is an obvious change.
2020-11-21 14:48:08 -08:00
John Demme ac8ea5d10c
[LLVM] Creates llvm build script to avoid replication (#267)
Closes #265.
2020-11-20 13:10:49 -08:00
John Demme 8a6d010f6b
Adds an integration testing workflow (#251)
Runs nightly or by request.
2020-11-19 16:35:57 -08:00