Skip to content

Commit

Permalink
Merge pull request #54 from usethesource/packages-and-devcontainers
Browse files Browse the repository at this point in the history
Packages-and-devcontainers
  • Loading branch information
jurgenvinju authored Jun 17, 2024
2 parents 1f722b9 + f34f074 commit f95e9a5
Show file tree
Hide file tree
Showing 11 changed files with 1,650 additions and 1,598 deletions.
41 changes: 41 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/java
{
"name": "Rascal-website",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/java:1-17-bookworm",

"features": {
"ghcr.io/devcontainers/features/java:1.5": {
"version": "17",
"installMaven": "true",
"installGradle": "false"
},
"ghcr.io/devcontainers/features/node:1.4": {
"version": "20"
}
},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "java -version",

// Configure tool-specific properties.
// "customizations": {},
// Configure tool-specific properties.
"customizations": {
// Configure properties specific to VS Code.
"vscode": {
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"vscjava.vscode-java-pack",
"UseTheSource.rascalmpl"
]
}
}

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
24 changes: 24 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for more information:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
# https://containers.dev/guide/dependabot

version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: weekly
- package-ecosystem: "devcontainers"
directory: "/"
schedule:
interval: weekly
- package-ecosystem: "yarn"
directory: "/"
schedule:
interval: weekly
- package-ecosystem: "maven"
directory: "/"
schedule:
interval: weekly
23 changes: 14 additions & 9 deletions .github/workflows/base-jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,36 +11,41 @@ jobs:
- name: Clone
uses: actions/checkout@v4

- uses: actions/setup-java@v3
- uses: buildjet/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
cache: 'maven'

- uses: actions/setup-node@v3
- uses: buildjet/setup-node@v4
with:
node-version: 16
node-version: 20
cache: yarn

- uses: browser-actions/setup-chrome@latest
with:
chrome-version: 'stable'
id: setup-chrome

- run: which chrome

- uses: nanasess/setup-chromedriver@v2
with:
chromedriver-version: ${{ steps.setup-chrome.outputs.chrome-version }}

- run: which chromedriver

# Copy docs from dependent projects, run tutor on local courses folder and copy results into docs and static/assets
- name: Run rascal-tutor and reuse libraries
run: MAVEN_OPTIONS="-Xss256m -Xmx3G" mvn -B clean package -Dwebdriver.chrome.driver=/usr/local/bin/chromedriver -Dwebdriver.chrome.browser=`which chrome`

# Big speedup over uploading seperate files
- name: Tar files
run: tar --exclude='target' --exclude='.git' --exclude='.github' --exclude='.vscode' --exclude='META-INF' -cvf sources.tar .

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: sources
path: sources.tar
path: |
.
!target
!.git
!.github
!.vscode
!META-INF
6 changes: 2 additions & 4 deletions .github/workflows/pr-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,13 @@ jobs:
steps:
# Download prepared sources from base
- name: Download sources
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: sources

- name: Untar files
run: tar -xvf sources.tar

# Do a dummy build to see if there are errors
- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Build website
run: yarn build
5 changes: 1 addition & 4 deletions .github/workflows/website-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,9 @@ jobs:
steps:
# Download prepared sources from base
- name: Download sources
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: sources

- name: Untar files
run: tar -xvf sources.tar

# Production deploy
- name: Netlify Deploy
Expand Down
2 changes: 1 addition & 1 deletion blog/authors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ tvdstorm:
name: Tijs van der Storm
title: Group Leader @ CWI-SWAT, professor @ RUG, Rascal Core Team
url: https://homepages.cwi.nl/~storm/
image_url: https://www.uva.nl/binaries/_ht_1610011694919/extralarge/content/gallery/personen/s/t/tijs-van-der-storm_low_res.jpg
image_url: https://www.cwi.nl/intranet/faces/1812.jpg

dlandman:
name: Davy Landman
Expand Down
3 changes: 1 addition & 2 deletions courses/Packages/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
title: Package Directory
sidebar_position: 10
---


8 changes: 6 additions & 2 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,12 @@ const config = {
// {to: '/stories', label: 'Stories', position: 'left'},
{ to: '/blog', label: 'Blog', position: 'left' },
{ to: '/release-notes', label: 'Release notes', position: 'left' },
{ to: 'http://www.rascal-mpl.org/docs/Packages', label: 'Packages', position: 'left' },

{
type: 'doc',
docId: 'Packages/index',
position: 'left',
label: 'Packages',
},
{ to: '/projects', label: 'Projects', position: 'right' },
{ to: '/team', label: 'Team', position: 'right' },
{
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
"version": "0.0.0",
"private": true,
"scripts": {
"dev": "mvn package && yarn start",
"prod": "yarn clear && mvn clean package -B && yarn build",
"mvn": "mvn package",
"docusaurus": "docusaurus",
"start": "docusaurus start",
Expand Down
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@
<src>${project.basedir}/courses/GettingStarted</src>
<src>${project.basedir}/courses/Rascalopedia</src>
<src>${project.basedir}/courses/Bibliography</src>
<src>${project.basedir}/courses/Packages</src>
</srcs>
<ignores>
<ignore>|lib://rascal/org/rascalmpl/library/lang/rascal|</ignore>
Expand Down
Loading

0 comments on commit f95e9a5

Please sign in to comment.