MSVC fails to build the Slang 3 dependency due to issues in Slang's
`MathUtils.h`. (The file is missing an `#include <limits>`.) Since we
are planning to upgrade to Slang 4 or 5 anyway, don't bother setting up
a full workaround for this issue yet and instead just disable Slang in
MSVC CI builds and installs. Once the Verilog frontend integration
matures and we update Slang, we can go back in and enable MSVC builds
again.
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>
Give write permissions to jobs that upload release assets.
Set the release-tag explicitly so the upload action knows where to upload on manual runs (on a tag). When triggered by a release this isn't needed but doesn't hurt.
Bump the upload-release-assets action v2 -> v3: https://github.com/AButler/upload-release-assets/releases/tag/v3.0
(This is needed for the release-tag support, also fixes a warning about node version).
See if this helps with #6395. Update the sccache key to use the full
runner name and not rely on the OS. The runner may be totally different
and having cache hits by OS doesn't make sense.
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
The default `install` command doesn't install LLVM utils Filecheck/not/count. Downstream users of CIRCT might want to use FileCheck directly so this PR adds `-DLLVM_INSTALL_UTILS=On` to cmake options. It increase 1MB of release artifacts (85MB->86MB) so I believe that's ok.
Tested by https://github.com/llvm/circt/actions/runs/6483396914.
Change the workflow_call "package_name_prefix" of the unified
build/test/install GitHub workflow to be optional. This is only necessary
if an "install" argument is specified (and that is already optional!).
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
Fix a bug in the UBTI workflow where this would error if no install target
was given. This workflow should work for any combination of optional
installation and testing.
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
Fix a problem where the runTests input only worked correctly for
workflow_dispatch, but not for workflow_call.
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
Add all available clang versions to the Unified Build/Test/Install GitHub
Workflow. This is done to allow for testing of any version of clang
that is available in the ubuntu-20.04 and ubuntu-22.04 runners. Not all
versions are compatible with all runners.
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
Enable sccache-based caching for the unified build/test/install GitHub
Workflow. Use sccache as opposed to ccache because the former supports
Windows (as suggested by the hendrikmuhs/ccache-action documentation).
Disable caching for Windows non-release builds as there is a bug involving
cmake and sccache.
This commit is the last piece necessary to begin replacing existing
build/test GitHub workflows used in CIRCT.
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
The name of the artifact that include the nightly and published `firtool`
was changed from `firrtl-bin` to `firtool-bin`. This caused a bunch of
other CI to stop getting the latest version (and will break CI on the
1.52.0 release). I'm fine with the name change. I would like to delay
the name change until a later point. This reverts the name change back to
the original.
CC: @SpriteOvO
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
Add a work-in-progress reusable GitHub Action to do a unified build, test,
and install of CIRCT. This is intended to be a replacement for pieces of
other GitHub actions which are doing similar, but slightly different
build/test/install.
This is directly landed onto main so that I can test this with a
workflow_dispatch event (manual trigger). This even can only be used for
workflows that are on the default branch.
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>