Skip to content

Commit

Permalink
Add benchmark workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
chippmann committed May 16, 2024
1 parent ffd028f commit 3088821
Show file tree
Hide file tree
Showing 2 changed files with 162 additions and 0 deletions.
68 changes: 68 additions & 0 deletions .github/workflows/benchmark_windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: πŸ“Š Benchmark windows
on:
workflow_call:
inputs:
godot-version:
type: string

env:
SCONS_CACHE_MSVC_CONFIG: true
BENCHMARK_DATA_URL: ${{ secrets.BENCHMARK_DATA_URL }}

concurrency:
group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-windows_benchmark
cancel-in-progress: true

jobs:
build-windows:
# Windows 10 with latest image
runs-on:
- self-hosted
- win11
- benchmark
name: Benchmark windows

steps:
- name: Clone Godot Engine
uses: actions/checkout@v4
with:
repository: godotengine/godot
ref: ${{ inputs.godot-version }}

- name: Clone Godot JVM module.
uses: actions/checkout@v4
with:
path: modules/kotlin_jvm

- uses: actions/setup-java@v4
with:
distribution: adopt-hotspot
java-version: ${{ inputs.jvm-version }}

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
cache-read-only: false

- name: Download windows editor release
uses: ./.github/actions/download-artifact
with:
name: editor_release_windows_x86_64
path: './bin'

- name: Download godot-bootstrap release
uses: ./.github/actions/download-artifact
with:
name: jvm_godot-bootstrap_release
path: './bin'

- name: Build benchmarks project
run: |
modules/kotlin_jvm/harness/benchmarks/gradlew -p modules/kotlin_jvm/harness/benchmarks/ build -Prelease=true
- name: Run benchmarks
run: |
cd modules/kotlin_jvm/harness/benchmarks/
jlink --add-modules java.base,java.logging --output jre-amd64
./gradlew executeAndUploadBenchmarkResults
timeout-minutes: 30
94 changes: 94 additions & 0 deletions .github/workflows/trigger_on_push_master.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
name: Deploy release
on:
push:
# TODO: enable after testing is done!
# branches:
# - master

concurrency:
group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-trigger_on_tag
cancel-in-progress: true

jobs:
setup-build-variables:
name: πŸ› οΈ Setup build variables
runs-on: ubuntu-latest
steps:
- run: |
echo "Setup done"
outputs: # defined here explicitly, so it only needs to be defined here. All other workflows can just reference it
godot-kotlin-jvm-version: "0.9.1-4.2.2"
godot-version: "4.2.2-stable"
jvm-version: "17"

build-jvm:
name: β˜• Build Jvm
uses: ./.github/workflows/build_jvm.yml
needs:
- setup-build-variables
with:
godot-version: ${{ needs.setup-build-variables.outputs['godot-version'] }}
jvm-version: ${{ needs.setup-build-variables.outputs['jvm-version'] }}

build-android:
name: πŸ€– Build and Assemble Android
uses: ./.github/workflows/build_android.yml
needs:
- setup-build-variables
with:
godot-version: ${{ needs.setup-build-variables.outputs['godot-version'] }}
jvm-version: ${{ needs.setup-build-variables.outputs['jvm-version'] }}

build-ios:
name: 🍏 Build iOS
uses: ./.github/workflows/build_ios.yml
needs:
- setup-build-variables
with:
godot-version: ${{ needs.setup-build-variables.outputs['godot-version'] }}

build-linux:
name: 🐧 Build Linux
uses: ./.github/workflows/build_linux.yml
needs:
- setup-build-variables
with:
godot-version: ${{ needs.setup-build-variables.outputs['godot-version'] }}

build-macos:
name: 🍎 Build macOS
uses: ./.github/workflows/build_macos.yml
needs:
- setup-build-variables
with:
godot-version: ${{ needs.setup-build-variables.outputs['godot-version'] }}

build-windows:
name: πŸͺŸ Build Windows
uses: ./.github/workflows/build_windows.yml
needs:
- setup-build-variables
with:
godot-version: ${{ needs.setup-build-variables.outputs['godot-version'] }}

# needed for benchmarks
assemble-windows:
name: πŸͺŸ Assemble windows
uses: ./.github/workflows/assemble_windows.yml
needs:
- setup-build-variables
- build-jvm
- build-windows
with:
godot-kotlin-jvm-version: ${{ needs.setup-build-variables.outputs['godot-kotlin-jvm-version'] }}
godot-version: ${{ needs.setup-build-variables.outputs['godot-version'] }}

benchmark-windows:
name: πŸ“Š Benchmark windows
secrets: inherit # needed so that this sub workflow can also access github secrets for this workflow
uses: ./.github/workflows/benchmark_windows.yml
needs:
- assemble-windows
with:
godot-version: ${{ needs.setup-build-variables.outputs['godot-version'] }}
jvm-version: ${{ needs.setup-build-variables.outputs['jvm-version'] }}

0 comments on commit 3088821

Please sign in to comment.