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>
Self-hosted runners were disabled in our repo, so none of our builds are
being picked up. Going back to the slow ones (with less disk space)
while we figure out the situation.
We are running out of space in PyPI, so this removes support for
versions Python 3.9 and Python 3.11, which are not used by anyone in
the community at the moment. It also reduces the scheduled frequency
of dev wheel builds from nightly to every Monday at noon UTC.
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 macos-latest tag has been migrated to macos-12, and the version of
cibuildwheel we use doesn't run with the version of Python included in
macos-12 (Python 3.12). Note that this has no bearing on the versions
of Python we build the wheels for; this is the cibuildwheel Python
code that is running on the runner's default Python to set up the
build for the version of Python the wheel is targeting.
To amend this, I am locking to MacOS tag to a specific version, and
updating the cibuildhweel version.
Fixes https://github.com/llvm/circt/issues/6385.
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.
The wheel version string has been broken for python>=3.8. It seems
recent version of setuptools_scm has changed something, so
downgrade the version for now.
Also this commit removes python 3.7 supports since it caused some version conflicts.
Tested: https://github.com/llvm/circt/actions/runs/6272413564
We were having problems with the universal MacOS wheels, so we
reverted back to just building the x86 wheels. But this still fails,
because these options are telling cibuildwheel to build for the
universal architecture on MacOS, which is not enabled.
Also install the OM linker as part of the minimal firtool installation.
This will be included in both the nightly and published releases.
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
Change the GitHub Action that checks that the "main" branch isn't broken
for Windows builds to use the Unified Build/Test/Install Action.
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
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>
Switch from using "clang-12"/"clang++-12" to just "clang"/"clang++". This
doesn't appear to be necessary and will help unify the future use of
GitHub caching.
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>
Use less resource intensive options for building nightly releases of CIRCT
full. The GitHub runners will run out of disk space if using
"relwithdebinfo" and/or "asserts=on". Use "release" and "asserts=off".
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
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>
Change the uploadFirrtlReleaseArtifacts workflow to use a reusable
workflow for building, testing, and installing firtool.
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>
Remove the "-DLLVM_OPTIMIZED_TABLEGEN=ON" flag from cmake options used to
build firtool nightly binaries. This flag causes build errors when
combined with the "-DLLVM_ENABLE_ASSERTIONS=ON" flag which is desired for
testing of nightly binary builds.
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
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.
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.