Skip to content

Branch CI

Branch CI #163

Workflow file for this run

name: Branch CI
on:
workflow_dispatch:
inputs:
deephaven_core_ref:
description: 'The deephaven-core branch, tag, or SHA to checkout.'
required: true
image_tag:
description: 'The image tag. Applies to all targets.'
required: true
bake_targets:
description: 'The bake target(s), comma separated. Please ask for assistance.'
required: true
# For maximum cache coherency, ensure only one outstanding build at any given time
concurrency: release
jobs:
assemble-deephaven-core:
runs-on: ubuntu-22.04
steps:
- name: Checkout deephaven-core
uses: actions/checkout@v4
with:
repository: deephaven/deephaven-core
ref: ${{ github.event.inputs.deephaven_core_ref }}
- 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: Assemble distribution
uses: burrunan/gradle-cache-action@v1
with:
job-id: build-server
arguments: --scan outputVersion server-jetty-app:assemble py-server:assemble
gradle-version: wrapper
- 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:
needs: assemble-deephaven-core
runs-on: ubuntu-22.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: ${{ github.event.inputs.bake_targets }}
files: server.hcl,server-slim.hcl,server-base.hcl,server-slim-base.hcl
pull: true
set: |
*.cache-to=
env:
DEEPHAVEN_SOURCES: custom
DEEPHAVEN_VERSION: ${{ steps.artifact_metadata.outputs.deephaven_version }}
DEEPHAVEN_CORE_WHEEL: ${{ steps.artifact_metadata.outputs.deephaven_core_wheel }}
MULTI_ARCH: true
RELEASE: true
REPO_PREFIX: ghcr.io/${{ github.repository_owner }}/
TAG: ${{ github.event.inputs.image_tag }}