Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
0125a05
KMP upgrade
edwardpure Jan 21, 2026
c3c9d75
enhance CI configuration and update stress testing support
edwardpure Jan 23, 2026
57c8869
update Android logger implementation and CI configuration for Ubuntu …
edwardpure Jan 23, 2026
3ea3b76
fix logging
edwardstock Jan 23, 2026
0d92021
fix multi-classpath lib loading
edwardstock Jan 24, 2026
7696a59
fix duplicated symbols
edwardstock Jan 24, 2026
2b6cb56
add ios prebuilt libs; fix linux arm64 image
edwardstock Jan 24, 2026
2965f5f
add ios prebuilt libs; fix linux arm64 image
edwardstock Jan 24, 2026
f2c06a4
android sdk setup
edwardstock Jan 24, 2026
5224de0
fix android native lib publication
edwardstock Jan 24, 2026
7307496
remove ubuntu arm64 as it's not supported to build linux arm64
edwardstock Jan 24, 2026
ca0859f
limit concurrency
edwardstock Jan 24, 2026
200037c
fix timezone
edwardstock Jan 24, 2026
c64d2e5
cache sdk
edwardstock Jan 24, 2026
70c18d7
fix scripts calling
edwardstock Jan 24, 2026
c46c62f
setup codeql
edwardstock Jan 24, 2026
1cdd73a
add read-only permissions to actions
edwardstock Jan 24, 2026
84cd774
submodules
edwardstock Jan 24, 2026
138b901
update codeql custom config via workflow; fix native build scripts
edwardstock Jan 24, 2026
73700dd
fix codeql
edwardstock Jan 24, 2026
7aed329
fix codeql for cpp
edwardstock Jan 24, 2026
887d5ed
remove koltin analysis
edwardstock Jan 24, 2026
5a81619
fix @Throws conflict
edwardstock Jan 24, 2026
78ca6e7
minor improvements
edwardstock Jan 25, 2026
1a05ff6
update tests to cover updated logic
edwardstock Jan 25, 2026
877a432
update ugly api and use direct methods
edwardstock Jan 25, 2026
628ef4a
refactor: reorganize package structure and improve API consistency
edwardstock Feb 1, 2026
1c32e56
add proguard rules
edwardstock Feb 1, 2026
7759e02
add separator to entry key
edwardstock Feb 1, 2026
8eb2a98
fix ios example; cleanup warnings
edwardstock Feb 1, 2026
bc39874
linux x64 test script; attempt to remove writing xml test result
edwardstock Feb 1, 2026
f12326d
add mocked LevelDB
edwardstock Feb 1, 2026
6cf9df6
move mocks to public api
edwardstock Feb 1, 2026
6c9f1d1
fixing critical bugs; updated documentation
edwardstock Jun 10, 2026
4ef9097
chore(build): KMP infra cleanup — drop androidLibrary deprecation, fi…
edwardstock Jun 10, 2026
0e05990
update gradle.properties
edwardstock Jun 10, 2026
bda7eb2
update kover
edwardstock Jun 10, 2026
22d540a
Kover coverage on PRs + fix the excludes for a library
edwardstock Jun 10, 2026
cf07fb2
improve coverage
edwardstock Jun 11, 2026
353f9b7
update infra
edwardstock Jun 11, 2026
563d26e
fix android sdk for linux
edwardstock Jun 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
23 changes: 23 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Normalize line endings: store text files as LF in the repository,
# regardless of the contributor's OS. Working-tree checkout stays native.
* text=auto eol=lf

# Windows scripts stay CRLF byte-for-byte (Gradle ships gradlew.bat as CRLF);
# -text means git never converts them, so they are not normalized to LF.
*.bat -text
*.cmd -text
*.ps1 -text

