Skip to content

Commit

Permalink
Merge pull request #35 from meshtag/main
Browse files Browse the repository at this point in the history
Syncing testing branch with main
  • Loading branch information
amanchhaparia authored Jul 19, 2023
2 parents f70e427 + 0171a04 commit 6377cf4
Show file tree
Hide file tree
Showing 5 changed files with 108 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior.

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. Ubuntu]
- Version [e.g. 20.04]

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context about the feature request here.
8 changes: 8 additions & 0 deletions .github/scripts/build-llvm.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
cd llvm && mkdir build && cd build
cmake -G Ninja ../llvm \
-DLLVM_ENABLE_PROJECTS="mlir" \
-DLLVM_TARGETS_TO_BUILD="host;X86" \
-DLLVM_ENABLE_ASSERTIONS=ON \
-DCMAKE_BUILD_TYPE=RELEASE
ninja
ninja check-mlir
9 changes: 9 additions & 0 deletions .github/scripts/build-project.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
mkdir build && cd build
cmake -G Ninja .. \
-DMLIR_DIR=$PWD/../llvm/build/lib/cmake/mlir \
-DLLVM_DIR=$PWD/../llvm/build/lib/cmake/llvm \
-DLLVM_ENABLE_ASSERTIONS=ON \
-DCMAKE_BUILD_TYPE=RELEASE \
-DGraphMLIR_EXAMPLES=ON
ninja bfsExample
cd bin && ./bfsExample
44 changes: 44 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Build GraphMLIR

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout GraphMLIR GitHub repository
uses: actions/checkout@v3
with:
submodules: true

# in order to use commit hash as cache key
- name: Get LLVM submodule commit hash
run: |
LLVM_COMMIT_HASH=$(git rev-parse HEAD:llvm)
echo "LLVM_COMMIT_HASH=$LLVM_COMMIT_HASH" >> $GITHUB_ENV
- name: Build CMake and Ninja
run: |
sudo apt-get update
sudo apt-get install -y cmake ninja-build
# outputs cache-hit boolean
- name: Cache LLVM
uses: actions/cache@v3
id: restore-cache
with:
key: "llvm-${{ env.LLVM_COMMIT_HASH }}"
path: ${{ github.workspace }}/llvm/
# for partial match; output is false
restore-keys: llvm-

# conditional step, depends on output of Cache LLVM
- name: Build LLVM
if: steps.restore-cache.outputs.cache-hit != 'true'
run: ./.github/scripts/build-llvm.sh
shell: bash

- name: Build project
run: ./.github/scripts/build-project.sh
shell: bash

0 comments on commit 6377cf4

Please sign in to comment.