Skip to content

Commit

Permalink
Merge pull request #1 from maxkratz/feature/gips-adaptions
Browse files Browse the repository at this point in the history
WIP: Adapts README, config + CI to GIPS
  • Loading branch information
maxkratz authored Nov 4, 2022
2 parents c7a9743 + 686e8b8 commit e4ebe44
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 30 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/vagrant-up.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ jobs:
- name: export virtualbox VM
run: |
vagrant halt
vboxmanage export emoflon -o emoflon.ova
vboxmanage export gips -o gips.ova
- name: upload artifact
uses: actions/upload-artifact@v2
with:
name: emoflon-ova
path: emoflon.ova
name: gips-ova
path: gips.ova

# Create a release if running on tag
create-release:
Expand All @@ -38,21 +38,21 @@ jobs:
- name: create splitted ZIP archive
run: |
sudo apt-get install -yq zip
zip -r -s 1990m emoflon-vm.zip emoflon-ova/emoflon.ova
zip -r -s 1990m gips-vm.zip gips-ova/gips.ova
# Due to a bug in the release action, we have to upload all artifacts step-by-step
# https://github.com/softprops/action-gh-release/issues/243
- name: release emoflon-vm (1)
- name: release gips-vm (1)
uses: softprops/action-gh-release@v1
with:
body: "The VM archive can not be directly added to this release because of the size limitation of 2GB per file. Please download the splitted ZIP archive and extract it manually."
files: emoflon-vm.zip
- name: release emoflon-vm (2)
files: gips-vm.zip
- name: release gips-vm (2)
uses: softprops/action-gh-release@v1
with:
body: "The VM archive can not be directly added to this release because of the size limitation of 2GB per file. Please download the splitted ZIP archive and extract it manually."
files: emoflon-vm.z01
- name: release emoflon-vm (3)
files: gips-vm.z01
- name: release gips-vm (3)
uses: softprops/action-gh-release@v1
with:
body: "The VM archive can not be directly added to this release because of the size limitation of 2GB per file. Please download the splitted ZIP archive and extract it manually."
files: emoflon-vm.z02
files: gips-vm.z02
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
# emoflon-vm
# GIPS-VM

