Skip to content

Enable color threshold and passthrough reference design tests in hw (… #5

Enable color threshold and passthrough reference design tests in hw (…

Enable color threshold and passthrough reference design tests in hw (… #5

Workflow file for this run

name: Generate GitHub Pages
on:
push:
branches:
- main
# pull_request:
# types: [assigned, opened, synchronize, reopened]
workflow_dispatch:
jobs:
build-docs:
name: Generate Documentation
runs-on: ubuntu-latest
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
contents: write
steps:
- name: Configure Environment
run: echo "$GITHUB_WORKSPACE/llvm/install/bin" >> $GITHUB_PATH
# Clone the repo and its submodules. Do shallow clone to save clone
# time.
- name: Get the project repository
uses: actions/checkout@v3
with:
fetch-depth: 2
submodules: "true"
- name: Install packages
run: sudo apt-get install -y graphviz lld
- name: Install Python packages
run: sudo pip install psutil rich numpy pybind11
- name: Install Ninja
# https://github.com/llvm/actions/tree/main/install-ninja
uses: llvm/actions/install-ninja@6a57890d0e3f9f35dfc72e7e48bc5e1e527cdd6c
- name: Get Submodule Hash
id: get-submodule-hash
run: echo "hash=$(md5sum $(echo utils/clone-llvm.sh))" >> $GITHUB_OUTPUT
shell: bash
- name: Ccache for C++ compilation
# https://github.com/hendrikmuhs/ccache-action/releases/tag/v1.2.9
uses: hendrikmuhs/ccache-action@ca3acd2731eef11f1572ccb126356c2f9298d35e
with:
key: ${{ runner.os }}-releaseasserts-${{ steps.get-submodule-hash.outputs.hash }}
max-size: 1G
- name: Get cmakeModules
id: clone-cmakeModules
run: git clone --depth 1 https://github.com/Xilinx/cmakeModules.git
shell: bash
- name: Get MLIR
id: mlir-wheels
run: |
pip install lit pkginfo
pip -q download mlir -f https://github.com/Xilinx/mlir-aie/releases/expanded_assets/mlir-distro && unzip -q mlir-*.whl
WHL=$(ls mlir-*.whl)
echo "MLIR_WHEEL_VERSION=$(python -c "import pkginfo; w = pkginfo.Wheel('$WHL'); print(w.version.split('+')[0] + '+' + w.version.split('+')[1].rsplit('.', 1)[-1])")" | tee -a $GITHUB_OUTPUT
echo "MLIR_DIR=$PWD/mlir" | tee -a $GITHUB_OUTPUT
# Build the repo test target in release mode to build and test.
- name: Build Docs
run: |
mkdir build_release
pushd build_release
cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_ENABLE_ASSERTIONS=OFF \
-DCMAKE_MODULE_PATH=`pwd`/../cmake/modulesXilinx \
-DMLIR_DIR=${{ steps.mlir-wheels.outputs.MLIR_DIR }}/lib/cmake/mlir \
-DLLVM_DIR=${{ steps.mlir-wheels.outputs.MLIR_DIR }}/lib/cmake/llvm \
-DLLVM_USE_LINKER=lld \
-DAIE_INCLUDE_DOCS=ON \
-DLLVM_EXTERNAL_LIT=$(which lit)
make docs
popd
cp -r docs/* build_release/docs
dot -Tpng docs/dialects.dot > build_release/docs/dialects.png
dot -Tsvg docs/dialects.dot > build_release/docs/dialects.svg
- name: Save MLIR Version
run: |
echo "{" > build_release/docs/build_info.json
echo "llvm-version: \"${{ steps.mlir-wheels.outputs.MLIR_WHEEL_VERSION }}\"," >> build_release/docs/build_info.json
echo "}" > build_release/docs/build_info.json
- name: Publish to GitHub-Pages
if: github.event_name != 'pull_request'
# https://github.com/peaceiris/actions-gh-pages/releases/tag/v3.9.3
uses: peaceiris/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build_release/docs
enable_jekyll: true