Publish Deephaven Benchmarks #28
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
# Copyright (c) 2024-2024 Deephaven Data Labs and Patent Pending | |
# Run the Benchmark release process that results in publishing a | |
# deephaven-benchmark jar to maven central and a distro tar file to | |
# the Github release notes as an asset | |
name: Publish Deephaven Benchmarks | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: 'Benchmark Release Version' | |
required: true | |
default: '0.36.0' | |
type: string | |
release-commit: | |
description: 'Benchmark Release Commit Hash' | |
required: true | |
default: '849d7e99a873ad6ff1ccd6c1a5099d33f8393f1a' | |
type: string | |
previous-version: | |
description: 'Benchmark Previous Version' | |
required: true | |
default: '0.35.0' | |
type: string | |
mark-latest: | |
description: 'Mark Release as Latest' | |
required: false | |
type: boolean | |
env: | |
VERSION: "${{inputs.version}}" | |
COMMIT: "${{inputs.release-commit}}" | |
PREV_VERSION: "${{inputs.previous-version}}" | |
LATEST_DIR: ${{github.workspace}} | |
RELEASE_DIR: ${{github.workspace}}/release | |
permissions: | |
actions: write | |
contents: write | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '21' | |
distribution: 'temurin' | |
- name: Checkout Latest | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
fetch-tags: true | |
- name: Checkout Release | |
uses: actions/checkout@v4 | |
with: | |
path: release | |
fetch-depth: 0 | |
fetch-tags: true | |
- name: Checkout Distro Target | |
working-directory: ${{env.RELEASE_DIR}} | |
run: git checkout ${COMMIT} | |
- name: Pull and Start Docker Image | |
working-directory: ${{env.RELEASE_DIR}} | |
run: | | |
cp ${LATEST_DIR}/.github/resources/integration-docker-compose.yml docker-compose.yml | |
docker compose up -d | |
- name: Build Release Artifacts Bundle | |
working-directory: ${{env.RELEASE_DIR}} | |
run: | | |
echo "${{secrets.BENCHMARK_SIGNING_KEY}}" > signing-key.txt | |
${LATEST_DIR}/.github/scripts/make-release-artifact-bundle.sh ${VERSION} signing-key.txt | |
docker compose down | |
- name: Build Release Distribution | |
working-directory: ${{env.RELEASE_DIR}} | |
run: ${LATEST_DIR}/.github/scripts/make-release-distro.sh ${VERSION} ${LATEST_DIR}/.github/distro | |
- name: Test Release Distro | |
working-directory: ${{env.RELEASE_DIR}} | |
run: | | |
${LATEST_DIR}/.github/scripts/test-release-distro.sh ${VERSION} | |
mv target/deephaven-benchmark-${VERSION}.tar ${LATEST_DIR}/ | |
mv target/deephaven-benchmark-${VERSION}-results.tar ${LATEST_DIR}/ | |
- name: Make Release Notes | |
run: .github/scripts/make-release-notes.sh ${VERSION} ${COMMIT} ${PREV_VERSION} | |
- name: Archive Results | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Deephaven Benchmark Release | |
path: | | |
deephaven-benchmark-${{env.VERSION}}.tar | |
deephaven-benchmark-${{env.VERSION}}-results.tar | |
deephaven-benchmark-${{env.VERSION}}-bundle.jar | |
release-notes.md | |
- name: Publish Github Release | |
if: ${{ github.ref_name == 'main' }} | |
uses: ncipollo/release-action@v1 | |
with: | |
tag: "v${{env.VERSION}}" | |
commit: ${{env.COMMIT}} | |
makeLatest: ${{inputs.mark-latest}} | |
allowUpdates: true | |
artifacts: "deephaven-benchmark-${{env.VERSION}}.tar" | |
bodyFile: release-notes.md | |