Skip to content

Edge CI

Edge CI #918

Workflow file for this run

name: Edge CI
on:
schedule:
- cron: "0 3 * * *"
pull_request:
branches: [main]
push:
branches: [main]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
assemble-deephaven-core:
# Forks don't need to run the scheduled cron
if: ${{ github.repository_owner == 'deephaven' || github.event_name != 'schedule' }}
runs-on: ubuntu-24.04
outputs:
git-revision: ${{ steps.get-git-revision.outputs.GIT_REVISION }}
steps:
- name: Checkout deephaven-core
uses: actions/checkout@v4
with:
repository: deephaven/deephaven-core
- name: Get GIT Revision
id: get-git-revision
run: echo "GIT_REVISION="$(git rev-parse HEAD) >> $GITHUB_OUTPUT
- name: Setup JDK 11
id: setup-java-11
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: "11"
- name: Set JAVA_HOME
run: echo "JAVA_HOME=${{ steps.setup-java-11.outputs.path }}" >> $GITHUB_ENV
- name: Setup gradle properties
run: |
.github/scripts/gradle-properties.sh >> gradle.properties
cat gradle.properties
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Assemble distribution
run: ./gradlew outputVersion server-jetty-app:assemble py-server:assemble
- uses: actions/upload-artifact@v4
with:
name: assemble-deephaven-core
path: |
build/version
server/jetty-app/build/distributions/*.tar
py/server/build/wheel/*.whl
retention-days: 2
bake-images:
# Forks don't need to run the scheduled cron
if: ${{ github.repository_owner == 'deephaven' || github.event_name != 'schedule' }}
needs: assemble-deephaven-core
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to ghcr.io
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/download-artifact@v4
with:
name: assemble-deephaven-core
path: artifacts
- name: Extract artifact metadata
id: artifact_metadata
run: |
deephaven_version=$(< artifacts/build/version)
deephaven_core_wheel=$(find artifacts/py/server/build/wheel -type f -name "*.whl" | xargs -n 1 basename)
echo "deephaven_version=${deephaven_version}" >> $GITHUB_OUTPUT
echo "deephaven_core_wheel=${deephaven_core_wheel}" >> $GITHUB_OUTPUT
- name: Prepare artifacts
run: |
cp artifacts/py/server/build/wheel/${{ steps.artifact_metadata.outputs.deephaven_core_wheel }} contexts/server/
cp artifacts/server/jetty-app/build/distributions/server-jetty-${{ steps.artifact_metadata.outputs.deephaven_version }}.tar contexts/server/
cp artifacts/server/jetty-app/build/distributions/server-jetty-${{ steps.artifact_metadata.outputs.deephaven_version }}.tar contexts/server-slim/
- name: Bake
uses: docker/[email protected]
with:
targets: server,server-slim,server-base,server-slim-base
files: server.hcl,server-slim.hcl,server-base.hcl,server-slim-base.hcl
pull: true
env:
DEEPHAVEN_SOURCES: custom
DEEPHAVEN_VERSION: ${{ steps.artifact_metadata.outputs.deephaven_version }}
GIT_REVISION: ${{ needs.assemble-deephaven-core.outputs.git-revision }}
DEEPHAVEN_CORE_WHEEL: ${{ steps.artifact_metadata.outputs.deephaven_core_wheel }}
MULTI_ARCH: true
RELEASE: ${{ github.event_name != 'pull_request' }}
REPO_PREFIX: ghcr.io/${{ github.repository_owner }}/
TAG: edge