Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
build:
name: Build JAR (Linux x64)
name: Build editor + runtime JARs
runs-on: ubuntu-latest

steps:
Expand Down Expand Up @@ -41,6 +41,11 @@ jobs:
cd editor/backend
mvn package -DskipTests -q

- name: Build runtime JAR
run: |
cd runtime
mvn package -DskipTests -q

- name: Upload JAR artifact
uses: actions/upload-artifact@v4
with:
Expand All @@ -49,7 +54,7 @@ jobs:
retention-days: 14

test:
name: Run tests
name: Run editor + runtime tests
runs-on: ubuntu-latest

steps:
Expand All @@ -67,3 +72,8 @@ jobs:
run: |
cd editor/backend
mvn test -q

- name: Run runtime tests
run: |
cd runtime
mvn test -q
110 changes: 80 additions & 30 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ on:
type: string

jobs:
# ── Build native binaries on each platform ──────────────────────────────────
build-native:
name: Native binary — ${{ matrix.name }}
runs-on: ${{ matrix.os }}
Expand All @@ -21,14 +20,29 @@ jobs:
matrix:
include:
- os: ubuntu-latest
name: Linux x64
name: Editor Linux x64
component: editor
project_path: editor/backend
artifact: arvexis-editor-linux-x64
binary: editor/backend/target/arvexis-editor

- os: windows-latest
name: Windows x64
name: Editor Windows x64
component: editor
project_path: editor/backend
artifact: arvexis-editor-windows-x64
binary: editor/backend/target/arvexis-editor.exe
- os: ubuntu-latest
name: Runtime Linux x64
component: runtime
project_path: runtime
artifact: arvexis-runtime-linux-x64
binary: runtime/target/arvexis-runtime
- os: windows-latest
name: Runtime Windows x64
component: runtime
project_path: runtime
artifact: arvexis-runtime-windows-x64
binary: runtime/target/arvexis-runtime.exe

steps:
- name: Checkout
Expand All @@ -42,22 +56,23 @@ jobs:
cache: maven

- name: Set up Node.js 20
if: matrix.component == 'editor'
uses: actions/setup-node@v4
with:
node-version: "20"
cache: npm
cache-dependency-path: editor/frontend/package-lock.json

- name: Build frontend
if: matrix.component == 'editor'
run: |
cd editor/frontend
npm ci
npm run build

- name: Build native binary
run: |
cd editor/backend
mvn -Pnative native:compile -DskipTests -q
working-directory: ${{ matrix.project_path }}
run: mvn -Pnative native:compile -DskipTests -q

- name: Make binary executable (Linux)
if: runner.os == 'Linux'
Expand All @@ -69,10 +84,23 @@ jobs:
name: ${{ matrix.artifact }}
path: ${{ matrix.binary }}

