Add polymer2 #1705
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Polygeist build and test | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
build: | |
name: Build ${{ matrix.build }} ${{ matrix.os }} ${{ matrix.compiler }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
build: ["Release"] #, "Debug"] # "RelWithDebInfo" | |
os: [ubuntu-latest] | |
compiler: [gcc, clang] | |
cxxcompiler: [g++, clang++] | |
exclude: | |
- compiler: gcc | |
cxxcompiler: clang++ | |
- compiler: clang | |
cxxcompiler: g++ | |
timeout-minutes: 360 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 1 | |
path: src | |
submodules: 'recursive' | |
- name: Read LLVM commit | |
id: getversion | |
run: echo "::set-output name=version::$(cat src/.git/modules/llvm-project/HEAD)" | |
- name: Cache Pluto | |
id: cache-pluto | |
uses: actions/cache@v3 | |
with: | |
path: pluto-build | |
key: ${{ matrix.build }}-${{ matrix.os }}-pluto-${{ steps.getversion.outputs.version }} | |
- name: Cache MLIR | |
id: cache-mlir | |
uses: actions/cache@v3 | |
with: | |
path: mlir-build | |
key: ${{ matrix.build }}-${{ matrix.os }}-mlir-${{ steps.getversion.outputs.version }} | |
- name: add dependencies | |
run: sudo apt-get install -y llvm-15-tools ninja-build libbison-dev libtool libgmp-dev #libflex-dev cmake binutils-gold binutils binutils-dev ${{ matrix.compiler }} ${{ matrix.linker-pkg }} | |
- name: Pluto build | |
if: steps.cache-pluto.outputs.cache-hit != 'true' | |
run: | | |
mkdir pluto-build | |
PATH="/usr/lib/llvm-15/bin/:$PATH" src/tools/polymer/build_polymer_deps.sh $(pwd)/pluto-build | |
sleep 1s | |
- name: MLIR build | |
if: steps.cache-mlir.outputs.cache-hit != 'true' | |
run: | | |
mkdir mlir-build | |
cd mlir-build | |
CYMBL=OFF cmake ../src/llvm-project/llvm -GNinja -DLLVM_ENABLE_PROJECTS="llvm;clang;mlir;openmp" -DCMAKE_BUILD_TYPE=${{ matrix.build }} -DCMAKE_C_COMPILER=/bin/clang -DCMAKE_CXX_COMPILER=/bin/clang++ -DCMAKE_ASM_COMPILER=/bin/clang -DCMAKE_CXX_FLAGS="-Wno-c++11-narrowing" | |
#cymbld & disown | |
sleep 10 | |
CYMBL=OFF ninja | |
- name: mkdir | |
run: mkdir build | |
- name: cmake | |
run: | | |
cd build | |
ls ../mlir-build/lib/cmake/clang | |
cmake ../src/ -GNinja -DMLIR_DIR=`pwd`/../mlir-build/lib/cmake/mlir -DLLVM_EXTERNAL_LIT=`pwd`/../mlir-build/bin/llvm-lit -DClang_DIR=`pwd`/../mlir-build/lib/cmake/clang -DCMAKE_BUILD_TYPE=${{ matrix.build }} -DCMAKE_C_COMPILER=${{matrix.compiler}} -DCMAKE_CXX_COMPILER=${{matrix.cxxcompiler}} -DPOLYGEIST_ENABLE_POLYMER=1 -DPOLYGEIST_PLUTO_DIR=$(pwd)/../pluto-build/ | |
- name: test cgeist | |
run: | | |
cd build | |
ninja | |
ninja check-polygeist-opt | |
ninja check-cgeist |