Skip to content

Commit

Permalink
add documentation publishing workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
alecgrieser committed Jan 31, 2025
1 parent 6c503c2 commit 7f84161
Show file tree
Hide file tree
Showing 5 changed files with 85 additions and 16 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Documentation Site

on:
workflow_dispatch:
inputs:
artifact_version:
description: 'Version of final artifact to deploy'
required: true

jobs:
gradle:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/[email protected]
- name: Build and deploy site
uses: ./actions/doc-build-publish
with:
artifact_version: ${{ inputs.artifact_version }}
27 changes: 27 additions & 0 deletions actions/doc-build-publish/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Documentation Build And Publish

inputs:
artifact_version:
description: 'Target version of final artifacts'
default: ''

runs:
using: "composite"
steps:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Build site
uses: ./actions/gradle-build
with:
artifact_version: ${{ inputs.artifact_version }}
gradle_command: "documentationSite"
- name: Upload site artifact
id: deployment
uses: actions/upload-pages-artifact@v3
with:
path: docs/sphinx/.out/html/
- name: Deploy site to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
26 changes: 26 additions & 0 deletions actions/gradle-build/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Gradle Build

inputs:
gradle_command:
description: 'Gradle command to run'
required: true
artifact_version:
description: 'Target version of final artifacts'
default: ''

runs:
using: "composite"
steps:
- name: Set up JDK 17
uses: actions/[email protected]
with:
java-version: '17'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@0bdd871935719febd78681f197cd39af5b6e16a6
- name: Remove JVM args
shell: bash
run: sed -i -e "s/^org\.gradle\..*/#&/g" gradle.properties
- name: Run Gradle Command
shell: bash
run: ARTIFACT_VERSION="${{ inputs.artifact_version }}" GRADLE_OPTS="-XX:+HeapDumpOnOutOfMemoryError -Xverify:none -XX:+TieredCompilation -Xmx4096m -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED" ./gradlew --no-daemon --console=plain -b ./build.gradle ${{ inputs.gradle_command }}
19 changes: 7 additions & 12 deletions actions/gradle-test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ inputs:
gradle_args:
description: 'Gradle arguments for running'
required: true
artifact_version:
description: 'Target version of final artifacts'
default: ''

runs:
using: "composite"
Expand All @@ -30,19 +33,11 @@ runs:
- name: Switch FDB to SSD
shell: bash
run: fdbcli --exec "configure single ssd storage_migration_type=aggressive; status"
- name: Set up JDK 17
uses: actions/[email protected]
with:
java-version: '17'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@0bdd871935719febd78681f197cd39af5b6e16a6
- name: Remove JVM args
shell: bash
run: sed -i -e "s/^org\.gradle\..*/#&/g" gradle.properties
- name: Run build and test
shell: bash
run: GRADLE_OPTS="-XX:+HeapDumpOnOutOfMemoryError -Xverify:none -XX:+TieredCompilation -Xmx4096m -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED" ./gradlew --no-daemon --console=plain -b ./build.gradle build destructiveTest -PcoreNotStrict ${{ inputs.gradle_args }}
uses: ./actions/gradle-build
with:
artifact_version: ${{ inputs.artifact_version }}
gradle_command: "build destructiveTest -PcoreNotStrict ${{ inputs.gradle_args }}"
- name: Copy Test Reports
shell: bash
if: always()
Expand Down
10 changes: 6 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,12 @@ allprojects {
}

repositories {
if (System.getenv("ARTIFACT_VERSION") != null) {
version = "${System.getenv('ARTIFACT_VERSION')}"
} else if (System.getenv("RECORD_LAYER_BUILD_NUMBER") != null) {
version = "${version}.${System.getenv('RECORD_LAYER_BUILD_NUMBER')}"
var artifactVersion = System.getenv("ARTIFACT_VERSION")
var buildNumber = System.getenv("RECORD_LAYER_BUILD_NUMBER")
if (artifactVersion != null && !artifactVersion.isEmpty()) {
version = artifactVersion
} else if (buildNumber != null && !buildNumber.isEmpty()) {
version = "${version}.${buildNumber}"
}
if (Boolean.parseBoolean(mavenLocalEnabled)) {
mavenLocal()
Expand Down

0 comments on commit 7f84161

Please sign in to comment.