# Binary artifacts — never touch their bytes.
*.png binary
*.webp binary
*.jpg binary
*.jpeg binary
*.ico binary
*.so binary
*.dylib binary
*.dll binary
*.a binary
*.jar binary
*.keystore binary
*.xcuserstate binary
10 changes: 10 additions & 0 deletions .github/actions/cache-gradle-wrapper/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Cache Gradle wrapper
description: Cache Gradle wrapper distributions
runs:
using: composite
steps:
- name: Cache Gradle wrapper
uses: actions/cache@v4
with:
path: ~/.gradle/wrapper/dists
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
17 changes: 17 additions & 0 deletions .github/actions/cache-konan/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Cache Kotlin/Native (konan)
description: >-
Cache the ~/.konan toolchain (Kotlin/Native compiler, LLVM, platform sysroots) so native jobs do
not re-download it from scratch on every run.
runs:
using: composite
steps:
- name: Cache konan
uses: actions/cache@v4
with:
path: ~/.konan
# The konan toolchain version tracks the Kotlin version, which lives in libs.versions.toml.
key: konan-${{ runner.os }}-${{ hashFiles('gradle/libs.versions.toml') }}
# On a miss (e.g. Kotlin bumped) restore the previous konan and let it download only the
# delta, instead of pulling the whole toolchain again.
restore-keys: |
konan-${{ runner.os }}-
41 changes: 41 additions & 0 deletions .github/actions/check-publish-secrets/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Check publish secrets
description: Fail fast when Maven Central or GPG secrets are missing
inputs:
maven_username:
description: Maven Central username
required: true
maven_password:
description: Maven Central password
required: true
gpg_private_key:
description: GPG private key
required: true
gpg_passphrase:
description: GPG passphrase
required: true
runs:
using: composite
steps:
- name: Verify publish secrets
shell: bash
run: |
missing=0
if [ -z "${{ inputs.maven_username }}" ]; then
echo "Missing secret: MAVEN_CENTRAL_USERNAME"
missing=1
fi
if [ -z "${{ inputs.maven_password }}" ]; then
echo "Missing secret: MAVEN_CENTRAL_PASSWORD"
missing=1
fi
if [ -z "${{ inputs.gpg_private_key }}" ]; then
echo "Missing secret: GPG_PRIVATE_KEY"
missing=1
fi
if [ -z "${{ inputs.gpg_passphrase }}" ]; then
echo "Missing secret: GPG_PASSPHRASE"
missing=1
fi
if [ "$missing" -ne 0 ]; then
exit 1
fi
42 changes: 42 additions & 0 deletions .github/actions/setup-android-tools/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Setup Android SDK/NDK/CMake
description: Install Android SDK, required NDK, and CMake for native builds.

runs:
using: "composite"
steps:
- name: Configure Android SDK environment
shell: bash
run: |
set -euo pipefail
case "${RUNNER_OS}" in
Linux) SDK_ROOT="$HOME/android-sdk" ;;
macOS) SDK_ROOT="$HOME/Library/Android/sdk" ;;
*) echo "Unsupported OS: ${RUNNER_OS}" >&2; exit 1 ;;
esac
echo "ANDROID_SDK_ROOT=${SDK_ROOT}" >> "${GITHUB_ENV}"
echo "ANDROID_HOME=${SDK_ROOT}" >> "${GITHUB_ENV}"
echo "${SDK_ROOT}/cmdline-tools/latest/bin" >> "${GITHUB_PATH}"
echo "${SDK_ROOT}/platform-tools" >> "${GITHUB_PATH}"

- name: Cache Android SDK
uses: actions/cache@v4
env:
ANDROID_SDK_CACHE_KEY: >-
android-sdk-${{ runner.os }}-${{ hashFiles(
'.github/actions/setup-android-tools/action.yml',
'.github/actions/setup-android-tools/install_cmdline_tools.sh',
'.github/actions/setup-android-tools/install_sdk_packages.sh'
) }}
with:
path: ${{ env.ANDROID_SDK_ROOT }}
key: ${{ env.ANDROID_SDK_CACHE_KEY }}
restore-keys: |
android-sdk-${{ runner.os }}-

- name: Install Android commandline tools
shell: bash
run: bash ./.github/actions/setup-android-tools/install_cmdline_tools.sh

- name: Install Android SDK packages
shell: bash
run: bash ./.github/actions/setup-android-tools/install_sdk_packages.sh
22 changes: 22 additions & 0 deletions .github/actions/setup-android-tools/install_cmdline_tools.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env bash
set -euo pipefail

if command -v sdkmanager >/dev/null 2>&1; then
exit 0
fi

mkdir -p "${ANDROID_SDK_ROOT}/cmdline-tools"
case "${RUNNER_OS}" in
Linux) TOOLS_ZIP="commandlinetools-linux-14742923_latest.zip" ;;
macOS) TOOLS_ZIP="commandlinetools-mac-14742923_latest.zip" ;;
*) echo "Unsupported OS: ${RUNNER_OS}" >&2; exit 1 ;;
esac
export TOOLS_ZIP

