Commit Graph

186 Commits

Author SHA1 Message Date
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
Mike Urbach 8801f42463 [NFC] Rename Python wheel job name from Nightly to Weekly.
We have changed the job to run weekly to avoid running out of space in
PyPI. This just updates the job name to reflect that.
2024-01-25 13:09:56 -07:00
John Demme f2428b995f Revert "[Builds] Revert back to small runners (#6586)"
This reverts commit 34489a17f0.
2024-01-17 05:18:35 +00:00
John Demme 34489a17f0
[Builds] Revert back to small runners (#6586)
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.
2024-01-16 19:22:53 -08:00
Mike Urbach 392af2fe5e [Python] Reduce wheel matrix and scheduled frequency.
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.
2024-01-10 12:06:28 -07:00
Will Dietz c8a2514e05
[CI] Add options to control whether workflow_dispatch assert + build mode. (#6549) 2024-01-05 09:16:24 -06:00
Will Dietz 78d41a865b
[CI] Bump runner for windows release artifacts 2019 -> 2022. (#6548)
Match what we use in CI.
2024-01-04 11:49:03 -06:00
Will Dietz c6e413918e [CI] buildAndTestWindows: Set "write" permission to unbreak for now. 2024-01-04 11:15:16 -06:00
Will Dietz 0d95605d1e
[CI] Fix release asset upload job permissions, support manual runs. (#6547)
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).
2024-01-04 10:58:58 -06:00
Mike Urbach 2e70f2e052 [Python] Enable trusted publishing for PyPI wheels.
This is the recommended way to manage access to PyPI from CD pipelines
moving forward. Our PyPI project is set up to allow this now.
2023-12-06 09:44:00 -07:00
Schuyler Eldridge 32ee6c94cb
[ci] Change Windows runner to 2022
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>
2023-11-09 16:53:29 -05:00
Mike Urbach d7088aa368
[CI] Update Python wheel action for MacOS. (#6386)
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.
2023-11-07 12:56:15 -07:00
John Demme 075b3cd07e [CI] Disable unified build
The short integration test build is a unified build so this is
redundant.
2023-11-02 20:01:17 +00: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 583b36b3bc
[CI] Don't include deleted Python files in yapf check (#6350) 2023-10-26 18:58:57 -07:00
George Lyon 68f6ba417d
Remove old workflow (#6306) 2023-10-18 14:58:34 -07:00
Hideto Ueno 0518211c34 [CI] Remove a backslash
This fixes a windows build failure
2023-10-11 07:26:37 -07:00
Hideto Ueno 6d37163e7c
[CI] Install LLVM utils (#6279)
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.
2023-10-11 23:17:54 +09:00
Hideto Ueno cb0c8afd96
[Python] Downgrade setuptools_scm, drop python 3.7 as EOL (#6180)
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
2023-09-22 23:11:46 +09:00
Mike Urbach 6b1f86c360
[Python] Remove CI options that only applied to MacOS universal. (#6169)
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.
2023-09-21 17:16:18 -06:00
Lenny Truong d417432291
[CI] Hotfix macosx python wheel (#6158) 2023-09-20 12:47:43 -06:00
Lenny Truong 34dfff1d0a
[CI] Use macOS universal wheels for M-series, add Python 3.9 and 3.11 support (#5822)
See https://cibuildwheel.readthedocs.io/en/stable/faq/#apple-silicon
2023-09-13 15:47:24 -06:00
John Demme 8714e79956 [CI] Add OS label 2023-09-12 02:03:48 +00:00
John Demme 90836432fe [CI] Move some PR builds over to the faster agents
Should speed up the CI gate builds. May have to revert this if it
proves too expensive.
2023-09-11 23:29:30 +00:00
Schuyler Eldridge f5e208ce42
[ci] Add om-linker to "firtool" install
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>
2023-09-08 11:25:29 -04:00
Will Dietz 4a453de38f
[CI] Unshallow llvm to include past 30 days, so have revs to bisect over. (#6006)
Couldn't easily determine how to selectively fetch the desired range,
so rely on this running regularly and grab based on time.

Fixes #4566.
2023-08-31 18:52:53 -05:00
Schuyler Eldridge 806b4153b4
[ci] Change Windows PR Action to use Unified B/T/I (#5955)
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>
2023-08-28 15:10:26 -04:00
Schuyler Eldridge 9ba8a93dc1
[ci] Make package_name_prefix optional
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>
2023-08-25 11:12:54 -04:00
Schuyler Eldridge ff169cc489
[ci] Fix UBTI erroring on no install target
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>
2023-08-25 01:59:42 -04:00
Schuyler Eldridge 727a0dd622
[ci] Fix UBTI Workflow runTests boolean
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>
2023-08-25 01:29:07 -04:00
Schuyler Eldridge 54c2efb556
[ci] Add complete list of clangs to UBTI
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>
2023-08-25 00:29:15 -04:00
Schuyler Eldridge 93b5dd50c7
Revert "[ci] Change Linux artifact compiler to use "clang""
This reverts commit 9aa2d2b9c3.

h/t @dtzSiFive

Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
2023-08-25 00:22:05 -04:00
Schuyler Eldridge cf61b00344
[ci] Add all runner options to Unified B/T/I, NFC
Add all runner options to Unified B/T/I workflow.

Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
2023-08-24 21:20:11 -04:00
Schuyler Eldridge 9aa2d2b9c3
[ci] Change Linux artifact compiler to use "clang"
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>
2023-08-24 17:09:21 -04:00
Schuyler Eldridge d245822605
[ci] Cache unified build/test/install
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>
2023-08-22 13:37:04 -04:00
Schuyler Eldridge f8d094c3fd
[ci] Revert "firtool" artifact name change
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>
2023-08-22 13:32:52 -04:00
Schuyler Eldridge 4fcda16c54
[ci] Use release/asserts=off for nightly shared
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>
2023-08-18 16:46:34 -04:00
Asuna 70be7e2cda
[CI] Upload `circt-full-shared` without `-libs` suffix (#5891) 2023-08-18 16:23:50 -04:00
Asuna 10f6d69e9a
[CI] Upload full shared libs installation for Linux and macOS (#5832)
- Upload full shared libs installation for Linux and macOS
- Generate flat matrix
2023-08-16 23:58:30 -04: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
Schuyler Eldridge 53fbecda75
[ci] Use reusable workflow for firtool artifacts
Change the uploadFirrtlReleaseArtifacts workflow to use a reusable
workflow for building, testing, and installing firtool.

Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
2023-08-14 11:50:50 -04:00
Schuyler Eldridge 87f8d9ae76
[ci] Finish reusable build/test/install workflow
Get the reusable build/test/install GitHub workflow functioning correctly.

Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
2023-08-14 11:50:50 -04:00
Schuyler Eldridge 5340055233
[ci] Add Reusable Build/Test/Install Action, WIP
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>
2023-08-13 21:04:28 -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
Schuyler Eldridge 4e891d2ca1
[ci] Enable Asserts, RelWithDebInfo for nightlies
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
2023-08-11 17:09:08 -04:00
Schuyler Eldridge 8e5f87c1b2
[ci] Remove OPTIMIZED_TABLEGEN from nightlies
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>
2023-08-11 17:09:07 -04: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