# ── Also build the cross-platform JAR ───────────────────────────────────────
build-jar:
name: JAR (cross-platform)
name: JAR — ${{ matrix.name }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- name: Editor
component: editor
project_path: editor/backend
artifact: arvexis-editor-jar
jar: editor/backend/target/editor-backend-*.jar
- name: Runtime
component: runtime
project_path: runtime
artifact: arvexis-runtime-jar
jar: runtime/target/runtime-*.jar

steps:
- name: Checkout
Expand All @@ -86,27 +114,30 @@ jobs:
cache: maven

- name: Set up Node.js 20
if: matrix.component == 'editor'
uses: actions/setup-node@v4
with:
node-version: "20"
cache: npm
cache-dependency-path: editor/frontend/package-lock.json

- name: Build frontend + JAR
- name: Build frontend
if: matrix.component == 'editor'
run: |
cd editor/frontend
npm ci
npm run build
cd ../backend
mvn package -DskipTests -q

- name: Build JAR
working-directory: ${{ matrix.project_path }}
run: mvn package -DskipTests -q

- name: Upload JAR
uses: actions/upload-artifact@v4
with:
name: arvexis-editor-jar
path: editor/backend/target/editor-backend-*.jar
name: ${{ matrix.artifact }}
path: ${{ matrix.jar }}

# ── Create draft GitHub release with all artifacts ──────────────────────────
release:
name: Create draft release
needs: [build-native, build-jar]
Expand All @@ -131,14 +162,23 @@ jobs:
- name: Prepare release files
run: |
mkdir -p release
# Copy Linux binary
cp artifacts/arvexis-editor-linux-x64/arvexis-editor release/arvexis-editor-linux-x64 || echo "Linux binary not found"

cp artifacts/arvexis-editor-linux-x64/arvexis-editor release/arvexis-editor-linux-x64 || echo "Editor Linux binary not found"
chmod +x release/arvexis-editor-linux-x64 || true
# Copy Windows binary
cp artifacts/arvexis-editor-windows-x64/arvexis-editor.exe release/arvexis-editor-windows-x64.exe || echo "Windows binary not found"
# Copy JAR
JAR=$(find artifacts/arvexis-editor-jar -name "*.jar" | head -1)
cp "$JAR" release/arvexis-editor.jar || echo "JAR not found"

cp artifacts/arvexis-editor-windows-x64/arvexis-editor.exe release/arvexis-editor-windows-x64.exe || echo "Editor Windows binary not found"

cp artifacts/arvexis-runtime-linux-x64/arvexis-runtime release/arvexis-runtime-linux-x64 || echo "Runtime Linux binary not found"
chmod +x release/arvexis-runtime-linux-x64 || true

cp artifacts/arvexis-runtime-windows-x64/arvexis-runtime.exe release/arvexis-runtime-windows-x64.exe || echo "Runtime Windows binary not found"

EDITOR_JAR=$(find artifacts/arvexis-editor-jar -name "*.jar" | head -1)
if [ -n "$EDITOR_JAR" ]; then cp "$EDITOR_JAR" release/arvexis-editor.jar; else echo "Editor JAR not found"; fi

RUNTIME_JAR=$(find artifacts/arvexis-runtime-jar -name "runtime-*.jar" ! -name "original-*" | head -1)
if [ -n "$RUNTIME_JAR" ]; then cp "$RUNTIME_JAR" release/arvexis-runtime.jar; else echo "Runtime JAR not found"; fi

ls -la release/

- name: Create draft release
Expand All @@ -147,31 +187,41 @@ jobs:
draft: true
generate_release_notes: true
tag_name: ${{ github.event.inputs.tag || github.ref_name }}
name: "Arvexis Editor ${{ github.event.inputs.tag || github.ref_name }}"
name: "Arvexis ${{ github.event.inputs.tag || github.ref_name }}"
body: |
## Downloads
## Editor downloads

| Platform | File |
|----------|------|
| Linux x64 (native, no JVM) | `arvexis-editor-linux-x64` |
| Windows x64 (native, no JVM) | `arvexis-editor-windows-x64.exe` |
| All platforms (requires Java 21) | `arvexis-editor.jar` |

**Run the JAR:**
## Runtime downloads

| Platform | File |
|----------|------|
| Linux x64 (native, no JVM) | `arvexis-runtime-linux-x64` |
| Windows x64 (native, no JVM) | `arvexis-runtime-windows-x64.exe` |
| All platforms (requires Java 21) | `arvexis-runtime.jar` |

Exported game packages no longer bundle the runtime. Download a runtime artifact from this release and place it next to the exported `start.sh` or `start.bat` launcher before running the package.

**Run the editor JAR:**
```
java -jar arvexis-editor.jar
```
Then open http://localhost:8080

**CLI options:**
**Run the runtime JAR inside an exported game folder:**
```
java -jar arvexis-editor.jar \
--server.port=9090 \
--editor.log.path=/custom/logs \
--logging.level.com.engine.editor=DEBUG
java -jar arvexis-runtime.jar
```
files: |
release/arvexis-editor-linux-x64
release/arvexis-editor-windows-x64.exe
release/arvexis-editor.jar
release/arvexis-runtime-linux-x64
release/arvexis-runtime-windows-x64.exe
release/arvexis-runtime.jar
fail_on_unmatched_files: false
10 changes: 7 additions & 3 deletions build-native.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ set -euo pipefail
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
FRONTEND="$ROOT/editor/frontend"
BACKEND="$ROOT/editor/backend"
RUNTIME="$ROOT/runtime"


# Verify GraalVM
if ! java -version 2>&1 | grep -qi "graalvm\|native"; then
Expand All @@ -18,12 +20,14 @@ if ! java -version 2>&1 | grep -qi "graalvm\|native"; then
exit 1
fi

RUNTIME="$ROOT/runtime"

echo "==> [1/3] Building runtime JAR..."
cd "$RUNTIME"
mvn clean package -DskipTests -q
cp "$RUNTIME/target/runtime-1.0.0.jar" "$BACKEND/src/main/resources/bundled/runtime.jar"
mvn -Pnative native:compile clean package -DskipTests -q
BINARY="$RUNTIME/target/arvexis-runtime"
echo "Runtime has been built and is available at:"
echo "$BINARY"
echo "It can be used to run the game/interactive-video if placed next to `dist`"

echo "==> [2/3] Building frontend..."
cd "$FRONTEND"
Expand Down
8 changes: 6 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,17 @@ set -euo pipefail
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
FRONTEND="$ROOT/editor/frontend"
BACKEND="$ROOT/editor/backend"

RUNTIME="$ROOT/runtime"

echo "==> [1/3] Building runtime JAR..."
cd "$RUNTIME"
mvn clean package -DskipTests -q
cp "$RUNTIME/target/runtime-1.0.0.jar" "$BACKEND/src/main/resources/bundled/runtime.jar"
JAR=$(ls "$RUNTIME/target/runtime-"*.jar 2>/dev/null | grep -v sources | head -1)
cp "$JAR" "$RUNTIME/target/arvexis-runtime.jar"
JAR="$RUNTIME/target/arvexis-runtime.jar"
echo "Runtime has been built and is available at:"
echo " $JAR"
echo "It can be used to run the game/interactive-video if placed next to dist"

echo "==> [2/3] Building frontend..."
cd "$FRONTEND"
Expand Down
11 changes: 10 additions & 1 deletion editor/backend/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<groupId>com.engine</groupId>
<artifactId>editor-backend</artifactId>
<version>1.0.0-RELEASE</version>
<version>1.1.0-RELEASE</version>
<name>editor-backend</name>
<description>Arvexis - Editor Backend</description>

Expand Down Expand Up @@ -62,6 +62,15 @@
</dependencies>

<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<excludes>
<exclude>bundled/**</exclude>
</excludes>
</resource>
</resources>

<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ public record UpdateNodeRequest(
String decisionAppearanceConfig,
String musicAssetId,
Boolean clearMusicAsset,
Boolean hideDecisionButtons,
Boolean showDecisionInputIndicator,
Boolean clearDecisionInputModeOverride,
Double posX,
Double posY
) {}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ public record NodeExit(String key, String label, boolean isDefault) {}
private String backgroundColor;
private String decisionAppearanceConfig;
private String musicAssetId;
private Boolean hideDecisionButtons;
private Boolean showDecisionInputIndicator;
private double posX;
private double posY;
private List<NodeExit> exits;
Expand Down Expand Up @@ -60,6 +62,16 @@ public void setDecisionAppearanceConfig(String decisionAppearanceConfig) {
public String getMusicAssetId() { return musicAssetId; }
public void setMusicAssetId(String musicAssetId) { this.musicAssetId = musicAssetId; }

public Boolean getHideDecisionButtons() { return hideDecisionButtons; }
public void setHideDecisionButtons(Boolean hideDecisionButtons) {
this.hideDecisionButtons = hideDecisionButtons;
}

public Boolean getShowDecisionInputIndicator() { return showDecisionInputIndicator; }
public void setShowDecisionInputIndicator(Boolean showDecisionInputIndicator) {
this.showDecisionInputIndicator = showDecisionInputIndicator;
}

public double getPosX() { return posX; }
public void setPosX(double posX) { this.posX = posX; }

Expand Down
Loading
Loading