Commit Graph

57 Commits

Author SHA1 Message Date
Julian Oppermann 65a685efdc
[CI] Prevent yapf from linting .py.in files. (#2466) 2022-01-16 09:41:53 +01:00
Hideto Ueno 846a38fb9f
LLVM Submodule Update (#2225)
Bump LLVM for the following improvements:

- https://reviews.llvm.org/D113511
- https://reviews.llvm.org/D113641

This required modifications to work around the following changes to
upstream:

- Replace Identifier with StringAttr (https://reviews.llvm.org/D113536)
- Use mlir::NamedAttribute (https://reviews.llvm.org/D113956)
- Use macher::m_Any (https://reviews.llvm.org/D113905)
- Update printer/parser of types/attributes
  (https://reviews.llvm.org/D113637) to use AsmPrinter/Parser instead of
  DialectAsmParser/Printer

Co-authored-by: Martin Erhart <maerhart@outlook.com>
2021-12-01 00:14:17 -05:00
Hideto Ueno 4edc6f2260
[CI] Run short integration tests on PR (#2245)
Considering that we break integration tests and revert commits frequently, it is better to run short integration tests on PR CI to catch test failures in integration tests. This commit changes to run short integration tests on every pull requests.
2021-11-30 12:25:34 +09:00
Hideto Ueno b343e135ab
[CI] Fix diff command for clang-tidy (#2162) 2021-11-13 04:57:49 +09:00
Hideto Ueno d160095524
[CI] Run clang-format after clang-tidy (#2103)
Currently, clang-format is not applied to the modification of clang-tidy. So it is troublesome if clang-tidy breaks clang-format.
2021-11-09 04:36:22 +09:00
Hideto Ueno c9082491cf
[CI] Add a sanity check job (#2063)
This PR moves sanity checks(clang-format, python-format) to the beginning of CI as a new job.
2021-11-08 15:20:42 +09:00
Hideto Ueno 6608f5b9b3 [NFC][CI] Fix trailing white spaces 2021-11-05 11:52:10 +09:00
John Demme ef184bb7fa
[CI] Add a short integration test which runs on each push to main (#1934)
Run the integration tests on one configuration (of the nightly matrix) on each
push to main. Should catch 95% of integration test breakages. Useful for
identifying the particular offending commit and emailing the commit author.
2021-10-05 19:10:27 -07:00
mikeurbach 443b2f412c
[Python] Add and document setup.py script for Python bindings. (#1913)
This allows users to `pip install lib/Bindings/Python`. Similarly,
this supports `pip wheel lib/Bindings/Python`. The script generally
follows https://github.com/llvm/torch-mlir/pull/256, with some tweaks
that are specific to CIRCT's CMake choices (e.g. using an external
projects unified build).
2021-10-01 14:20:00 -06:00
mikeurbach 33e975e855
[Python][CI] Fix formatting check by using an image with toml. (#1906)
This is required by the yapf tool we use to enforce formatting. Switch
back to using bash syntax for this check. Also re-format a few spots
that slipped in while the check was broken. Fixes #1162.
2021-09-30 09:40:37 -06:00
Andrew Young e16c134c03
[CI] Update pull request testing image (#1534)
The new image uses LLVM 12, notably pulling in a newer version of clang
and clang-format.
2021-08-26 11:04:20 -07: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
John Demme 639016903d [CI] Run Windows build on push to main
This way, the dev who pushed (or merged the PR) gets a notification if they
broke the build. Also makes it easier to figure out which commit broke the
build.

Doing this now since I'm might start caring about Windows builds soon. Running
it on push to main only (instead of also on PRs) since most code changes don't
break it, so it's kinda wasteful.
2021-08-13 13:32:13 -07: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
Andrew Young af021ef6a1
[CI] Fix shell usage (#1380)
When we switched to using docker for our PR builds, the default shell
changed from `bash` to `sh`.  This change makes the workflow file
`sh` compatible.
2021-07-07 15:45:51 -07:00
mikeurbach 945ad15862
[Python] Fix format check by specifying bash as shell. (#1193)
The default shell is `sh -e {0}`, which leads to the error:

[[: not found

This uses `bash` instead of `sh`.
2021-06-03 11:59:44 -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
John Demme 9d2b9ac3fd
[CI] Upgrade to Ubuntu 20.04 docker image (#1061)
Fixes the CI checks.
2021-05-16 19:18:21 -07:00
Ayush Anand 1ae59c60d5
Updated the workflow file and key (#943)
Co-authored-by: Ayush Anand <ayush100anand@gmailcom>
2021-04-22 21:26:34 -07:00
mikeurbach c064a6b32f
[NFC] Re-enable Python format check, and don't fail when no changes. (#948)
The intent of the check was to only run yapf on the files that
changed, but if no Python files changed, the grep command returns 1
and fails the check. In that case, return an empty list of files, and
check for that before running yapf.
2021-04-22 11:46:25 -06:00
Mike Urbach c83f888e26 [NFC] Disable new Python format check in CI.
This was failing unrelated PRs, disabling for now rather than reverting.
2021-04-22 10:58:27 -06:00
Mike Urbach b0e69ae120 [Python][CI] Add yapf formatting guidelines and run check in CI.
This follows the same setup as MLIR and NPCOMP, using yapf and the
Google style guidelines, with two-space indentation.
2021-04-21 15:38:02 -06:00
John Demme d4045dd9cb
[LLVM] Update LLVM submodule and the way it's cached (#891)
Bumping LLVM to get llvm/llvm-project@0126e90. Updating the workflow since there's no reason to cache the LLVM source code. Doing both simultaneously to save compilation resources.
2021-04-06 16:28:50 -07: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 2d19c341fd [CI] Add GCC build, combine release and debug builds into release+assert
This change adds a GCC build to the buildAndTest job which is run on
every PR. This step takes about 1m 30s to complete.

This also combines the two clang builds, in release and debug mode, into
a single build, release+asserts. Normally, a cmake release build adds
-DNDEBUG to all command line options. The LLVM cmake system has a flag
to override this, LLVM_ENABLE_ASSERTIONS. Building in release mode with
assertions should give us the best of both worlds for error checking.

The GCC builds will be running in the same release+assert build
configuration.
2021-03-04 21:12:09 -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
Andrew Young 08686ff731 Build circt-doc in CI
Some changes can break the `circt-doc` target without anyone noticing.
This change adds it to CI pre-merge checks.  Building the documentation
is very quick and should not affect build times in a significant way.
2021-02-04 21:49:39 -08:00
John Demme 18b04b2780
Windows builds (#374)
* Adding Windows build and test workflow

* ubuntu -> windows

* cmake paths

* Adding build parallelism

* Builds locally

* A large portion of the tests fail on Windows

* Remove release build

* Debug takes up waayyy too much space!

* Run in Release mode

* Add '-j 1' to disable parallelism

* Build LLVM separately

* Fixing build workflow

* Finally working!

* Update buildAndTestWindows.yml

Only cache object dirs

* Update buildAndTestWindows.yml

Fixing formatting issue

* Remove pre-build job
2021-01-12 21:35:12 -08:00
John Demme b717f84975 [Integration tests] v3 Docker image includes yosys 2021-01-12 20:51:13 -08:00
George Lyon 365f6ba576
[CMake] Configure unified build in CI (#411)
* Configure unified build in CI

* Fix unified build

Co-authored-by: George <989903+GeorgeLyon@users.noreply.github.com>
2021-01-06 13:21:07 -08:00
John Demme 5a9a93c308 Fixing "Request review" workflow
Master -> main got missed in the transition.
2021-01-03 01:12:51 -08:00
John Demme c803cff2f1 Build scheduling changes
Run builds on pushes/merges to 'main', on PRs, and upon request.
2020-12-29 19:54:42 -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
John Demme 4f44209b31
Fixing the workflow which GH broke (#250) 2020-11-16 21:22:33 -08:00
John Demme dc3b57de7e
Adding Verilator and a basic Verilator unit test (#179) 2020-10-30 13:12:15 -07:00
John Demme e36c597ad9
Fixing the auto request review feature (#149)
* Auto request reviewers

* Test successful. Reseting to final config.

* Updating pipeline names
2020-10-20 21:51:14 -07:00
mikeurbach 80aaf3e37f
Fix shell script for displaying clang-format and clang-tidy patches (#170) 2020-10-20 19:45:11 -06:00
John Demme eb7a738d57
Fix the lint steps in the GH workflow to compare against the target branch (#137)
* Fix the lint steps to compare against the target branch

It was apparantly comparing against the fork point. Two different
meanings of the work base I think. As a result, it would pick up
differences in the target branch since the fork point! Users would have
to merge before the PR to avoid this.

* Documentation and breaking lines longer than 80 columns

(when possible)

* Missed a backslash
2020-10-13 10:51:08 -07:00
John Demme 94de0a66c6
New CODEOWNERS format with auto review request (#144)
* New CODEOWNERS format with auto review request

* Workflow documentation
2020-10-12 23:28:07 -07:00
John Demme b78ee1f9ef
Revert "Test codeowner wflw herald (#142)" (#143)
This reverts commit 3115b8a313.
2020-10-12 18:22:35 -07:00
John Demme 3115b8a313
Test codeowner wflw herald (#142)
* Changing some of Amalee's code to test CODEOWNERS

* Workflow to automaticatly add reviewers

* Disabling ready_for_review

* Let's try herald

* Fixing workflow

* Totally messed up the format
2020-10-12 18:20:54 -07:00
John Demme e3500b04ed
Fixing the push case (#132)
Quick fix

I'm assuming we're operating under the LLVM developer policies which allow no-review for obvious fixes...
2020-10-08 16:15:52 -07:00