From 4286a7133693b2b345f28c8be66b9c7ef4dc7699 Mon Sep 17 00:00:00 2001
From: Hannes Vogt <hannes@havogt.de>
Date: Thu, 2 Apr 2020 12:54:35 +0200
Subject: [PATCH] Add Gitpod setup (#996)

A support for Gitpod.io, a free automated
dev environment that makes contributing and generally working on GitHub
projects much easier. It allows anyone to start a ready-to-code dev
environment for any branch, issue and pull request with a single click.
---
 .gitignore           |  4 ++++
 .gitpod.yml          | 37 +++++++++++++++++++++++++++++++++++++
 .theia/settings.json |  5 +++++
 README.md            |  2 ++
 4 files changed, 48 insertions(+)
 create mode 100644 .gitpod.yml
 create mode 100644 .theia/settings.json

diff --git a/.gitignore b/.gitignore
index 4d413c42..85e6672e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -48,6 +48,10 @@
 CMakeFiles
 CMakeCache.txt
 cmake_install.cmake
+/compile_commands.json
+
+# install path used in gitpod
+/install
 
 # mechanisms generated from .mod files
 mechanisms/multicore/*.hpp
diff --git a/.gitpod.yml b/.gitpod.yml
new file mode 100644
index 00000000..19571c51
--- /dev/null
+++ b/.gitpod.yml
@@ -0,0 +1,37 @@
+vscode:
+  extensions:
+    - twxs.cmake@0.0.17:9s7m9CWOr6i6NZ7CNNF4kw==
+    - ms-vscode.cmake-tools@1.3.1:Yde58UUl5J9XpLmXM+Bqiw==
+    - ms-vscode.cpptools@0.26.2:Pq/tmf2WN3SanVzB4xZc1g==
+    - eamodio.gitlens@10.2.1:ZI2Sl3DHdJu4aG2wW92CQQ==
+
+tasks:
+  - init: |
+      git submodule update --init --recursive
+      mkdir build
+      cmake -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -H/workspace/arbor -B/workspace/arbor/build \
+      -DCMAKE_INSTALL_PREFIX:STRING=/workspace/arbor/install -DCMAKE_BUILD_TYPE:STRING=Debug -G "Unix Makefiles" \
+      -DARB_WITH_PYTHON:BOOL=ON
+      ln -s /workspace/arbor/build/compile_commands.json /workspace/arbor
+      export PYTHONPATH=/workspace/arbor/install/lib/python3.7/site-packages
+    prebuild: |
+      cmake --build /workspace/arbor/build/ --parallel $(nproc) --target install
+
+github:
+  prebuilds:
+    # enable for the master/default branch (defaults to true)
+    master: true
+    # enable for all branches in this repo (defaults to false)
+    branches: false
+    # enable for pull requests coming from this repo (defaults to true)
+    pullRequests: true
+    # enable for pull requests coming from forks (defaults to false)
+    pullRequestsFromForks: true
+    # add a check to pull requests (defaults to true)
+    addCheck: true
+    # add a "Review in Gitpod" button as a comment to pull requests (defaults to false)
+    addComment: false
+    # add a "Review in Gitpod" button to the pull request's description (defaults to false)
+    addBadge: false
+    # add a label once the prebuild is ready to pull requests (defaults to false)
+    addLabel: false
diff --git a/.theia/settings.json b/.theia/settings.json
new file mode 100644
index 00000000..62f7bc24
--- /dev/null
+++ b/.theia/settings.json
@@ -0,0 +1,5 @@
+{
+    "cpp.clangTidy": true,
+    "cmake.configureOnOpen": true,
+    "C_Cpp.intelliSenseEngine": "Disabled"
+}
\ No newline at end of file
diff --git a/README.md b/README.md
index 0ce4fc7d..58c79241 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,5 @@
+[![Gitpod Ready-to-Code](https://img.shields.io/badge/Gitpod-Ready--to--Code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/arbor-sim/arbor) 
+
 # Arbor Library
 
 [![Build Status](https://travis-ci.org/arbor-sim/arbor.svg?branch=master)](https://travis-ci.org/arbor-sim/arbor)
-- 
GitLab