Commit Graph

218 Commits

Author SHA1 Message Date
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
Will Dietz 50cdf443ba
[cmake][CI] Use llvm_gtest target directly. (#5804)
Upstream now has option for installing these components for use in downstream standalone builds:
llvm/llvm-project@0807986 .

Look for (and prefer) this approach, and update our LLVM builds that we install to use this.
2023-08-08 11:44:21 -05:00
Schuyler Eldridge 300746d2e2
[ci] Skip tests for scheduled firtool publishing
Skip tests when creating nightly firtool binaries if using the "scheduled"
event.  This is already getting tested with the nightly integration tests in a
much more robust way and it's pointless to duplicate the tests here.

This gets the number of build steps down to ~1400 and causes binaries to upload
in 25 minutes.

Note: getting ccache setup on this job (and across all jobs) would help with
likely avoid the need for skipping tests.

Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
2023-08-03 10:22:47 -04:00
Andrew Young f665c374d1
[CI] Use a consistent key for ccache caching in Short Integration Tests (#5770)
The ccache action by default uses the current date and time as part of the key
for caching. The main problem with this is that it can create too many
different cache entries, and can eject entries we don't want to be ejected.
There isn't a reason to keep more than one copy of this cache around, so using
a consistent key will cause it to eject itself. I put the name of the job in
the key so that we can identify which entries belong to what jobs when we
examine the cache. This change also updates to a newer version of the ccache
action.
2023-08-02 23:19:00 -07:00
Schuyler Eldridge cbcda6cdb0
[ci] Add ability to skip CIRCT tests in nightly
Add an environment option to skip CIRCT testing.  This is intended to be
used if the previous job knows that tests don't need to be run (or for
testing of actions with a slightly faster turnaround).

Expose this option as a workflow_dispatch input to make this easier to test.

Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
2023-08-02 23:05:36 -04:00
Schuyler Eldridge 663076bf1d
[ci] Expose OS as input to release job
To facilitate testing, add an input OS variable.

Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
2023-08-02 23:05:36 -04:00
Schuyler Eldridge 46a111f3be
[ci] Add Nightly firtool Building
Add nightly builds of `firtool` for Linux targets only.  These builds
occur everyday at 0700 UTC (0000 PDT/2300 PST).

Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
2023-08-02 23:05:36 -04:00
Schuyler Eldridge cbf10a09de
[ci] Use Unified Build in firtool Release CI
Change the CI for building a release of firtool from using a split
LLVM/CIRCT build to a unified build.  The latter should be substantially
faster.

Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
2023-08-02 23:05:35 -04:00
Schuyler Eldridge 5dfe73918f
[ci] Refactor Release CI to Support Dynamic Matrix
Change the firtool release CI to not use a hard-coded build matrix.
Refactor this into two jobs:

  1. "choose-matrix" which constructs JSON blobs of what the paramters are
  for the build matrix.  These JSON blobs are constructed from the step
  environment ("env") to aid readability.

  2. "publish" which reads the JSON blobs to construct the build
  matrix.  (This operates basically the same as before.)

This is done to later enable more plasticity of this CI job for uses which
are not just release publishing, but also for nightly publihsing.

Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
2023-08-02 23:05:32 -04:00
Will Dietz 802b9f1706
[CI] Use LLVM_USE_SPLIT_DWARF to reduce time and space. (#5692) 2023-07-26 15:10:38 -05:00
rsetaluri 4ee7761ada
[CI] Split wheel upload into stages (#5628)
This change splits the python wheel upload into 2 stages (separate jobs). In the
first stage, wheels are built and uploaded simply as artifacts through the
native GitHub actions upload-artifact action. This stage runs on the desired
matrix of configurations (manylinux, macos, etc.) and on all event triggers. In
the second stage, the corresponding wheels are downloaded (download-artifact)
and uploaded to PyPI. This stage only runs on ubuntu and only for tags or
nightly build (i.e. skipping workflow_dispatch).

The reason for this change is documented in #5420.
2023-07-19 10:43:44 -07:00
Schuyler Eldridge a9c5d771d6
[Python] Fix wheel publishing (#5608)
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
2023-07-18 21:52:26 -04:00
rsetaluri 47731ac403
[CI] Fix nightly wheel upload (#5623)
Fixes pypi wheel upload condition for nightly runs. See #5431.
2023-07-18 12:29:28 -07:00
Jack Koenig 1c6f19a3e7
Revamp FIRRTL release artifacts (#5470)
* Add Windows (firtool.exe)
* Remove Ubuntu 18.04 (runner is deprecated)
* Name archives based on OS and architecture
  * linux-x64, macos-x64, linux-x64
  * Windows uses .zip, Linux and MacOS use .tar.gz
* Add sha256 hashes for archives
2023-06-27 09:04:12 -07:00
Will Dietz 7967cedfb1
[CI][Win] Reduce peak disk usage after LLVM rebuild. (#5446)
We mostly just want the installed copy of LLVM,
so extract the single build file required and nuke
the build directory before proceeding.

The build directory is not used after this point,
so we can reclaim the disk space it uses.
2023-06-21 16:44:01 -05:00
Mike Urbach b63bca1e62 [Python] Turn off fail-fast in upload wheels job.
Currently, the MacOS jobs cannot succeed, but that shouldn't block the
Linux jobs. In general, it seems best for all the jobs that can
succeed to move forward and upload their wheels.
2023-06-16 15:51:26 -06:00
rsetaluri 4d9c7e61e8
[CI] Push circt python wheel to pypi nightly (#5412) 2023-06-16 14:01:57 -07:00
John Demme c58fa7015a [CI][Nighly] Fix disable corner
Serves me right for not testing on a branch first.
2023-06-15 18:28:21 +00:00
John Demme ec64b2d456 [CI][Nightly] Disable failing corner
The GCC/Release/Valgrind corner has been failing for some time #5253.
Disabling it until someone has a chance to look into this failure.
2023-06-15 18:24:56 +00:00
Will Dietz 1fad27e264
[CI] Update upload-artifact action v2 -> v3, already using in other flows. (#5271) 2023-05-25 19:23:17 -05:00
Will Dietz 5197a33952
[CI] Update github actions for checkout, cache: v2 -> v3 (#5268)
Node12 -> Node16, primarily.

See: https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/ .

Appears safe, both have some improvements we may enjoy, such as zstd for Windows cache.
2023-05-25 19:21:32 -05:00
Will Dietz 081641e709
[CI] Migrate from set-output to using environment files. (#5267)
https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands
2023-05-25 19:15:13 -05:00
Will Dietz d1cb87231b
Move from defunct codeowners to GitHub CODEOWNERS. (#5269)
Move to new format, we can add / adjust (please do!).

Fixes #3755.
2023-05-25 18:53:25 -05:00
rsetaluri 79cd1ec74f
[CI] Add macos wheels (#5249)
Adds macosx python 3.7/3.8/3.10 configurations to python wheels.
2023-05-23 21:19:18 -07:00
Nandor Licker b7eb1d457d
[CI] Add runs with Valgrind to CI (#5085)
Co-authored-by: Nandor Licker <nandorl@sifive.com>
2023-05-21 09:17:36 +03:00
rsetaluri a6d1074910
[CI] Add python3.8 manylinux wheel (#5174) 2023-05-11 11:54:25 -07:00
Morten Borup Petersen 83dcb0892c
[CI] Bump CI image (#5155) 2023-05-09 15:02:44 +02:00
George Lyon 4eeeb4550f
Upload full sources with firrtl releases (#4901) 2023-03-28 12:14:08 -07:00
Jack Koenig 3e75875846
Enhance Upload Firrtl Binaries (#4887)
* Change Upload Binaries to Upload Firrtl Binaries

This vastly reduces the size of the uploaded binaries while still
serving the needs of Firrtl users.

* Don't build tools when building LLVM

They are not part of the binary release and are unnecessary for building
CIRCT.

* Use CIRCT_RELEASE_TAG=firtool

This works for both tagged releases and will give a version derived from
`git describe --tags` when building from non-tagged commits.
2023-03-27 21:29:44 -07:00
Mike Urbach 8b8baa3849 [CI] Fix workflow yaml whitespace.
A tab snuck in.
2023-03-23 22:19:32 -06:00
Mike Urbach 6c03ebb3e4 [CI] Don't bother verifying Python wheel metadata.
We haven't set up the proper metadata yet, so disable the workflow
from running `twine check` until we do.
2023-03-23 22:17:39 -06:00
Fabian Schuiki 31972c02b4 [CI] Fix windows cmake invocation
Fix an issue with the windows build introduced in e45cd550f.
2023-03-21 09:26:10 -07:00
Fabian Schuiki e45cd550f9 [CI] Make lit tests output less succinct; NFC
Our llvm-lit arguments default to `-sv`, which makes the output succinct
and nice for interactive everyday use. However, in CI, we likely want to
see a more traditional output such that we can easily observe if tests
get stuck.

Add a `LLVM_LIT_ARGS` define to all CI cmake invocations that passes
just `-v` instead of `-sv`, to make lit output one line per tests that
is easily observable in the CI logs.
2023-03-21 09:01:48 -07:00
Mike Urbach 815286ecf1 [CI] Update Python wheel upload to publish to PyPI directly.
Use the recommended GitHub action for this given on
packaging.python.org. Include the PyPI API token via a new secret.
2023-03-13 14:22:01 -06:00
Hideto Ueno f340cda646
[CI] Swap build mode of gcc and clang (#4747)
GCC+debug consumes too much memory. This swaps gcc and clang build mode.

CI: https://github.com/llvm/circt/actions/runs/4306635035 

Close https://github.com/llvm/circt/issues/4740
2023-03-02 10:58:08 +09:00
Mike Urbach 8d58e11f4f
[CI] Add a workflow for building and uploading Python wheels. (#4710)
The workflow uses cibuildwheel to build the wheels, and uploads them
to GitHub. They're added to the artifacts for manual runs, and added
to the release assets when triggered by a release.

Currently, manylinux wheels are built for CPython 3.7 and 3.10.

This also updates the packaging scripts to include setuptools_scm to
take version numbers from Git tags.
2023-02-23 14:29:44 -07:00
Jack Koenig d696e2b485 Unshallow CIRCT clone in uploadBinaries workflow
This is needed in order to run git describe --tag
2023-02-22 17:49:27 -08:00
Jack Koenig aadb930c9d
Improve MacOS published binaries and flow (#4701)
* Disable ZSTD so that MacOS binaries do not dynamically link against
  libzstd
* Use install target and package that to have include and lib
  directories (in addition to the bin directory)
* Upload artifacts to the Github Actions page when this workflow is
  triggered so that the artifacts can be checked
2023-02-22 18:23:34 -06:00
John Demme f299107c6e
[CI] Bump cmake version (new image) and switch to ninja (#4597) 2023-01-26 21:37:18 -08:00
Julian Oppermann ded4f0e961
[CI] Bump integration test images. (#4571) 2023-01-24 20:19:10 +13:00
Will Dietz 048a2ed0e3
[CI] Enable statistics when building binaries for releases. (#4515)
Statistics are useful, e.g. for metrics.

Insignificant impact on binary size (locally: +200K for a 11M binary) and negligible performance impact.
2023-01-09 08:53:41 -06:00
Will Dietz 3770165898 [CI] uploadBinaries: break out compiler options, fix.
I wanted to keep cc/cxx under "compiler" but couldn't make that work.

Tested on fork.
2022-12-21 17:19:07 -06:00
Will Dietz 0568398e62 [CI] Fix uploadBinaries.yml, restore ninja installation.
This partially reverts commit 01b3d40766.
2022-12-21 16:29:13 -06:00
Will Dietz 01b3d40766
[CI] uploadBinaries: allow workflow_dispatch, test what we publish, drop cache (#4474)
Enable the binary workflow to be run manually, but only upload binaries if it's a tag. I am not sure what happens if they're already present, so probably best to use this wisely.

While visiting, run the basic lit tests for LLVM/MLIR before bundling them for others (and sometimes ourselves) to use.

Drop cache as well: partly to avoid increased pressure on the cache from binaries/components built to run the tests that we don't presently, but also because I'm not sure the cached LLVM will likely ever be a cache hit since we release and update LLVM at about the same frequency.  In the future, this may be useful if we did do more frequent releases, or ever promoted a pre-release to a an actual one.

cc #4473.
2022-12-21 16:17:27 -06:00
Will Dietz 8668458366
[CI] uploadBinaries.yml: Temporarily change 20.04 compiler to 12. (#4475)
clang-11 on Ubuntu currently produces a very broken LLVM.
(see LLVM issue 59622)
2022-12-21 16:16:01 -06:00
Schuyler Eldridge e83a49939a
[.github] Use ubuntu-latest in assign-reviewers CI
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
2022-12-15 20:41:37 -05:00
John Demme 8c3baaff07
[CI] Bump integration test images (#4441)
Moves through the following releases, release title included for convenience:

- v11.1: [Add jinja2 to integration test image](https://github.com/circt/images/releases/tag/v11.1)
- v11.1.1: [Bump to get latest Ubuntu security updates](https://github.com/circt/images/releases/tag/v11.1.1)
- v11.1.2: [Add Z3 to integration build image](https://github.com/circt/images/releases/tag/v11.2)

Full commit history: https://github.com/circt/images/compare/v11...v11.2
2022-12-13 15:37:14 -08:00
Hideto Ueno d15bf15a5b
[CI] Swap static and shared library build (#4310)
This PR swaps shared lib configuration of gcc+debug and clang+release CI so that we can reduce the binary size. 
We just wanted to cover both static and shared lib builds so it should be fine to swap them.
2022-11-16 04:09:15 +09:00
Andrew Young cdd42a8660 Run `circt-check` on Windows builds 2022-10-19 17:41:50 -07:00
Andrew Young d80c74d237
[Windows] Don't build LLVM with debug symbols (#4118)
These debug symbols take up too much disk space and prevent us from
running in the CI container.  I enabled debug symbols a couple days ago,
and the issue has surfaced once LLVM was bumped.  This still builds
CIRCT in RelWithDebInfo mode.
2022-10-18 00:27:37 -07:00
Andrew Young 72f4c3f738
Build CIRCT on Windows with debug symbols (#4098)
Building with debug symbols makes it much easier to debug a crash in CI,
which is sometimes necessary when you don't have access to a Windows
machine to reproduce on.
2022-10-13 16:29:28 -07:00
Will Dietz 43d5d57d0b
Fixes to build system to support unittests again, add to CI (#4082)
1. test: tweak test discovery to enable unittests, fix deps var.

Discovery will find the generated lit.site.cfg.py, which
knows how to load the lit.cfg.py.

This could be gated on whether we're building "standalone",
as flang does, but that still doesn't work as we are not part
of the config mapping.

cc #2750.

Also fixup typo in variable name, .._DEPS -> .._DEPENDS.

2. cmake: gtest is available if built with LLVM, set accordingly.

We only include the unittests directory if we think the GTEST bits
are available, which we were not indicating in the non-standalone case.

Fix this, and FWIW this is also done in flang's CMakeLists.txt .

3. [CI] Add check-circt-unit to testing.
2022-10-12 19:46:06 -05:00
Will Dietz d82ecaa932
[CI] Fix llvm-lit path for Windows build. (#4032) 2022-09-30 08:58:18 -05:00
John Demme e5bb57eb2a
[CI] Disable gcc-debug (#3999)
GCC debug binaries are just too large and have been causing disk space issues intermittently. Just disable them for now as it is a longer effort to cut down on the amount of stuff we build. Fixes #3328 .
2022-09-26 16:29:46 -07:00
Morten Borup Petersen 06b7ee9deb
[CI] Move 'show unsupported' to CI cmake config step (#3895) 2022-09-15 20:00:14 +02:00
Zachary Yedidia d638a275e2
[Github actions] Include release tag version in automated release build (#3814)
Release binaries produced by the `uploadBinaries` action now build with a
specified version computed using the tag of the release that caused the
job to run.
2022-09-02 13:52:29 -07:00
Will Dietz e4fe48d7d5
[CI] Try to trim cached LLVM builds (#3782)
Don't cache entire llvm/build directory, we only need lit.

Also trim windows build's cached LLVM,
move to configuring from installed copies of LLVM/MLIR not build tree.

Before/After of cached LLVM data:

Windows: 1.15GB -> 478MB
clang: 241MB -> 63MB
gcc: 4.88GB -> 1.28GB

Cache limit is 10GB.
2022-08-26 13:37:57 -05:00
John Demme 4410be91d8 [CI] Bump to ubuntu-latest for Docker images
Ubuntu 18.04 is being deprecated. Brownouts recently got my attention.
2022-08-22 13:55:58 -07:00
Will Dietz 76f7d41740 CI: Fix clang-format after tidy changes. 2022-08-18 14:39:57 -05:00
Will Dietz 2ac96c00e0
[CI] Fix invocation of clang-tidy. (#3747)
Has been silently failing for some time, pointed at non-existent
directory to find the compilation database.

While visiting, let clang-tidy operate in parallel as it can take
a small but non-trivial amount of time to process each file.
2022-08-17 18:54:34 -05:00
Zachary Yedidia ea215f0e82
[Github Actions] Fix macOS build by switching to clang (#3706)
While trying to use the Mac firtool pre-built binary on a larger design
I noticed that it sometimes throws bogus errors, for example saying that
a value is not fully initialized when in fact it is, while the Linux
prebuilt binary works just fine on the same file. I did some testing and
determined that these errors appear in the Mac CIRCT build if using gcc
instead of clang. I'm not sure what the cause is -- I looked at the
build logs using gcc and noticed there were warnings about weak symbol
visibility during linking, but I'm not sure what these warnings really
mean.

The reason to use gcc over clang was to static link more libraries, but
clearly clang must be used on Mac. Let me know if you think we should
also use clang for the Linux build, but this PR just changes to clang
for Mac.

This PR switches the Mac build to use clang instead of gcc. Firtool now
looks like this:

```
$ otool -L firtool
firtool:
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1311.0.0)
	/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.11)
	/usr/local/opt/zstd/lib/libzstd.1.dylib (compatibility version 1.0.0, current version 1.5.2)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1200.3.0)
```

This PR also switches the Linux builds over to clang as well because it
looks like an upstream commit in LLVM broke the CIRCT build using gcc on
Ubuntu 18.04 (not 20.04 though). See here for details:
https://github.com/zyedidia/circt/runs/7799272570?check_suite_focus=true.
2022-08-17 13:39:07 -07:00
Martin Erhart dd2e9120c1
[ExportSystemC] Basic infrastructure for emission (#3726)
This commit introduces the base classes and utilities to implement
emission patterns and an emission printer which takes the role of a
driver that can be called in a circt-translate pass. Also includes
emission patterns for the builtin module and SCModule operations to
(1) allow to implement some basic unit and integration tests
(2) show the reviewer how emission patterns look like using this
infrastructure.
2022-08-17 00:55:08 +02:00
Zachary Yedidia 39cc110cd5
Github Actions: automatically build and upload binaries on release (#3617)
In order to be easily usable with Chisel soon, CIRCT should provide
pre-built binaries at least for macOS and Linux. Currently pre-built
Linux binaries are manually uploaded whenever a new build is made. This
PR adds a Github Actions script that builds and uploads macOS and Linux
binaries whenever a release (or pre-release) is made (requested in
#2842). The build from scratch takes approximately 2 hours.

The generated binaries are not fully static but are portable enough to
run on base versions of macOS and Ubuntu/other Linuxes. The dynamic
linking ends up looking like this:

Linux:

```
$ ldd firtool
	linux-vdso.so.1 (0x00007ffc10fd1000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f19d67c3000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f19d6441000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f19d6229000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f19d5e64000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f19d7142000)
```

Mac:

```
$ otool -L firtool
firtool:
	/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.11)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1311.0.0)
```

The build is currently set up to use gcc/g++ instead of clang because
clang includes additional dynamic dependencies on Linux (`librt.so.1`,
`libdl.so.2`, and `libz.so.1`) and does not support the
`-static-libstdc++` flag on mac. The build currently runs on macOS-11
and Ubuntu-20.04.

Currently the uploaded package contains everything in the CIRCT `bin`
directory after a build.
2022-08-01 11:48:01 -07:00
Andrew Lenharth 95b52fb6ee
Bump LLVM to dd74d3117de0fd96383beeb4b4b913efcb9f4328 (#3492)
Co-authored-by: Mike Urbach <mikeurbach@gmail.com>
2022-07-09 08:21:17 -05:00
John Demme 9f7f3263b7
[CI] Run the test builds in parallel (#3278)
Since we are now compiling separate LLVMs for GCC and clang, we should parallelize the CIRCT builds as well. Ditching the prebuild-and-cache-llvm step since that broke and nobody noticed.
2022-06-07 11:33:07 -07:00
Nandor Licker 6883750093
[CI] Build and cache seprate Clang and GCC builds of LLVM (#3242)
Code compiled with Clang cannot be linked with GCC due to incompatibilities related to lambda closure capture lists.

This patch builds and caches LLVM with Clang to be used with the Clang Release build and with GCC to be used with the GCC Debug build of CIRCT.

The ABI issue and a potential fix is being tracked here:
https://github.com/itanium-cxx-abi/cxx-abi/issues/141
2022-06-02 09:07:18 +03:00
Aliaksei Chapyzhenka 37b7baff75
LLVM bump (as we know it) (#3074)
* LLVM bump (as we know it)

* minor format fix

* DCMAKE_BUILD_TYPE=?

* Update lib/Dialect/MSFT/MSFTOps.cpp

Co-authored-by: Andrew Young <youngar17@gmail.com>

* Update lib/Dialect/FIRRTL/FIRRTLOps.cpp

Co-authored-by: Andrew Young <youngar17@gmail.com>

* Update lib/Dialect/Calyx/CalyxOps.cpp

Co-authored-by: Andrew Young <youngar17@gmail.com>

* removed anon module test

Co-authored-by: Andrew Young <youngar17@gmail.com>
2022-05-09 14:30:14 -07:00
Mike Urbach 174793d50c
[CI] Update nightly workflow to not fail fast. (#2899)
If some configurations fail, we still want to test the others.
2022-04-15 10:07:17 -06:00
Hideto Ueno 060703a0f4
[CI] Only build the host backend (#2845)
Fixes #2843
2022-04-05 10:04:30 +09:00