curl -fsSL "https://dl.google.com/android/repository/${TOOLS_ZIP}" -o "${RUNNER_TEMP}/${TOOLS_ZIP}"
if command -v unzip >/dev/null 2>&1; then
unzip -q "${RUNNER_TEMP}/${TOOLS_ZIP}" -d "${ANDROID_SDK_ROOT}/cmdline-tools"
else
python3 -c 'import os, zipfile; sdk_root=os.environ["ANDROID_SDK_ROOT"]; zip_path=os.path.join(os.environ["RUNNER_TEMP"], os.environ["TOOLS_ZIP"]); dest_dir=os.path.join(sdk_root, "cmdline-tools"); zipfile.ZipFile(zip_path, "r").extractall(dest_dir)'
fi
mv "${ANDROID_SDK_ROOT}/cmdline-tools/cmdline-tools" "${ANDROID_SDK_ROOT}/cmdline-tools/latest"
11 changes: 11 additions & 0 deletions .github/actions/setup-android-tools/install_sdk_packages.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash
set -euo pipefail

yes | sdkmanager --sdk_root="${ANDROID_SDK_ROOT}" --licenses >/dev/null || true
# API 37 is published only as the versioned package platforms;android-37.0 — there is no bare
# platforms;android-37 in the SDK repo (see actions/runner-images#13859).
sdkmanager --sdk_root="${ANDROID_SDK_ROOT}" "platform-tools" "platforms;android-37.0" "ndk;29.0.14206865" "cmake;4.1.2"
# AGP resolves compileSdk 37 to the target hash "android-37", but the platform installs into
# platforms/android-37.0. Alias it so Gradle can find the platform. -sfn keeps it idempotent across
# cache-restored runs (overwrites a stale link instead of nesting one inside the target dir).
ln -sfn android-37.0 "${ANDROID_SDK_ROOT}/platforms/android-37"
16 changes: 16 additions & 0 deletions .github/codeql/codeql-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: LevelDB Multiplatform CodeQL Config

paths-ignore:
- "**/.gradle/**"
- "**/build/**"
- "**/out/**"
- "**/bin/**"
- "**/.idea/**"
- "**/.kotlin/**"
- "**/node_modules/**"
- "android-example/**"
- "ios-example/**"
- "native/leveldb/**"
- "native/.dockcross*/**"
- "native/prebuilt/**"
- "third_party/**"
29 changes: 0 additions & 29 deletions .github/workflows/android.yml

This file was deleted.

74 changes: 74 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: PR Check
permissions:
contents: read
pull-requests: write
on:
pull_request:

concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
name: Tests (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-22.04
gradle_args: ":leveldb:check :leveldb:koverXmlReport"
- os: macos-latest
gradle_args: ":leveldb:check"
- os: windows-latest
gradle_args: ":leveldb:mingwX64Test"

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true

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

- name: Set up Android tools
if: runner.os == 'Linux'
uses: ./.github/actions/setup-android-tools

- name: Cache Gradle wrapper
uses: ./.github/actions/cache-gradle-wrapper

- name: Gradle cache
uses: gradle/actions/setup-gradle@v4

- name: Cache konan
uses: ./.github/actions/cache-konan

- name: Run tests
env:
JAVA_TOOL_OPTIONS: "-XX:+CreateCoredumpOnCrash -XX:ErrorFile=leveldb/hs_err_pid%p.log"
run: ./gradlew ${{ matrix.gradle_args }}

- name: Post coverage to PR
if: matrix.os == 'ubuntu-22.04'
uses: mi-kas/kover-report@v1
with:
path: leveldb/build/reports/kover/report.xml
token: ${{ secrets.GITHUB_TOKEN }}
title: Code coverage
update-comment: true

- name: Upload JVM crash logs
if: failure()
uses: actions/upload-artifact@v4
with:
name: jvm-crash-${{ matrix.os }}
path: |
leveldb/hs_err_pid*.log
leveldb/core*
Comment thread
edwardstock marked this conversation as resolved.
63 changes: 63 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: CodeQL

on:
pull_request:
push:
branches: [ master ]

jobs:
analyze:
name: CodeQL (${{ matrix.language }})
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
include:
- language: c-cpp
build-mode: manual
# kotlin 2.3 is not supported by CodeQL yet
# - language: java-kotlin
# build-mode: manual
- language: actions
build-mode: none

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true

- name: Setup Java
if: matrix.language == 'java-kotlin'
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: "21"

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
config-file: ./.github/codeql/codeql-config.yml

- name: Build native C/C++ (for CodeQL)
if: matrix.language == 'c-cpp'
working-directory: native
run: |
cmake --preset linux-x86_64-debug
cmake --build --preset linux-x86_64-debug

- name: Build Java/Kotlin
if: matrix.language == 'java-kotlin'
run: |
./gradlew :leveldb:check --no-daemon

- name: Analyze
uses: github/codeql-action/analyze@v3
Loading
Loading