Skip to content

Minimal Example Showcasing Errors with ObjectFIFOs #6938

Minimal Example Showcasing Errors with ObjectFIFOs

Minimal Example Showcasing Errors with ObjectFIFOs #6938

name: Compile across platforms
on:
push:
branches:
- main
pull_request:
types: [assigned, opened, synchronize, reopened]
workflow_dispatch:
merge_group:
defaults:
run:
# force bash for windows
shell: bash
env:
# Run apt package manager in the CI in non-interactive mode.
# Otherwise, on Ubuntu 20.04 the installation of tzdata asking question
DEBIAN_FRONTEND: noninteractive
concurrency:
# A PR number if a pull request and otherwise the commit hash. This cancels
# queued and in-progress runs for the same PR (presubmit) or commit
# (postsubmit).
group: ci-build-test-multi-cpp-linux-${{ github.event.number || github.sha }}-${{ github.event_name }}
cancel-in-progress: true
jobs:
build-repo:
name: ${{ matrix.OS }} ${{ matrix.COMPILER }} assert=${{ matrix.ENABLE_ASSERTIONS }} rtti=${{ matrix.ENABLE_RTTI }}
runs-on: ${{ matrix.OS }}
strategy:
# Run all the test even if there are some which fail
fail-fast: false
# Run the tests on the Cartesian product of the following
matrix:
OS: [ ubuntu-22.04, ubuntu-24.04 ]
COMPILER: [ llvm, gcc ]
ENABLE_ASSERTIONS: [ ON, OFF ]
ENABLE_RTTI: [ ON, OFF ]
include:
- OS: ubuntu-20.04
COMPILER: gcc-11
ENABLE_ASSERTIONS: ON
ENABLE_RTTI: OFF
- OS: ubuntu-20.04
COMPILER: gcc-11
ENABLE_ASSERTIONS: OFF
ENABLE_RTTI: OFF
- OS: ubuntu-20.04
COMPILER: gcc-11
ENABLE_ASSERTIONS: ON
ENABLE_RTTI: ON
- OS: ubuntu-20.04
COMPILER: gcc-11
ENABLE_ASSERTIONS: OFF
ENABLE_RTTI: ON
- OS: windows-2019
COMPILER: msvc
ENABLE_ASSERTIONS: ON
ENABLE_RTTI: ON
- OS: windows-2019
COMPILER: msvc
ENABLE_ASSERTIONS: ON
ENABLE_RTTI: OFF
- OS: windows-2019
COMPILER: msvc
ENABLE_ASSERTIONS: OFF
ENABLE_RTTI: ON
- OS: windows-2019
COMPILER: msvc
ENABLE_ASSERTIONS: OFF
ENABLE_RTTI: OFF
steps:
# Clone the repo and its submodules. Do shallow clone to save clone
# time.
- name: Get the project repository
uses: actions/checkout@v4
with:
fetch-depth: 2
submodules: "true"
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install Python packages
run: |
pip install -r python/requirements.txt
HOST_MLIR_PYTHON_PACKAGE_PREFIX=aie pip install -r python/requirements_extras.txt
- name: Setup Cpp
uses: aminya/setup-cpp@v1
with:
compiler: ${{ matrix.COMPILER }}
vcvarsall: ${{ contains(matrix.OS, 'windows') }}
cmake: true
ninja: true
cppcheck: false
clangtidy: false
clangformat: false
- uses: ./.github/actions/setup_ccache
id: setup_ccache
with:
MATRIX_OS: ${{ matrix.OS }}
MATRIX_ARCH: x86
EXTRA_KEY: compile-and-test-assert=${{ matrix.ENABLE_ASSERTIONS }}-rtti=${{ matrix.ENABLE_RTTI }}
- name: Get MLIR
id: mlir-wheels
run: |
VERSION=$(utils/clone-llvm.sh --get-wheel-version)
if [ x"${{ matrix.ENABLE_RTTI }}" == x"OFF"]; then
WHEEL=mlir_no_rtti
else
WHEEL=mlir
fi
pip -q download $WHEEL==$VERSION \
-f https://github.com/Xilinx/mlir-aie/releases/expanded_assets/mlir-distro
unzip -q mlir-*.whl
# Build the repo test target in release mode to build and test.
- name: Build and test
run: |
mkdir build_release
cd build_release
if [ x"${{ contains(matrix.OS, 'windows') }}" == x"true" ]; then
LLVM_EXTERNAL_LIT="$(where lit)"
else
LLVM_EXTERNAL_LIT="$(which lit)"
fi
cmake .. \
-G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_PLATFORM_NO_VERSIONED_SONAME=ON \
-DCMAKE_VISIBILITY_INLINES_HIDDEN=ON \
-DCMAKE_C_VISIBILITY_PRESET=hidden \
-DCMAKE_CXX_VISIBILITY_PRESET=hidden \
-DAIE_COMPILER=NONE \
-DAIE_LINKER=NONE \
-DAIE_ENABLE_PYTHON_PASSES=OFF \
-DHOST_COMPILER=NONE \
-DLLVM_ENABLE_ASSERTIONS=${{ matrix.ENABLE_ASSERTIONS }} \
-DLLVM_ENABLE_RTTI=${{ matrix.ENABLE_RTTI }} \
-DCMAKE_MODULE_PATH=$PWD/../cmake/modulesXilinx \
-DMLIR_DIR=$PWD/../mlir/lib/cmake/mlir \
-DLLVM_DIR=$PWD/../mlir/lib/cmake/llvm \
-DLLVM_EXTERNAL_LIT="$LLVM_EXTERNAL_LIT"
ninja
# tests hang/fail on windows
if [ x"${{ contains(matrix.OS, 'windows') }}" == x"false" ]; then
ninja check-aie
ninja check-tutorials
ninja check-reference-designs
ninja check-programming-guide
fi