2020-11-20 08:35:57 +08:00
|
|
|
name: Nightly integration tests
|
|
|
|
|
|
|
|
# Run on request and every day at 12 noon UTC
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
schedule:
|
|
|
|
- cron: 0 12 * * *
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
# Build CIRCT and run its tests using a Docker container with all the
|
|
|
|
# integration testing prerequisite installed.
|
|
|
|
build-circt:
|
|
|
|
name: Build and Test
|
2023-08-09 04:37:31 +08:00
|
|
|
# Run on an internal MSFT subscription. Please DO NOT use this for any other
|
|
|
|
# workflows without talking to John Demme (john.demme@microsoft.com, GH
|
|
|
|
# teqdruid) first. We may lose funding for this if it ends up costing too
|
|
|
|
# much.
|
|
|
|
# If individual jobs fail due to timeouts or disconnects, please report to
|
|
|
|
# John and re-run the job.
|
2023-09-12 10:03:48 +08:00
|
|
|
runs-on: ["self-hosted", "1ES.Pool=1ES-CIRCT-builds", "linux"]
|
2020-11-20 08:35:57 +08:00
|
|
|
container:
|
2024-06-26 13:03:20 +08:00
|
|
|
image: ghcr.io/circt/images/circt-integration-test:v13.1
|
2023-08-09 04:37:31 +08:00
|
|
|
volumes:
|
|
|
|
- /mnt:/__w/circt
|
2021-03-03 14:21:11 +08:00
|
|
|
strategy:
|
2022-04-16 00:07:17 +08:00
|
|
|
fail-fast: false
|
2021-03-03 14:21:11 +08:00
|
|
|
matrix:
|
2023-08-09 04:37:31 +08:00
|
|
|
# Please clear all new builds with John first. Any changes to this
|
|
|
|
# matrix could result in a drastically increased number of builds, which
|
|
|
|
# in turn costs more. Changes which don't result in new builds are OK.
|
2021-03-03 14:21:11 +08:00
|
|
|
build-assert: [ON, OFF]
|
|
|
|
build-shared: [ON, OFF]
|
|
|
|
build-type: [Debug, Release]
|
|
|
|
compiler:
|
|
|
|
- cc: clang
|
|
|
|
cxx: clang++
|
|
|
|
- cc: gcc
|
|
|
|
cxx: g++
|
2023-05-21 14:17:36 +08:00
|
|
|
lit-flags: ['', '--vg']
|
2022-09-27 07:29:46 +08:00
|
|
|
exclude:
|
2023-05-21 14:17:36 +08:00
|
|
|
- build-type: Debug
|
|
|
|
lit-flags: --vg
|
|
|
|
- build-type: Release
|
|
|
|
lit-flags: --vg
|
|
|
|
build-assert: OFF
|
|
|
|
- build-type: Release
|
|
|
|
lit-flags: --vg
|
|
|
|
build-shared: ON
|
2023-06-16 02:24:56 +08:00
|
|
|
# TODO: This corner is failing and has been for some time. #5253.
|
|
|
|
- build-type: Release
|
2023-06-16 02:28:21 +08:00
|
|
|
compiler: {cc: gcc, cxx: g++}
|
2023-06-16 02:24:56 +08:00
|
|
|
lit-flags: --vg
|
2021-03-03 14:21:11 +08:00
|
|
|
|
2020-11-20 08:35:57 +08:00
|
|
|
steps:
|
|
|
|
# Clone the CIRCT repo and its submodules. Do shallow clone to save clone
|
|
|
|
# time.
|
|
|
|
- name: Get CIRCT
|
2023-05-26 08:21:32 +08:00
|
|
|
uses: actions/checkout@v3
|
2020-11-20 08:35:57 +08:00
|
|
|
with:
|
|
|
|
fetch-depth: 1
|
|
|
|
submodules: true
|
|
|
|
|
2023-08-09 13:09:26 +08:00
|
|
|
- name: ccache
|
|
|
|
uses: hendrikmuhs/ccache-action@v1.2
|
2020-11-20 08:35:57 +08:00
|
|
|
with:
|
2023-08-09 13:09:26 +08:00
|
|
|
max-size: 300M
|
2023-08-12 09:10:54 +08:00
|
|
|
key: nightly-${{ matrix.compiler.cc }}-${{ matrix.build-type }}-${{ matrix.build-shared }}-${{ matrix.build-assert }}
|
2020-11-20 08:35:57 +08:00
|
|
|
|
|
|
|
# --------
|
2021-03-03 14:21:11 +08:00
|
|
|
# Build and test CIRCT
|
2020-11-20 08:35:57 +08:00
|
|
|
# --------
|
|
|
|
|
2021-03-03 14:21:11 +08:00
|
|
|
- name: Configure CIRCT
|
|
|
|
env:
|
|
|
|
CC: ${{ matrix.compiler.cc }}
|
|
|
|
CXX: ${{ matrix.compiler.cxx }}
|
|
|
|
BUILD_ASSERT: ${{ matrix.build-assert }}
|
|
|
|
BUILD_SHARED: ${{ matrix.build-shared }}
|
|
|
|
BUILD_TYPE: ${{ matrix.build-type }}
|
2020-11-20 08:35:57 +08:00
|
|
|
run: |
|
2021-07-29 23:49:58 +08:00
|
|
|
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
|
2021-03-03 14:21:11 +08:00
|
|
|
mkdir build && cd build
|
2021-07-29 23:49:58 +08:00
|
|
|
cmake -GNinja ../llvm/llvm \
|
2021-03-03 14:21:11 +08:00
|
|
|
-DBUILD_SHARED_LIBS=$BUILD_SHARED \
|
|
|
|
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
|
|
|
|
-DCMAKE_C_COMPILER=$CC \
|
|
|
|
-DCMAKE_CXX_COMPILER=$CXX \
|
2021-07-29 23:49:58 +08:00
|
|
|
-DLLVM_CCACHE_BUILD=ON \
|
|
|
|
-DLLVM_ENABLE_ASSERTIONS=$BUILD_ASSERT \
|
|
|
|
-DLLVM_ENABLE_PROJECTS=mlir \
|
|
|
|
-DLLVM_EXTERNAL_PROJECTS=circt \
|
|
|
|
-DLLVM_EXTERNAL_CIRCT_SOURCE_DIR=.. \
|
2022-04-05 09:04:30 +08:00
|
|
|
-DLLVM_TARGETS_TO_BUILD="host" \
|
2021-07-29 23:49:58 +08:00
|
|
|
-DLLVM_USE_LINKER=lld \
|
2023-07-27 04:10:38 +08:00
|
|
|
-DLLVM_USE_SPLIT_DWARF=ON \
|
2021-07-29 23:49:58 +08:00
|
|
|
-DMLIR_ENABLE_BINDINGS_PYTHON=ON \
|
2022-09-16 02:00:14 +08:00
|
|
|
-DCIRCT_BINDINGS_PYTHON_ENABLED=ON \
|
[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-31 05:22:00 +08:00
|
|
|
-DLLVM_LIT_ARGS="-v --show-unsupported ${{ matrix.lit-flags }}" \
|
|
|
|
-DCIRCT_SLANG_FRONTEND_ENABLED=ON
|
2024-06-26 13:03:20 +08:00
|
|
|
|
|
|
|
# Temporarily disable ESI runtime builds until we work out the Abseil conflict (#7236).
|
|
|
|
# -DESI_RUNTIME=ON
|
2021-03-03 14:21:11 +08:00
|
|
|
- name: Test CIRCT
|
2020-11-20 08:35:57 +08:00
|
|
|
run: |
|
2021-07-29 23:49:58 +08:00
|
|
|
ninja -C build check-circt -j$(nproc)
|
2022-10-13 08:46:06 +08:00
|
|
|
- name: Unit Test CIRCT
|
|
|
|
run: |
|
|
|
|
ninja -C build check-circt-unit -j$(nproc)
|
2021-03-03 14:21:11 +08:00
|
|
|
- name: Integration Test CIRCT
|
2023-05-21 14:17:36 +08:00
|
|
|
if: ${{ matrix.lit-flags == '' }}
|
2020-11-20 08:35:57 +08:00
|
|
|
run: |
|
2021-07-29 23:49:58 +08:00
|
|
|
ninja -C build check-circt-integration -j$(nproc)
|