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).
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.
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.
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.
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.
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.
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.
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.
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.
* 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
Committing w/o review to fix workflow bug quickly. Does no harm if not correct.
* Add git fetch step to fix clang-* diffs
* Fixing -path directory on clang-tidy-diff call
clang-tidy-diff aparantly only looks for the build database if there are
revelant changes in the diff.
* Gotta add flag to export compile_commands.json
* Update LLVM version to c89e46e76
A small fixup is required to avoid conflicts between ODS-generated build
methods because of default arguments. Also, since this keeps failing, I've
updated the llvm cache so that it runs in a separate job. Otherwise the cache is not updated when the CIRCT build fails.
* [LLHD] Add `SigType` conversion
* [LLHD] Add time type and constants conversion
Previously time constants were converted by their users, by creating a constant for each of the three time attributes. This makes time constants LLVM arrays containing the three time values instead, allowing more a more flexible use (e.g. passing time operands as block arguments).
* Add time type conversion.
* Add tme constants conversion.
* Add time operands to the process persistence state.
* Fix affected tests.
* [LLHD] Set LLVM::DialectCastOp as legal during `InstOp` lowering
This works around the PartialConversion failing because of the introduction of (unused) `DialectCastOps`, that will be dealt with later during the full conversion.
Co-authored-by: rodonisi <simon@rodoni.ch>
This simple CI script builds CIRCT and runs 'make check-circt'.
The necessary LLVM submodule is automatically pulled and cached
to speed-up subsequent builds.