[![Build eMoflon VM](https://github.com/eMoflon/emoflon-vm/actions/workflows/vagrant-up.yml/badge.svg?branch=main&event=push)](https://github.com/eMoflon/emoflon-vm/actions/workflows/vagrant-up.yml)
[![Build GIPS VM](https://github.com/maxkratz/gips-vm/actions/workflows/vagrant-up.yml/badge.svg?branch=main&event=push)](https://github.com/maxkratz/gips-vm/actions/workflows/vagrant-up.yml)

This repository is used to automatically build an [eMoflon](https://emoflon.org) virtual machine (VM).
This repository is used to automatically build a [GIPS](https://github.com/Echtzeitsysteme/gips) virtual machine (VM).


## Packages/Configuration

- [Ubuntu 20.04](https://app.vagrantup.com/gusztavvargadr/boxes/ubuntu-desktop)
- [OpenJDK 17](https://openjdk.org/projects/jdk/17/)
- [Graphviz](https://graphviz.org/)
- [eMoflon Eclipse build](https://github.com/eMoflon/emoflon-eclipse-build) (variant: *eclipse-emoflon-linux-user*)
- [GIPS Eclipse build](https://github.com/maxkratz/gips-eclipse-build) (variant: *eclipse-gips-linux-user*)


## Usage/Installation

- Download the latest version from the [release page](https://github.com/eMoflon/emoflon-vm/releases/latest).
- Download the latest version from the [release page](https://github.com/maxkratz/gips-vm/releases/latest).
- Install [VirtualBox](https://www.virtualbox.org/) (or another Hypervisor compatible to `OVA` files).
- Import the `OVA` file as new VM in VirtualBox. (More detailed description can be found [here](https://docs.oracle.com/cd/E26217_01/E26796/html/qs-import-vm.html).)
- Use the credentials `vagrant:vagrant` to login.
- Use the Eclipse icon on the desktop to start [eMoflon](https://emoflon.org).
- Use the Eclipse icon on the desktop to start [GIPS](https://github.com/Echtzeitsysteme/gips).


## Runner requirements
Expand All @@ -30,7 +30,7 @@ There are two ways to provide this project with runners.

Unfortunately, only the macOS-based GitHub-hosted action runners do support nested virtualization: https://github.com/actions/runner-images/issues/433

Therefore, we've adapted the CI-configuration to provision the **eMoflon-VM** on a macOS-based runner until nested virtualization support gets added to the Linux-based runners.
Therefore, we've adapted the CI-configuration to provision the **GIPS-VM** on a macOS-based runner until nested virtualization support gets added to the Linux-based runners.

### Self-hosted Linux-based runners

Expand Down
2 changes: 1 addition & 1 deletion Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Vagrant.configure("2") do |config|
config.vm.box = "gusztavvargadr/ubuntu-desktop"
config.vm.define 'ubuntu'
config.vm.provider :virtualbox do |vb|
vb.name = "emoflon"
vb.name = "gips"
end
config.vm.provision "shell", path: "prov.sh", privileged: false

Expand Down
24 changes: 12 additions & 12 deletions prov.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Config
#

ECLIPSE_ARCHIVE=eclipse-emoflon-linux-user
ECLIPSE_ARCHIVE=eclipse-gips-linux-user

set -e
START_PWD=$PWD
Expand Down Expand Up @@ -34,16 +34,16 @@ log "Installing OpenJDK."
sudo apt-get install -y openjdk-17-jdk
#java --version

# eMoflon Eclipse
log "Installing eMoflon Eclipse."
# GIPS Eclipse
log "Installing GIPS Eclipse."
sudo apt-get install -y graphviz
mkdir -p ~/eclipse-apps
cd ~/eclipse-apps

# Get eclipse
if [[ ! -f "./$ECLIPSE_ARCHIVE.zip" ]]; then
log "Downloading latest eMoflon Eclipse archive from Github."
curl -s https://api.github.com/repos/eMoflon/emoflon-eclipse-build/releases/latest \
log "Downloading latest GIPS Eclipse archive from Github."
curl -s https://api.github.com/repos/Echtzeitsysteme/gips-eclipse-build/releases/latest \
| grep "$ECLIPSE_ARCHIVE.zip" \
| cut -d : -f 2,3 \
| tr -d \" \
Expand All @@ -52,7 +52,7 @@ if [[ ! -f "./$ECLIPSE_ARCHIVE.zip" ]]; then
fi

if [[ ! -f "./$ECLIPSE_ARCHIVE.zip" ]]; then
log "Download of eMoflon Eclipse archive failed."
log "Download of GIPS Eclipse archive failed."
exit 1;
fi

Expand All @@ -61,21 +61,21 @@ rm -f $ECLIPSE_ARCHIVE.zip

# Create desktop launcher
mkdir -p /home/vagrant/Desktop
touch /home/vagrant/Desktop/emoflon.desktop
touch /home/vagrant/Desktop/gips.desktop
printf "
[Desktop Entry]\n
Version=1.0\n
Name=eMoflon Eclipse\n
Comment=Use eMoflon Eclipse\n
GenericName=eMoflon Eclipse\n
Name=GIPS Eclipse\n
Comment=Use GIPS Eclipse\n
GenericName=GIPS Eclipse\n
Exec=bash -c \"cd /home/vagrant/eclipse-apps/eclipse && ./eclipse\"\n
Terminal=false\n
X-MultipleArgs=false\n
Type=Application\n
Icon=/home/vagrant/eclipse-apps/eclipse/icon.xpm\n
StartupNotify=true\n
" > /home/vagrant/Desktop/emoflon.desktop
chmod u+x /home/vagrant/Desktop/emoflon.desktop
" > /home/vagrant/Desktop/gips.desktop
chmod u+x /home/vagrant/Desktop/gips.desktop

log "Clean-up"
sudo apt-get remove -yq \
Expand Down

0 comments on commit e4ebe44

Please sign in to comment.