Skip to content
This repository was archived by the owner on Nov 21, 2026. It is now read-only.
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
91 changes: 91 additions & 0 deletions .github/workflows/build-engine-jars.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
name: Build ArcadeDB engine jars

# Builds the full ArcadeDB distribution (engine, server, every plugin, and their
# dependencies: the same jar set the arcadedata/arcadedb Docker image carries in
# /home/arcadedb/lib) from source at any commit, and uploads the lib directory
# as an artifact. Two uses:
# * verifying an upstream fix at its merge commit without building on the
# laptop, whose cores are kept for timing work (repository ArcadeData/arcadedb,
# ref the merge SHA; download with `gh run download <run> -n arcadedb-lib`);
# * the bindings and examples workflows' `engine-from-source` option, which
# tests a branch (an upstream sync, for example) against the engine source on
# that branch instead of upstream's moving snapshot image.

on:
workflow_dispatch:
inputs:
repository:
description: "Repository to build (owner/name)"
required: false
default: "ArcadeData/arcadedb"
type: string
ref:
description: "Commit SHA, branch, or tag to build"
required: true
type: string
workflow_call:
inputs:
repository:
description: "Repository to build (owner/name); empty means this repository"
required: false
default: ""
type: string
ref:
description: "Commit to build; empty means the calling commit"
required: false
default: ""
type: string
artifact-name:
description: "Name of the uploaded artifact"
required: false
default: "arcadedb-lib"
type: string

permissions:
contents: read

concurrency:
group: build-engine-jars-${{ inputs.repository }}-${{ inputs.ref || github.sha }}
cancel-in-progress: true

jobs:
build:
name: Build the distribution (${{ inputs.repository || github.repository }} @ ${{ inputs.ref || github.sha }})
runs-on: ubuntu-24.04
timeout-minutes: 75
steps:
- name: Checkout the source to build
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: ${{ inputs.repository || github.repository }}
ref: ${{ inputs.ref || github.sha }}
persist-credentials: false

- name: Set up JDK 21
uses: actions/setup-java@de7274f081f381c8f8158605e0321c36c376e2e6 # v6.0.1
with:
distribution: temurin
java-version: "21"
cache: maven

