Update upstream LLVM #85
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
# This is a basic workflow to help you get started with Actions | |
name: build | |
# Controls when the action will run. Triggers the workflow on push or pull request | |
# events but only for the master branch | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "build" | |
build: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: seanmiddleditch/gha-setup-ninja@master | |
- name: Install prerequisites | |
run: | | |
sudo apt update | |
sudo apt install -y uuid-dev | |
- name: Cache LLVM artifact | |
id: cache-llvm | |
uses: actions/cache@v2 | |
with: | |
path: | | |
./thirdparty/llvm-project | |
key: ${{ runner.os }}-norm-${{ hashFiles('thirdparty/llvm-project/llvm/CMakeLists.txt') }} | |
- name: Build LLVM | |
if: steps.cache-llvm.outputs.cache-hit != 'true' | |
run: | | |
git submodule update --init --recursive | |
cd thirdparty/llvm-project | |
mkdir build && cd build | |
cmake -G Ninja ../llvm -DLLVM_ENABLE_PROJECTS=mlir -DLLVM_BUILD_EXAMPLES=ON -DLLVM_ENABLE_ASSERTIONS=ON -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_RTTI=ON -DLLVM_TARGETS_TO_BUILD="host" | |
cmake --build . --target check-mlir | |
- name: Build mlir-hello | |
run: | | |
mkdir build && cd build | |
cmake -DLLVM_DIR=$PWD/../thirdparty/llvm-project/build/lib/cmake/llvm -DMLIR_DIR=$PWD/../thirdparty/llvm-project/build/lib/cmake/mlir .. | |
cmake --build . --target all | |
- name: Test mlir-hello | |
run: | | |
cd build | |
cmake -DLLVM_DIR=$PWD/../thirdparty/llvm-project/build/lib/cmake/llvm -DMLIR_DIR=$PWD/../thirdparty/llvm-project/build/lib/cmake/mlir .. | |
cmake --build . --target check-hello |