Skip to content

Commit

Permalink
Merge with master
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasSiefke committed Mar 3, 2021
2 parents 3117aab + 923aa84 commit 31da35d
Show file tree
Hide file tree
Showing 171 changed files with 14,837 additions and 2,172 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Scala CI

on:
workflow_dispatch:
pull_request:

jobs:
compile-and-test:

runs-on: ubuntu-latest

container: michelsteuwer/docker-scala-opencl:latest

steps:
- uses: actions/checkout@v2
- name: Checkout submodules
run: git submodule update --init --recursive
- name: Compile
run: sbt compile
- name: Run tests
run: sbt test
83 changes: 83 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: Build and deploy documentation

on:
push:
branches: [ master ]
workflow_dispatch:
pull_request:

jobs:
check-documentation:
if: github.event_name != 'push'
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Checkout submodules
run: git submodule update --init --recursive
- name: Check documentation
uses: docker://michelsteuwer/docker-scala-opencl:latest
with:
entrypoint: sbt
args: docs/mdoc
- uses: actions/setup-node@v2
with:
node-version: '12'
- name: Build Documentation
working-directory: docs-website
run: |
if [ -e yarn.lock ]; then
yarn install --frozen-lockfile
elif [ -e package-lock.json ]; then
npm ci
else
npm i
fi
npm run build
deploy-documentation:
if: github.event_name != 'pull_request'
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Checkout submodules
run: git submodule update --init --recursive
- name: Check documentation
uses: docker://michelsteuwer/docker-scala-opencl:latest
with:
entrypoint: sbt
args: docs/mdoc
- uses: actions/setup-node@v2
with:
node-version: '12'
- name: Add key to allow access to repository
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
run: |
mkdir -p ~/.ssh
ssh-keyscan github.com >> ~/.ssh/known_hosts
echo "${{ secrets.GH_PAGES_DEPLOY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
cat <<EOT >> ~/.ssh/config
Host github.com
HostName github.com
IdentityFile ~/.ssh/id_rsa
EOT
- name: Release to Documentation to GitHub Pages
working-directory: docs-website
env:
USE_SSH: true
GIT_USER: git
DEPLOYMENT_BRANCH: gh-pages
run: |
git config --global user.email "[email protected]"
git config --global user.name "gh-actions"
if [ -e yarn.lock ]; then
yarn install --frozen-lockfile
elif [ -e package-lock.json ]; then
npm ci
else
npm i
fi
yarn deploy
19 changes: 0 additions & 19 deletions .github/workflows/scala.yml

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ modules.xml
.vscode
.metals
.bloop
.bsp

*.aux
*.bbl
Expand Down
12 changes: 2 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,5 @@ The source code for the compiler is organised into sub-packages of the `shine` p
This package also defines extensions in form of additional patterns
added to the RISE language and `DPIA`.

### Setup
Prerequisits: Java 8+ SDK, `git`
1. Clone the `shine` repository to a directory of your choice that we call `$SHINE_ROOT`.
2. In `$SHINE_ROOT`, run `setup.sh` to download all required submodules.
3. Then run `sbt compile` (even if you want to use IDEA IntelliJ, because IntelliJ does not execute subproject dependencies correctly and the Executor needs to be built once in the beginning).

