Edge CI #288
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Edge CI | |
on: | |
schedule: | |
- cron: '0 3 * * *' | |
pull_request: | |
branches: [ main ] | |
push: | |
branches: [ main ] | |
workflow_dispatch: | |
# For maximum cache coherency, ensure only one outstanding build at any given time | |
concurrency: release | |
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-22.04 | |
steps: | |
- name: Checkout deephaven-core | |
uses: actions/checkout@v3 | |
with: | |
repository: deephaven/deephaven-core | |
- name: Setup JDK 11 | |
id: setup-java-11 | |
uses: actions/setup-java@v3 | |
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@v3 | |
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-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to ghcr.io | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- uses: actions/download-artifact@v3 | |
with: | |
name: assemble-deephaven-core | |
path: artifacts | |
- name: Extract artifact metadata | |
id: artifact_metadata | |
run: | | |
deephaven_version=$(< artifacts/build/version) | |
echo "deephaven_version=${deephaven_version}" >> $GITHUB_OUTPUT | |
- name: Prepare artifacts | |
run: | | |
cp artifacts/py/server/build/wheel/deephaven_core-${{ steps.artifact_metadata.outputs.deephaven_version }}-py3-none-any.whl 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/bake-action@v3.1.0 | |
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 }} | |
MULTI_ARCH: true | |
RELEASE: ${{ github.event_name != 'pull_request' }} | |
REPO_PREFIX: ghcr.io/${{ github.repository_owner }}/ | |
TAG: edge |