- name: Build the package module and everything it needs
shell: bash
run: |
./mvnw -B -q -DskipTests -pl package -am package
LIB=$(ls -d package/target/arcadedb-*.dir/arcadedb-*/lib | head -1)
if [ -z "$LIB" ] || [ ! -d "$LIB" ]; then
echo "::error::no lib directory under package/target"; exit 1
fi
mkdir -p "$RUNNER_TEMP/arcadedb-lib"
cp "$LIB"/*.jar "$RUNNER_TEMP/arcadedb-lib/"
echo "commit: $(git rev-parse HEAD)" | tee "$RUNNER_TEMP/arcadedb-lib/BUILD-INFO.txt"
echo "jars: $(ls -1 "$RUNNER_TEMP"/arcadedb-lib/*.jar | wc -l)" | tee -a "$RUNNER_TEMP/arcadedb-lib/BUILD-INFO.txt"
ENGINE=$(ls "$RUNNER_TEMP"/arcadedb-lib/arcadedb-engine-*.jar | head -1)
unzip -p "$ENGINE" META-INF/MANIFEST.MF | tr -d '\r' | tee -a "$RUNNER_TEMP/arcadedb-lib/BUILD-INFO.txt"

- name: Upload the lib directory
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: ${{ inputs.artifact-name || 'arcadedb-lib' }}
path: ${{ runner.temp }}/arcadedb-lib/
retention-days: 7
39 changes: 39 additions & 0 deletions .github/workflows/test-python-bindings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,20 @@ on:
description: "Override package version (PEP 440) for build.sh"
required: false
type: string
engine-from-source:
description: "Build the engine jars from this commit's source (the package module) instead of downloading upstream's snapshot image"
required: false
type: boolean
default: false

# Allow manual trigger
workflow_dispatch:
inputs:
engine-from-source:
description: "Build the engine jars from this commit's source (the package module) instead of downloading upstream's snapshot image"
required: false
type: boolean
default: false

permissions:
contents: read
Expand Down Expand Up @@ -146,7 +157,35 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4.4.1

# ENGINE FROM SOURCE (workflow_dispatch or workflow_call with engine-from-source):
# test a branch (an upstream sync, for example) against the engine source on
# that branch, not upstream's moving snapshot image, which can be newer or older
# than the merge being tested. Push and pull_request runs never take this path.
- name: Set up JDK 21 (engine from source)
if: inputs.engine-from-source == true
uses: actions/setup-java@de7274f081f381c8f8158605e0321c36c376e2e6 # v6.0.1
with:
distribution: temurin
java-version: "21"
cache: maven

- name: Build the engine jars from source
if: inputs.engine-from-source == true
shell: bash
run: |
./mvnw -B -q -DskipTests -pl package -am package
LIB=$(ls -d package/target/arcadedb-*.dir/arcadedb-*/lib | head -1)
if [ -z "$LIB" ] || [ ! -d "$LIB" ]; then
echo "::error::no lib directory under package/target"; exit 1
fi
mkdir -p bindings/python/src/arcadedb_embedded/jars
cp "$LIB"/*.jar bindings/python/src/arcadedb_embedded/jars/
ENGINE=$(ls bindings/python/src/arcadedb_embedded/jars/arcadedb-engine-*.jar | head -1)
echo "Built from $(git rev-parse HEAD): $(ls -1 bindings/python/src/arcadedb_embedded/jars/*.jar | wc -l) JARs"
unzip -p "$ENGINE" META-INF/MANIFEST.MF | tr -d '\r' | grep -i -E "build|version" || true

- name: Download JARs from ArcadeDB Docker image
if: inputs.engine-from-source != true
shell: bash
run: |
cd bindings/python
Expand Down
38 changes: 38 additions & 0 deletions .github/workflows/test-python-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ on:
description: "Override package version (PEP 440) for build.sh"
required: false
type: string
engine-from-source:
description: "Build the engine jars from this commit's source (the package module) instead of downloading upstream's snapshot image"
required: false
type: boolean
default: false

# Allow manual trigger
workflow_dispatch:
Expand All @@ -37,6 +42,11 @@ on:
description: "Glob pattern(s) for examples to run (space-separated, relative to bindings/python/examples)."
required: false
default: "0[1-9]_*.py 1[0-9]_*.py 2[0-9]_*.py"
engine-from-source:
description: "Build the engine jars from this commit's source (the package module) instead of downloading upstream's snapshot image"
required: false
type: boolean
default: false

# SUPERSEDE, do not race.
#
Expand Down Expand Up @@ -73,7 +83,35 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4.4.1

# ENGINE FROM SOURCE (workflow_dispatch or workflow_call with engine-from-source):
# test a branch (an upstream sync, for example) against the engine source on
# that branch, not upstream's moving snapshot image, which can be newer or older
# than the merge being tested. Push and pull_request runs never take this path.
- name: Set up JDK 21 (engine from source)
if: inputs.engine-from-source == true
uses: actions/setup-java@de7274f081f381c8f8158605e0321c36c376e2e6 # v6.0.1
with:
distribution: temurin
java-version: "21"
cache: maven

- name: Build the engine jars from source
if: inputs.engine-from-source == true
shell: bash
run: |
./mvnw -B -q -DskipTests -pl package -am package
LIB=$(ls -d package/target/arcadedb-*.dir/arcadedb-*/lib | head -1)
if [ -z "$LIB" ] || [ ! -d "$LIB" ]; then
echo "::error::no lib directory under package/target"; exit 1
fi
mkdir -p bindings/python/src/arcadedb_embedded/jars
cp "$LIB"/*.jar bindings/python/src/arcadedb_embedded/jars/
ENGINE=$(ls bindings/python/src/arcadedb_embedded/jars/arcadedb-engine-*.jar | head -1)
echo "Built from $(git rev-parse HEAD): $(ls -1 bindings/python/src/arcadedb_embedded/jars/*.jar | wc -l) JARs"
unzip -p "$ENGINE" META-INF/MANIFEST.MF | tr -d '\r' | grep -i -E "build|version" || true

- name: Download JARs from ArcadeDB Docker image
if: inputs.engine-from-source != true
shell: bash
run: |
cd bindings/python
Expand Down
Loading