| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent e29269b commit 478cacd
15 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -8,60 +8,54 @@ on: | |||
| 8 | 8 | ||
| 9 | 9 | jobs: | |
| 10 | 10 | build: | |
| 11 | - name: ${{ matrix.os }} Build | ||
| 12 | - runs-on: ${{ matrix.os }} | ||
| 13 | - | ||
| 14 | - strategy: | ||
| 15 | - matrix: | ||
| 16 | - os: [ubuntu-latest, macos-latest, windows-latest] | ||
| 11 | + name: Build and Verify | ||
| 12 | + runs-on: ubuntu-latest | ||
| 17 | 13 | ||
| 18 | 14 | steps: | |
| 19 | 15 | - name: Check out Git repository | |
| 20 | - uses: actions/checkout@v3 | ||
| 21 | - with: | ||
| 22 | - submodules: true | ||
| 16 | + uses: actions/checkout@v5 | ||
| 17 | + | ||
| 18 | + - name: Install dependencies | ||
| 19 | + run: sudo apt-get update && sudo apt-get install -y zstd | ||
| 23 | 20 | ||
| 24 | 21 | - name: Set up Java and Maven | |
| 25 | - uses: actions/setup-java@v3 | ||
| 22 | + uses: actions/setup-java@v5 | ||
| 26 | 23 | with: | |
| 27 | 24 | distribution: zulu | |
| 28 | - java-version: 11 | ||
| 25 | + java-version: 25 | ||
| 29 | 26 | cache: maven | |
| 30 | 27 | ||
| 31 | 28 | - name: Build with Maven | |
| 32 | 29 | run: mvn -B verify | |
| 33 | 30 | ||
| 34 | 31 | deploy: | |
| 35 | - needs: build | ||
| 36 | - name: ${{ matrix.os }} Deploy to OSSRH | ||
| 37 | - runs-on: ${{ matrix.os }} | ||
| 32 | + name: Deploy to Central Portal | ||
| 33 | + needs: [build] | ||
| 38 | 34 | if: github.event_name == 'push' | |
| 39 | - | ||
| 40 | - strategy: | ||
| 41 | - matrix: | ||
| 42 | - os: [ubuntu-latest, macos-latest, windows-latest] | ||
| 35 | + runs-on: ubuntu-latest | ||
| 43 | 36 | ||
| 44 | 37 | steps: | |
| 45 | 38 | - name: Check out Git repository | |
| 46 | - uses: actions/checkout@v3 | ||
| 47 | - with: | ||
| 48 | - submodules: true | ||
| 39 | + uses: actions/checkout@v5 | ||
| 40 | + | ||
| 41 | + - name: Install dependencies | ||
| 42 | + run: sudo apt-get update && sudo apt-get install -y zstd | ||
| 49 | 43 | ||
| 50 | 44 | - name: Set up Java and Maven | |
| 51 | - uses: actions/setup-java@v3 | ||
| 45 | + uses: actions/setup-java@v5 | ||
| 52 | 46 | with: | |
| 53 | 47 | distribution: zulu | |
| 54 | - java-version: 11 | ||
| 48 | + java-version: 25 | ||
| 55 | 49 | cache: maven | |
| 56 | - server-id: ossrh | ||
| 57 | - server-username: MAVEN_USERNAME | ||
| 58 | - server-password: MAVEN_CENTRAL_TOKEN | ||
| 50 | + server-id: central | ||
| 51 | + server-username: MAVEN_CENTRAL_USERNAME | ||
| 52 | + server-password: MAVEN_CENTRAL_PASSWORD | ||
| 59 | 53 | gpg-private-key: ${{ secrets.gpg_private_key }} | |
| 60 | 54 | gpg-passphrase: MAVEN_GPG_PASSPHRASE | |
| 61 | 55 | ||
| 62 | 56 | - name: Publish Maven package | |
| 63 | - run: mvn -Possrh-deploy -B deploy | ||
| 57 | + run: mvn -B -Pcentral-deploy deploy -DskipTests | ||
| 64 | 58 | env: | |
| 65 | 59 | MAVEN_GPG_PASSPHRASE: ${{ secrets.gpg_passphrase }} | |
| 66 | - MAVEN_USERNAME: ${{ secrets.nexus_username }} | ||
| 67 | - MAVEN_CENTRAL_TOKEN: ${{ secrets.nexus_password }} | ||
| 60 | + MAVEN_CENTRAL_USERNAME: ${{ secrets.central_username }} | ||
| 61 | + MAVEN_CENTRAL_PASSWORD: ${{ secrets.central_password }} | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,59 +1,28 @@ | |||
| 1 | - # THIS PROJECT IS ARCHIVED | ||
| 2 | - | ||
| 3 | - **Cross compilation is now performed in the | ||
| 4 | - [LmdbJava](https://github.com/lmdbjava/lmdbjava) project.** | ||
| 5 | - | ||
| 6 | 1 | [](https://github.com/lmdbjava/native/actions) | |
| 7 | - [](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.lmdbjava%22%20AND%20a%3A%22lmdbjava-native-parent%22) | ||
| 2 | + [](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.lmdbjava%22%20AND%20a%3A%22native%22) | ||
| 8 | 3 | [](http://www.openldap.org/software/release/license.html) | |
| 9 | 4 | ||
| 10 | 5 | # LMDB Native Libraries | |
| 11 | 6 | ||
| 12 | - This repository creates standard builds of the [LMDB](http://symas.com/mdb/) | ||
| 13 | - native library. It packages the built libraries into operating system-specific | ||
| 14 | - JARs (with POMs). This allows [LmdbJava](https://github.com/lmdbjava/lmdbjava) | ||
| 15 | - (or other interested Java projects) to depend on these JARs using the normal | ||
| 16 | - Maven dependency resolution process. | ||
| 17 | - | ||
| 18 | - **If you are simply wishing to use LMDB from Java, please use the | ||
| 19 | - [LmdbJava](https://github.com/lmdbjava/lmdbjava) project.** | ||
| 20 | - | ||
| 21 | - This project is intended to be executed by GitHub Actions, as Linux, Windows and | ||
| 22 | - macOS operating systems are all required. Linux is used for compiling the Linux | ||
| 23 | - modules, whereas Windows and macOS compile their modules. | ||
| 24 | - | ||
| 25 | - ### Versioning | ||
| 7 | + Provides pre-compiled LMDB native libraries for Linux, macOS and Windows. These libraries are fetched from distribution package managers (Arch Linux, Homebrew, MSYS2) and packaged into a single JAR for easy dependency resolution. | ||
| 26 | 8 | ||
| 27 | - This project uses the `major.minor.patch-qualifier` version numbering typical | ||
| 28 | - of Maven projects. The major, minor and patch directly reflect the upstream | ||
| 29 | - LMDB library version, as expressed by `lmdb.h` `MDB_VERSION_*` definitions. | ||
| 30 | - The qualifier resets to `1` on a new major, minor or patch release. | ||
| 9 | + **If you are using LMDB from Java, use the [LmdbJava](https://github.com/lmdbjava/lmdbjava) project instead.** This artifact is a dependency of LmdbJava. | ||
| 31 | 10 | ||
| 32 | - ### Repository | ||
| 11 | + Available from [Maven Central](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.lmdbjava%22%20AND%20a%3A%22native%22) and [Central Portal Snapshots](https://central.sonatype.com/repository/maven-snapshots/org/lmdbjava/native). | ||
| 33 | 12 | ||
| 34 | - [LmdbJava](https://github.com/lmdbjava/lmdbjava) shades inside its JAR all of | ||
| 35 | - the system libraries produced by this project. As such, end users typically have | ||
| 36 | - no need to refer to any artifacts produced by this project. | ||
| 13 | + ### Version Management | ||
| 37 | 14 | ||
| 38 | - ### Snapshots | ||
| 15 | + Update all dependency and plugin versions: | ||
| 16 | + ```bash | ||
| 17 | + mvn versions:update-properties | ||
| 18 | + ``` | ||
| 39 | 19 | ||
| 40 | - GitHub Actions automatically publishes snapshot releases to the | ||
| 41 | - [OSS Sonatype Snapshots Repository](https://oss.sonatype.org/content/repositories/snapshots/org/lmdbjava/lmdbjava-native-parent/). | ||
| 42 | - | ||
| 43 | - ### Support | ||
| 44 | - | ||
| 45 | - Please [open a GitHub issue](https://github.com/lmdbjava/native/issues) if you | ||
| 46 | - have any questions. | ||
| 47 | - | ||
| 48 | - ### Contributing | ||
| 49 | - | ||
| 50 | - Contributions are welcome! Please see the LmdbJava project's | ||
| 51 | - [Contributing Guidelines](https://github.com/lmdbjava/lmdbjava/blob/master/CONTRIBUTING.md). | ||
| 20 | + Update the LMDB version by editing `LMDB_VERSION` in `fetch-native-libs.sh`. | ||
| 52 | 21 | ||
| 53 | 22 | ### Releasing | |
| 54 | 23 | ||
| 55 | - Please see the [Acegi Standard Project Release Instructions](https://github.com/acegi/acegi-standard-project#performing-a-release). | ||
| 24 | + GitHub Actions will perform an official release whenever a developer executes `mvn release:clean release:prepare`. | ||
| 56 | 25 | ||
| 57 | 26 | ### License | |
| 58 | - LMDB (and this repository for simplicity) is licensed under | ||
| 59 | - [The OpenLDAP Public License](http://www.openldap.org/software/release/license.html). | ||
| 27 | + | ||
| 28 | + LMDB (and this repository for simplicity) is licensed under [The OpenLDAP Public License](http://www.openldap.org/software/release/license.html). | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,64 @@ | |||
| 1 | + #!/bin/bash | ||
| 2 | + # | ||
| 3 | + # Copyright © 2016-2025 The LmdbJava Open Source Project | ||
| 4 | + # | ||
| 5 | + # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| 6 | + # you may not use this file except in compliance with the License. | ||
| 7 | + # You may obtain a copy of the License at | ||
| 8 | + # | ||
| 9 | + # http://www.apache.org/licenses/LICENSE-2.0 | ||
| 10 | + # | ||
| 11 | + # Unless required by applicable law or agreed to in writing, software | ||
| 12 | + # distributed under the License is distributed on an "AS IS" BASIS, | ||
| 13 | + # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| 14 | + # See the License for the specific language governing permissions and | ||
| 15 | + # limitations under the License. | ||
| 16 | + # | ||
| 17 | + | ||
| 18 | + set -euo pipefail | ||
| 19 | + | ||
| 20 | + LMDB_VERSION="0.9.33" | ||
| 21 | + DEST="${DEST:-src/main/resources/org/lmdbjava/native}" | ||
| 22 | + TMP=$(mktemp -d) | ||
| 23 | + trap "rm -rf $TMP" EXIT | ||
| 24 | + | ||
| 25 | + mkdir -p "$DEST" | ||
| 26 | + | ||
| 27 | + # Arch Linux x86_64 | ||
| 28 | + if [ ! -f "$DEST/x86_64-linux-gnu.so" ]; then | ||
| 29 | + curl -sL "https://archive.archlinux.org/packages/l/lmdb/lmdb-${LMDB_VERSION}-1-x86_64.pkg.tar.zst" -o "$TMP/x64.tar.zst" | ||
| 30 | + zstd -d "$TMP/x64.tar.zst" -o "$TMP/x64.tar" | ||
| 31 | + tar xf "$TMP/x64.tar" -C "$TMP" usr/lib/liblmdb.so --strip-components=2 | ||
| 32 | + mv -f "$TMP/liblmdb.so" "$DEST/x86_64-linux-gnu.so" | ||
| 33 | + fi | ||
| 34 | + | ||
| 35 | + # Arch Linux ARM aarch64 | ||
| 36 | + if [ ! -f "$DEST/aarch64-linux-gnu.so" ]; then | ||
| 37 | + curl -sL "http://mirror.archlinuxarm.org/aarch64/extra/lmdb-${LMDB_VERSION}-1-aarch64.pkg.tar.xz" -o "$TMP/arm64.tar.xz" | ||
| 38 | + tar xf "$TMP/arm64.tar.xz" -C "$TMP" usr/lib/liblmdb.so --strip-components=2 | ||
| 39 | + mv -f "$TMP/liblmdb.so" "$DEST/aarch64-linux-gnu.so" | ||
| 40 | + fi | ||
| 41 | + | ||
| 42 | + # Homebrew macOS x86_64 | ||
| 43 | + if [ ! -f "$DEST/x86_64-macos-none.so" ]; then | ||
| 44 | + curl -sL "https://mirrors.sustech.edu.cn/homebrew-bottles/bottles/lmdb-${LMDB_VERSION}.sonoma.bottle.tar.gz" -o "$TMP/brew-x64.tar.gz" | ||
| 45 | + tar xzf "$TMP/brew-x64.tar.gz" -C "$TMP" lmdb/${LMDB_VERSION}/lib/liblmdb.dylib --strip-components=3 | ||
| 46 | + mv -f "$TMP/liblmdb.dylib" "$DEST/x86_64-macos-none.so" | ||
| 47 | + fi | ||
| 48 | + | ||
| 49 | + # Homebrew macOS arm64 | ||
| 50 | + if [ ! -f "$DEST/aarch64-macos-none.so" ]; then | ||
| 51 | + curl -sL "https://mirrors.sustech.edu.cn/homebrew-bottles/bottles/lmdb-${LMDB_VERSION}.arm64_sonoma.bottle.tar.gz" -o "$TMP/brew-arm.tar.gz" | ||
| 52 | + tar xzf "$TMP/brew-arm.tar.gz" -C "$TMP" lmdb/${LMDB_VERSION}/lib/liblmdb.dylib --strip-components=3 | ||
| 53 | + mv -f "$TMP/liblmdb.dylib" "$DEST/aarch64-macos-none.so" | ||
| 54 | + fi | ||
| 55 | + | ||
| 56 | + # MSYS2 Windows x86_64 | ||
| 57 | + if [ ! -f "$DEST/x86_64-windows-gnu.dll" ]; then | ||
| 58 | + curl -sL "https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-lmdb-${LMDB_VERSION}-1-any.pkg.tar.zst" -o "$TMP/win.tar.zst" | ||
| 59 | + zstd -d "$TMP/win.tar.zst" -o "$TMP/win.tar" | ||
| 60 | + tar xf "$TMP/win.tar" -C "$TMP" mingw64/bin/liblmdb.dll --strip-components=2 | ||
| 61 | + mv -f "$TMP/liblmdb.dll" "$DEST/x86_64-windows-gnu.dll" | ||
| 62 | + fi | ||
| 63 | + | ||
| 64 | + ls -lh "$DEST" | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments