forked from xerial/sqlite-jdbc
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #50 from Willena/migrate_github_action
* Tried updating github actions file * Add CI tests for aarch64 and armv7 (xerial#658) * multiarch test * cleanup before PR * revert file * fix action version * update CI badge on README.md (xerial#661) * Switch to Temurin JDK builds as AdoptJDK has been discontinued (xerial#660) * Update Eclipse settings to use Java 8 (xerial#664) * Fix file descriptor (handle) leak when opening database fails (xerial#665) xerial#431 * Add native libs for Android arm64, x86, x86_64 via dockcross (xerial#662) * cleanup OSInfo.java with IDE suggestions * add native build for android aarch64, x86 and x86_64 * add android native builds * change native lib resolution for Android * refactor for tests in OSInfo.java * add missing test scope for mockito dep * add new targets to native-all * Use more specific types instead of String when fetching JDBC3ResultSet.getBigDecimal (xerial#666) * detect musl by checking /proc/self/map_files (xerial#675) * detect musl by checking /proc/self/map_files * spotless:apply * Update src/main/java/org/sqlite/util/OSInfo.java Co-authored-by: Roman Parshikov <[email protected]> * spotless:apply Co-authored-by: Roman Parshikov <[email protected]> * let's start by testsing ;) * Let's try building natives * Add missing packages * Another try * Maximise build space :) * in fact might not be needed. Just removing dirs ! * Removed freebsd32 freebsd64 freebsd-arm64 temporarily * Add missing Linux-aarch64 def * Updated compile option for Android x86 and Android x64 * Added Package target and build binary zip ! * Now download specific SQLite3MC versions * Updated existing "quick" tests * Revert removing dependency in pom.xml * Fixing build with theses changes ? * Revert version upgrades in pom.xml * Fixed CI errors (windows build) * Small fix for strip * Moved to curl as it works best * Removed outdated version of OSInfo.class; Updated Makefile.common to rebuild it if missing. * Applied spotless fixes * Upgrade SQLite3MC to 1.3.4 - 3.36.0 * Configured credentials for auto-deploy Co-authored-by: Gauthier <[email protected]> Co-authored-by: Carl Dea <[email protected]> Co-authored-by: Taro L. Saito <[email protected]> Co-authored-by: Andy-2639 <[email protected]> Co-authored-by: Andrey.Tarashevskiy <[email protected]> Co-authored-by: Roman Parshikov <[email protected]>
- Loading branch information
Showing
32 changed files
with
2,559 additions
and
1,316 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
name: build | ||
on: | ||
workflow_dispatch: | ||
push: | ||
tags: | ||
- '*.*.*' | ||
|
||
jobs: | ||
build_natives: | ||
permissions: | ||
contents: write | ||
name: Build natives libraries | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Make space | ||
run: sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc | ||
|
||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-java@v2 | ||
with: | ||
distribution: 'adopt' | ||
java-version: 11 | ||
java-package: jdk | ||
cache: 'maven' | ||
- name: Source versions from VERSION file | ||
run: cat VERSION >> $GITHUB_ENV | ||
|
||
- name: Display version | ||
run: echo $sqliteMCVersion $version $artifactVersion | ||
|
||
- name: Build binaries, test, and package | ||
run: make all | ||
- name: Package DLL binaries | ||
run: zip -r ./sqlite-natives-$artifactVersion.zip ./src/main/resources/org/sqlite/native | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: SQLiteMC DLL Binaries | ||
path: | | ||
./sqlite-natives-${{ env.artifactVersion }}.zip | ||
./target/*.jar | ||
- name: Prepare GPG sign | ||
if: startsWith(github.ref, 'refs/tags/') | ||
run: | | ||
openssl aes-256-cbc -K ${{ secrets.ENCRYPTED_KEY }} -iv ${{ secrets.ENCRYPTED_IV }} -in ./scripts/private.key.enc -out /tmp/private.key -d | ||
gpg --version | ||
gpg --batch --import /tmp/private.key | ||
rm /tmp/private.key | ||
- name: Deploy version | ||
env: | ||
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | ||
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | ||
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | ||
if: startsWith(github.ref, 'refs/tags/') | ||
run: make deploy | ||
- name: Deploy Release | ||
uses: softprops/action-gh-release@v1 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
name: "SQLite-jdbc-${{ env.artifactVersion }}" | ||
generate_release_notes: true | ||
files: | | ||
./sqlite-natives-${{ env.artifactVersion }}.zip | ||
./target/sqlite-jdbc-${{ env.artifactVersion }}.jar" | ||
./target/sqlite-jdbc-${{ env.artifactVersion }}-javadoc.jar" | ||
./target/sqlite-jdbc-${{ env.artifactVersion }}-sources.jar" | ||
./target/sqlite-jdbc-${{ env.artifactVersion }}.jar.asc" | ||
./target/sqlite-jdbc-${{ env.artifactVersion }}-javadoc.jar.asc" | ||
./target/sqlite-jdbc-${{ env.artifactVersion }}-sources.jar.asc" | ||
./sqlite-natives-${{env.artifactVersion }}.zip" | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,8 +39,8 @@ jobs: | |
name: test ${{ matrix.os }} jdk${{ matrix.java }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
java: [8, 11, 16] | ||
os: [ ubuntu-latest, windows-latest, macos-latest ] | ||
java: [ 8, 11, 16 ] | ||
exclude: | ||
- os: windows-latest | ||
java: 11 | ||
|
@@ -55,10 +55,25 @@ jobs: | |
- uses: actions/checkout@v2 | ||
- uses: actions/setup-java@v2 | ||
with: | ||
distribution: 'adopt' | ||
distribution: 'temurin' | ||
java-version: ${{ matrix.java }} | ||
java-package: jdk | ||
cache: 'maven' | ||
|
||
- name: Install tools for windows | ||
if: matrix.os == 'windows-latest' | ||
run: | | ||
choco install wget --no-progress | ||
- name: Source versions from VERSION file | ||
run: cat VERSION >> $GITHUB_ENV | ||
|
||
- name: Display version | ||
run: echo $sqliteMCVersion $version $artifactVersion | ||
|
||
- name: Build natives | ||
run: make jni-header native | ||
|
||
- name: Test | ||
run: mvn test | ||
|
||
|
@@ -78,5 +93,59 @@ jobs: | |
- name: Install native-image component | ||
run: | | ||
gu install native-image | ||
- name: Source versions from VERSION file | ||
run: cat VERSION >> $GITHUB_ENV | ||
|
||
- name: Display version | ||
run: echo $sqliteMCVersion $version $artifactVersion | ||
|
||
- name: Build natives | ||
run: make jni-header native | ||
|
||
- name: Test | ||
run: mvn -Pnative test | ||
|
||
test_multiarch: | ||
name: test ${{ matrix.arch }} ${{ matrix.distro }} jdk${{ matrix.java }} | ||
strategy: | ||
matrix: | ||
# armv6 cannot install the JDK properly via apt-get on Debian | ||
arch: [ armv7, aarch64 ] | ||
# no point adding Alpine, as we only have x86_64 binaries for it | ||
distro: [ ubuntu20.04 ] | ||
# cannot add Java 16, maven installed by apt-get is 3.6.x and does not support Java 16 | ||
# use only java 11, so we don't run too many CI jobs | ||
java: [ 11 ] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: uraimo/[email protected] | ||
name: Test | ||
with: | ||
arch: ${{ matrix.arch }} | ||
distro: ${{ matrix.distro }} | ||
|
||
# Not required, but speeds up builds | ||
githubToken: ${{ github.token }} | ||
|
||
# Install some dependencies in the container. This speeds up builds if | ||
# you are also using githubToken. Any dependencies installed here will | ||
# be part of the container image that gets cached, so subsequent | ||
# builds don't have to re-install them. The image layer is cached | ||
# publicly in your project's package repository, so it is vital that | ||
# no secrets are present in the container state or logs. | ||
install: | | ||
apt-get update -y | ||
apt-get install -y openssl ca-certificates maven openjdk-${{ matrix.java }}-jdk build-essential curl bash jq wget unzip curl gnupg | ||
# We use the Github Action user, 1001:121, so that maven can access | ||
# the /work directory and create target/classes | ||
dockerRunArgs: | | ||
--volume "${PWD}:/work" | ||
--user 1001:121 | ||
run: | | ||
echo "Architecture: `uname -a`" | ||
mvn --version | ||
cd /work && make jni-header native && mvn test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
#Thu Apr 28 10:35:24 JST 2011 | ||
eclipse.preferences.version=1 | ||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled | ||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 | ||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 | ||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve | ||
org.eclipse.jdt.core.compiler.compliance=1.5 | ||
org.eclipse.jdt.core.compiler.compliance=1.8 | ||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate | ||
org.eclipse.jdt.core.compiler.debug.localVariable=generate | ||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate | ||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error | ||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error | ||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning | ||
org.eclipse.jdt.core.compiler.source=1.5 | ||
org.eclipse.jdt.core.compiler.source=1.8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.