Skip to content

Commit

Permalink
Merge branch 'develop' into feat/testservice-new-conversation
Browse files Browse the repository at this point in the history
  • Loading branch information
mythsunwind committed Sep 4, 2024
2 parents 83eeb87 + 27532f3 commit 59df99c
Show file tree
Hide file tree
Showing 1,258 changed files with 18,866 additions and 32,716 deletions.
5 changes: 5 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ ij_smart_tabs = false
ij_visual_guides = none
ij_wrap_on_typing = false

# Specific settings for YAML files
[{*.yml,*.yaml}]
indent_style = space
indent_size = 2

[{*.gradle.kts,*.kt,*.kts,*.main.kts,*.space.kts}]
max_line_length = 140
ij_kotlin_name_count_to_use_star_import = 999
Expand Down
21 changes: 21 additions & 0 deletions .github/actions/get-avd-info/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: 'Get AVD Info'
description: 'Get the AVD info based on its API level.'
inputs:
api-level:
required: true
outputs:
arch:
description: 'x86_64 or x86'
value: ${{ steps.get-avd-arch.outputs.arch }}
target:
description: 'AVD target used for the emulator (default, google_apis, google_atd, etc.)'
value: ${{ steps.get-avd-target.outputs.target }}
runs:
using: "composite"
steps:
- id: get-avd-arch
run: echo "arch=$(if [ ${{ inputs.api-level }} -ge 30 ]; then echo x86_64; else echo x86; fi)" >> $GITHUB_OUTPUT
shell: bash
- id: get-avd-target
run: echo "target=$(echo default)" >> $GITHUB_OUTPUT
shell: bash
29 changes: 29 additions & 0 deletions .github/actions/setup-java-gradle/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Setup Java and Gradle
description: Setup java and gradle with cache for jobs
inputs:
enable-kvm:
description: 'Whether to enable KVM'
required: false
default: false
runs:
using: composite
steps:
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'

- name: Gradle Cache
uses: gradle/actions/setup-gradle@v3

- name: Validate Gradle wrapper
uses: gradle/actions/wrapper-validation@v3

- name: Enable KVM (Linux only)
if: ${{ inputs.enable-kvm == 'true' && runner.os == 'Linux' }}
shell: bash
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
133 changes: 85 additions & 48 deletions .github/workflows/benchmarks-check.yml
Original file line number Diff line number Diff line change
@@ -1,55 +1,92 @@
name: Benchmark Checks
on:
merge_group:
pull_request:
types: [ opened, synchronize ]
workflow_dispatch:
push:
branches:
- develop
pull_request:
branches:
- develop
types: [ opened, synchronize ]
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
detekt:
uses: ./.github/workflows/codestyle.yml
benchmarks-check:
needs: [ detekt ]
runs-on: ubuntu-latest
container: wirebot/cryptobox:1.4.0
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Validate Gradle wrapper
uses: gradle/actions/wrapper-validation@v3
- name: Run Benchmarks
run: ./gradlew benchmark
- name: Generate HTML Report
run: ./gradlew jmhReport
- name: Archive Reports
if: always()
uses: actions/upload-artifact@v4
with:
name: benchmarks-reports
path: ./benchmarks/build/reports/benchmarks/**
- name: Create Benchmark Table
id: benchmark-table
uses: boswelja/[email protected]
with:
benchmark-results: ./benchmarks/build/reports/benchmarks/main/**/jvm.json
- name: Post Results
run: |
echo '## Benchmarks results ⏱️' >> $GITHUB_STEP_SUMMARY
echo '${{steps.benchmark-table.outputs.benchmark-table}}️' >> $GITHUB_STEP_SUMMARY
detekt:
uses: ./.github/workflows/codestyle.yml
benchmarks-check:
needs: [ detekt ]
permissions:
pull-requests: write
runs-on: ubuntu-latest
container: wirebot/cryptobox:1.4.0
env:
BENCHER_PROJECT: kalium-hgtkc47o
BENCHER_API_TOKEN: ${{ secrets.BENCHER_API_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Java and Gradle
uses: ./.github/actions/setup-java-gradle
- name: Run Benchmarks
run: ./gradlew benchmark
- name: Generate HTML Report
run: ./gradlew jmhReport
- name: Archive Reports
if: always()
uses: actions/upload-artifact@v4
with:
name: benchmarks-reports
path: ./benchmarks/build/reports/benchmarks/**
- name: Create Benchmark Table
id: benchmark-table
uses: boswelja/[email protected]
with:
benchmark-results: ./benchmarks/build/reports/benchmarks/main/**/jvm.json
- name: Post Results
run: |
echo '## Benchmarks results ⏱️' >> $GITHUB_STEP_SUMMARY
echo '${{steps.benchmark-table.outputs.benchmark-table}}️' >> $GITHUB_STEP_SUMMARY
- name: Cleanup Gradle Cache
# Remove some files from the Gradle cache, so they aren't cached by GitHub Actions.
# Restoring these files from a GitHub Actions cache might cause problems for future builds.
run: |
rm -f ~/.gradle/caches/modules-2/modules-2.lock
rm -f ~/.gradle/caches/modules-2/gc.properties
- name: Set JMH report full path
id: path
shell: bash
run: |
REPORT_FULL_PATH_REF="$(set -- ./benchmarks/build/reports/benchmarks/main/**/jvm.json; echo $1)"
echo "report_full_path=$REPORT_FULL_PATH_REF" >> $GITHUB_OUTPUT
unset REPORT_FULL_PATH_REF
- name: Install bencher
uses: bencherdev/[email protected]

- name: Run Bencher on PR
if: github.event.pull_request.head.repo.full_name == github.repository && github.event_name == 'pull_request'
run: |
bencher run \
--branch '${{ github.head_ref }}' \
--branch-start-point '${{ github.base_ref }}' \
--branch-start-point-hash '${{ github.event.pull_request.base.sha }}' \
--adapter java_jmh \
--testbed ubuntu-latest \
--err \
--github-actions '${{ secrets.GITHUB_TOKEN }}' \
--file ${{ steps.path.outputs.report_full_path }}
- name: Run Bencher on base branch
if: github.event_name == 'push' && github.ref_name == 'develop'
run: |
bencher run \
--branch develop \
--adapter java_jmh \
--testbed ubuntu-latest \
--err \
--file ${{ steps.path.outputs.report_full_path }}
- name: Cleanup Gradle Cache
# Remove some files from the Gradle cache, so they aren't cached by GitHub Actions.
# Restoring these files from a GitHub Actions cache might cause problems for future builds.
run: |
rm -f ~/.gradle/caches/modules-2/modules-2.lock
rm -f ~/.gradle/caches/modules-2/gc.properties
12 changes: 4 additions & 8 deletions .github/workflows/codestyle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,10 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b

- name: Setup Java and Gradle
uses: ./.github/actions/setup-java-gradle

- name: Run Detekt
run: |
make detekt/run-verify
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/generate-changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
npx [email protected] -t "$PREVIOUS_TAG...$CURRENT_TAG"
- name: 'Attach changelog to tag'
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{github.token}}
with:
Expand Down
15 changes: 4 additions & 11 deletions .github/workflows/generate-dokka.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout project
uses: actions/checkout@v4
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-depth: 0

- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: gradle

- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b
- name: Setup Java and Gradle
uses: ./.github/actions/setup-java-gradle

- name: Generate Dokka docs
run: make doc/generate-kdocs
Expand Down
Loading

0 comments on commit 59df99c

Please sign in to comment.