Skip to content

Nightly integration tests #175

Nightly integration tests

Nightly integration tests #175

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
# 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.
runs-on: ["self-hosted", "1ES.Pool=1ES-CIRCT-builds", "linux"]
container:
image: ghcr.io/circt/images/circt-integration-test:v12.2
volumes:
- /mnt:/__w/circt
strategy:
fail-fast: false
matrix:
# 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.
build-assert: [ON, OFF]
build-shared: [ON, OFF]
build-type: [Debug, Release]
compiler:
- cc: clang
cxx: clang++
- cc: gcc
cxx: g++
lit-flags: ['', '--vg']
exclude:
- build-type: Debug
lit-flags: --vg
- build-type: Release
lit-flags: --vg
build-assert: OFF
- build-type: Release
lit-flags: --vg
build-shared: ON
# TODO: This corner is failing and has been for some time. #5253.
- build-type: Release
compiler: {cc: gcc, cxx: g++}
lit-flags: --vg
steps:
# Clone the CIRCT repo and its submodules. Do shallow clone to save clone
# time.
- name: Get CIRCT
uses: actions/checkout@v3
with:
fetch-depth: 1
submodules: true
- name: ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
max-size: 300M
key: nightly-${{ matrix.compiler.cc }}-${{ matrix.build-type }}-${{ matrix.build-shared }}-${{ matrix.build-assert }}
# --------
# Build and test CIRCT
# --------
- 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 }}
run: |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
mkdir build && cd build
cmake -GNinja ../llvm/llvm \
-DBUILD_SHARED_LIBS=$BUILD_SHARED \
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
-DCMAKE_C_COMPILER=$CC \
-DCMAKE_CXX_COMPILER=$CXX \
-DLLVM_CCACHE_BUILD=ON \
-DLLVM_ENABLE_ASSERTIONS=$BUILD_ASSERT \
-DLLVM_ENABLE_PROJECTS=mlir \
-DLLVM_EXTERNAL_PROJECTS=circt \
-DLLVM_EXTERNAL_CIRCT_SOURCE_DIR=.. \
-DLLVM_TARGETS_TO_BUILD="host" \
-DLLVM_USE_LINKER=lld \
-DLLVM_USE_SPLIT_DWARF=ON \
-DMLIR_ENABLE_BINDINGS_PYTHON=ON \
-DCIRCT_BINDINGS_PYTHON_ENABLED=ON \
-DESI_RUNTIME=ON \
-DLLVM_LIT_ARGS="-v --show-unsupported ${{ matrix.lit-flags }}"
- name: Test CIRCT
run: |
ninja -C build check-circt -j$(nproc)
- name: Unit Test CIRCT
run: |
ninja -C build check-circt-unit -j$(nproc)
- name: Integration Test CIRCT
if: ${{ matrix.lit-flags == '' }}
run: |
ninja -C build check-circt-integration -j$(nproc)