#### Configuring IntelliJ
4. Download IDEA IntelliJ (http://www.jetbrains.com/idea/) and choose to install the Scala Plugin during setup.
5. Launch IntelliJ. From the menu choose `File` -> `Open...`. Then, select `$SHINE_ROOT` and press `OK`.
6. From the menu bar choose `Run` -> `Edit Configurations...`. Under `Templates` choose `ScalaTest` and add the following line to `VM parameters`: `-Djava.library.path=lib/executor/lib/Executor/build -Xss26m` (this will tell IntelliJ where to find the Executor library and use 26MB of thread stack size which is needed for arithmetic simplifactions sometimes).
### Setup and Documentation
Please have a look at: https://rise-lang.org/doc/
8 changes: 8 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,11 @@ lazy val executor = (project in file("lib/executor"))
lazy val CUexecutor = (project in file("lib/yacx"))

lazy val elevate = (project in file("lib/elevate"))

lazy val docs = (project in file("riseAndShine-docs"))
.settings(
moduleName := "riseAndShine-docs",
mdocOut := file("docs-website/docs"),
)
.enablePlugins(MdocPlugin)
.dependsOn(riseAndShine)
22 changes: 22 additions & 0 deletions docs-website/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Dependencies
/node_modules

# Production
/build

# Generated files
.docusaurus
.cache-loader
docs/*.md
docs/**/*.md

# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
33 changes: 33 additions & 0 deletions docs-website/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Website

This website is built using [Docusaurus 2](https://v2.docusaurus.io/), a modern static website generator.

## Installation

```console
yarn install
```

## Local Development

```console
yarn start
```

This command starts a local development server and open up a browser window. Most changes are reflected live without having to restart the server.

## Build

```console
yarn build
```

This command generates static content into the `build` directory and can be served using any static contents hosting service.

## Deployment

```console
GIT_USER=<Your GitHub username> USE_SSH=true yarn deploy
```

If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
3 changes: 3 additions & 0 deletions docs-website/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
};
Empty file added docs-website/docs/.gitkeep
Empty file.
53 changes: 53 additions & 0 deletions docs-website/docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
module.exports = {
title: 'RISE Language Documentation',
tagline: 'A functional pattern-based data-parallel language',
url: 'https://rise-lang.org',
baseUrl: '/doc/',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
favicon: 'img/favicon.ico',
organizationName: 'rise-lang', // Usually your GitHub org/user name.
projectName: 'doc', // Usually your repo name.
themeConfig: {
navbar: {
title: 'RISE',
logo: {
alt: 'RISE Logo',
src: 'img/logoDark.svg',
},
style: 'dark',
items: [
{
href: 'https://github.com/rise-lang/shine',
label: 'GitHub',
position: 'right',
},
],
},
prism: {
additionalLanguages: ['scala'],
theme: require('prism-react-renderer/themes/dracula'),
},
footer: {
style: 'dark',
links: [
],
copyright: `Copyright © ${new Date().getFullYear()} The RISE language team.`,
},
},
presets: [
[
'@docusaurus/preset-classic',
{
docs: {
path: 'docs',
routeBasePath: '/',
sidebarPath: require.resolve('./sidebars.js'),
},
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
},
],
],
};
34 changes: 34 additions & 0 deletions docs-website/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"name": "docs-website",
"version": "0.0.0",
"private": true,
"scripts": {
"docusaurus": "docusaurus",
"start": "docusaurus start",
"build": "docusaurus build",
"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy",
"serve": "docusaurus serve",
"clear": "docusaurus clear"
},
"dependencies": {
"@docusaurus/core": "2.0.0-alpha.70",
"@docusaurus/preset-classic": "2.0.0-alpha.70",
"@mdx-js/react": "^1.6.21",
"clsx": "^1.1.1",
"react": "^16.8.4",
"react-dom": "^16.8.4"
},
"browserslist": {
"production": [
">0.5%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
38 changes: 38 additions & 0 deletions docs-website/sidebars.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
module.exports = {
docs: [
{
type: 'category',
label: 'Getting started',
collapsed: false,
items: [
'greeting',
'setup'
],
},
{
type: 'category',
label: 'Tutorials',
collapsed: false,
items: [
'tutorial',
'exploration/tutorial'
],
},
{
type: 'category',
label: 'Technical Documentation',
collapsed: false,
items: [
'exploration/exploration'
// {
// type: 'category',
// label: 'Exploration',
// collapsed: true,
// items: [
// 'exploration/exploration'
// ],
// },
],
}
],
};
26 changes: 26 additions & 0 deletions docs-website/src/css/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/* stylelint-disable docusaurus/copyright-header */
/**
* Any CSS included here will be global. The classic template
* bundles Infima by default. Infima is a CSS framework designed to
* work well for content-centric websites.
*/

/* You can override the default Infima variables here. */
:root {
--ifm-color-primary: #fc7536;
--ifm-color-primary-dark: #fc6018;
--ifm-color-primary-darker: #fb5609;
--ifm-color-primary-darkest: #d34503;
--ifm-color-primary-light: #fc8a54;
--ifm-color-primary-lighter: #fd9463;
--ifm-color-primary-lightest: #fdb390;

--ifm-code-font-size: 95%;
}

.docusaurus-highlight-code-line {
background-color: rgb(72, 77, 91);
display: block;
margin: 0 calc(-1 * var(--ifm-pre-padding));
padding: 0 var(--ifm-pre-padding);
}
Loading

0 comments on commit 31da35d

Please sign in to comment.