-
Notifications
You must be signed in to change notification settings - Fork 10
112 lines (93 loc) · 3.7 KB
/
edge-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
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-24.04
steps:
- name: Checkout deephaven-core
uses: actions/checkout@v4
with:
repository: deephaven/deephaven-core
- 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,server-ui
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 }}
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