Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/Destrolaric/sqlite-jdbc i…
Browse files Browse the repository at this point in the history
…nto add_metadata_read_for_attached_db

� Conflicts:
�	src/main/java/org/sqlite/jdbc3/JDBC3DatabaseMetaData.java
�	src/test/java/org/sqlite/DBMetaDataTest.java
  • Loading branch information
Destrolaric committed Apr 18, 2023
2 parents 1313587 + d0adb0f commit 79fa812
Show file tree
Hide file tree
Showing 56 changed files with 677 additions and 491 deletions.
2 changes: 0 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ updates:
# Maintain dependencies for maven (pom.xml in root directory)
- package-ecosystem: "maven"
directory: "/"
# disable PRs, only security updates will create PRs
open-pull-requests-limit: 0
schedule:
interval: "weekly"

Expand Down
37 changes: 18 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,24 +64,23 @@ jobs:
- name: Test
run: mvn --batch-mode --no-transfer-progress test

# test_graalvm:
# name: test ubuntu-latest jdk11 GraalVM native-image
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - uses: DeLaGuardo/setup-graalvm@master
# with:
# # GraalVM version, no pattern syntax available atm
# graalvm: '21.0.0.2'
# # Java version, optional, defaults to 'java8'. Available options are 'java8' and 'java11'.
# java: 'java11'
# # Architecture flag, optional, defaults to 'amd64'. Available options are 'amd64' and 'aarch64'. Later is available only for linux runners.
# arch: 'amd64'
# - name: Install native-image component
# run: |
# gu install native-image
# - name: Test
# run: mvn --batch-mode --no-transfer-progress -P native test
test_graalvm:
name: test ${{ matrix.os }} jdk${{ matrix.java }} GraalVM native-image
strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
java: [ 11, 17 ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: graalvm/setup-graalvm@v1
with:
version: '22.3.0'
java-version: ${{ matrix.java }}
components: 'native-image'
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Test
run: mvn --batch-mode --no-transfer-progress -P native test

test_multiarch:
name: test ${{ matrix.arch }} ${{ matrix.distro }} jdk${{ matrix.java }}
Expand Down Expand Up @@ -175,7 +174,7 @@ jobs:

release:
name: Deploy
needs: [ lint, test, test_multiarch, test_external_amalgamation ]
needs: [ lint, test, test_multiarch, test_external_amalgamation, test_graalvm ]
if: github.repository_owner == 'xerial' && github.ref == 'refs/heads/master' # only perform on latest master
runs-on: ubuntu-latest
steps:
Expand Down
22 changes: 11 additions & 11 deletions Makefile.common
Original file line number Diff line number Diff line change
Expand Up @@ -63,77 +63,77 @@ CROSS_PREFIX :=
Default_CC := $(CROSS_PREFIX)gcc
Default_STRIP := $(CROSS_PREFIX)strip
Default_CCFLAGS := -I$(JAVA_HOME)/include -Ilib/inc_linux -Os -fPIC -fvisibility=hidden
Default_LINKFLAGS := -shared
Default_LINKFLAGS := -shared -static-libgcc -pthread -lm
Default_LIBNAME := libsqlitejdbc.so
Default_SQLITE_FLAGS :=

Linux-x86_CC := $(CROSS_PREFIX)gcc
Linux-x86_STRIP := $(CROSS_PREFIX)strip
Linux-x86_CCFLAGS := -I$(JAVA_HOME)/include -Ilib/inc_linux -Os -fPIC -m32 -fvisibility=hidden
Linux-x86_LINKFLAGS := -shared -static-libgcc
Linux-x86_LINKFLAGS := $(Default_LINKFLAGS)
Linux-x86_LIBNAME := libsqlitejdbc.so
Linux-x86_SQLITE_FLAGS :=

Linux-x86_64_CC := $(CROSS_PREFIX)gcc
Linux-x86_64_STRIP := $(CROSS_PREFIX)strip
Linux-x86_64_CCFLAGS := -Ilib/inc_linux -I$(JAVA_HOME)/include -Os -fPIC -m64 -fvisibility=hidden
Linux-x86_64_LINKFLAGS := -shared -static-libgcc
Linux-x86_64_LINKFLAGS := $(Default_LINKFLAGS)
Linux-x86_64_LIBNAME := libsqlitejdbc.so
Linux-x86_64_SQLITE_FLAGS :=

Linux-arm_CC := $(CROSS_PREFIX)gcc
Linux-arm_STRIP := $(CROSS_PREFIX)strip
Linux-arm_CCFLAGS := -I$(JAVA_HOME)/include -Ilib/inc_linux -Os -fPIC -mfloat-abi=soft -fvisibility=hidden
Linux-arm_LINKFLAGS := -shared -static-libgcc
Linux-arm_LINKFLAGS := $(Default_LINKFLAGS)
Linux-arm_LIBNAME := libsqlitejdbc.so
Linux-arm_SQLITE_FLAGS :=

Linux-armv6_CC := $(CROSS_PREFIX)gcc
Linux-armv6_STRIP := $(CROSS_PREFIX)strip
Linux-armv6_CCFLAGS := -I$(JAVA_HOME)/include -Ilib/inc_linux -Os -mfloat-abi=hard -mfpu=vfp -fPIC -fvisibility=hidden
Linux-armv6_LINKFLAGS := -shared -static-libgcc
Linux-armv6_LINKFLAGS := $(Default_LINKFLAGS)
Linux-armv6_LIBNAME := libsqlitejdbc.so
Linux-armv6_SQLITE_FLAGS :=

Linux-armv7_CC := $(CROSS_PREFIX)gcc
Linux-armv7_STRIP := $(CROSS_PREFIX)strip
Linux-armv7_CCFLAGS := -I$(JAVA_HOME)/include -Ilib/inc_linux -Os -mfloat-abi=hard -mfpu=vfp -fPIC -fvisibility=hidden
Linux-armv7_LINKFLAGS := -shared -static-libgcc
Linux-armv7_LINKFLAGS := $(Default_LINKFLAGS)
Linux-armv7_LIBNAME := libsqlitejdbc.so
Linux-armv7_SQLITE_FLAGS :=

Linux-Android-arm_CC := $(CROSS_PREFIX)clang
Linux-Android-arm_STRIP := $(CROSS_ROOT)/bin/llvm-strip
Linux-Android-arm_CCFLAGS := -I$(JAVA_HOME)/include -Ilib/inc_linux -I$(CROSS_ROOT)/sysroot/usr/include -Os -fPIC -fvisibility=hidden -fPIE -pie -lm -lc -landroid -ldl -llog
Linux-Android-arm_LINKFLAGS := -shared -static-libgcc
Linux-Android-arm_LINKFLAGS := $(Default_LINKFLAGS)
Linux-Android-arm_LIBNAME := libsqlitejdbc.so
Linux-Android-arm_SQLITE_FLAGS :=

Linux-Android-aarch64_CC := $(CROSS_PREFIX)clang
Linux-Android-aarch64_STRIP := $(CROSS_ROOT)/bin/llvm-strip
Linux-Android-aarch64_CCFLAGS := -I$(JAVA_HOME)/include -Ilib/inc_linux -I$(CROSS_ROOT)/sysroot/usr/include -Os -fPIC -fvisibility=hidden -fPIE -pie -lm -lc -landroid -ldl -llog
Linux-Android-aarch64_LINKFLAGS := -shared -static-libgcc
Linux-Android-aarch64_LINKFLAGS := $(Default_LINKFLAGS)
Linux-Android-aarch64_LIBNAME := libsqlitejdbc.so
Linux-Android-aarch64_SQLITE_FLAGS :=

Linux-Android-x86_CC := $(CROSS_PREFIX)clang
Linux-Android-x86_STRIP := $(CROSS_ROOT)/bin/llvm-strip
Linux-Android-x86_CCFLAGS := -I$(JAVA_HOME)/include -Ilib/inc_linux -I$(CROSS_ROOT)/sysroot/usr/include -Os -fPIC -fvisibility=hidden -fPIE -pie -lm -lc -landroid -ldl -llog
Linux-Android-x86_LINKFLAGS := -shared -static-libgcc
Linux-Android-x86_LINKFLAGS := $(Default_LINKFLAGS)
Linux-Android-x86_LIBNAME := libsqlitejdbc.so
Linux-Android-x86_SQLITE_FLAGS :=

Linux-Android-x86_64_CC := $(CROSS_PREFIX)clang
Linux-Android-x86_64_STRIP := $(CROSS_ROOT)/bin/llvm-strip
Linux-Android-x86_64_CCFLAGS := -I$(JAVA_HOME)/include -Ilib/inc_linux -I$(CROSS_ROOT)/sysroot/usr/include -Os -fPIC -fvisibility=hidden -fPIE -pie -lm -lc -landroid -ldl -llog
Linux-Android-x86_64_LINKFLAGS := -shared -static-libgcc
Linux-Android-x86_64_LINKFLAGS := $(Default_LINKFLAGS)
Linux-Android-x86_64_LIBNAME := libsqlitejdbc.so
Linux-Android-x86_64_SQLITE_FLAGS :=

Linux-ppc64_CC := $(CROSS_PREFIX)gcc
Linux-ppc64_STRIP := $(CROSS_PREFIX)strip
Linux-ppc64_CCFLAGS := -I$(JAVA_HOME)/include -Ilib/inc_linux -Os -fPIC -fvisibility=hidden
Linux-ppc64_LINKFLAGS := -shared -static-libgcc
Linux-ppc64_LINKFLAGS := $(Default_LINKFLAGS)
Linux-ppc64_LIBNAME := libsqlitejdbc.so
Linux-ppc64_SQLITE_FLAGS :=

Expand Down
3 changes: 1 addition & 2 deletions VERSION
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
version=3.40.1

version=3.41.2
5 changes: 5 additions & 0 deletions jreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ release:
- label: 'chore'
title: '[maven-release-plugin] prepare'
order: 1
- label: 'perf'
title: 'regex:^(?:perf(?:\(.*\))?!?):\s.*'
order: 120
categories:
- title: '🏎 Perf'
key: 'perf'
Expand All @@ -29,6 +32,8 @@ release:
- '[bot]'
- 'github-actions'
- 'GitHub'
extraProperties:
categorizeScopes: true
issues:
enabled: true
comment: '🎉 This issue has been resolved in `{{tagName}}` ([Release Notes]({{releaseNotesUrl}}))'
Expand Down
78 changes: 26 additions & 52 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.xerial</groupId>
<artifactId>sqlite-jdbc</artifactId>
<version>3.40.1.0-SNAPSHOT</version>
<version>3.41.2.2-SNAPSHOT</version>
<name>SQLite JDBC</name>
<description>SQLite JDBC library</description>
<url>https://github.com/xerial/sqlite-jdbc</url>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<junit.version>5.9.1</junit.version>
<surefire.version>2.22.2</surefire.version>
<junit.version>5.9.2</junit.version>
<surefire.version>3.0.0</surefire.version>
<java9.sourceDirectory>${project.basedir}/src/main/java9</java9.sourceDirectory>
</properties>

Expand Down Expand Up @@ -93,13 +93,13 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-help-plugin</artifactId>
<version>3.3.0</version>
<version>3.4.0</version>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.10.1</version>
<version>3.11.0</version>
<configuration>
<release>8</release>
</configuration>
Expand Down Expand Up @@ -190,7 +190,7 @@
<plugin>
<groupId>org.jreleaser</groupId>
<artifactId>jreleaser-maven-plugin</artifactId>
<version>1.4.0</version>
<version>1.5.1</version>
<configuration>
<configFile>jreleaser.yml</configFile>
</configuration>
Expand All @@ -199,13 +199,13 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<version>2.13.0</version>
<version>2.15.0</version>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.1.0</version>
<version>3.3.0</version>
<executions>
<execution>
<id>enforce-maven</id>
Expand Down Expand Up @@ -297,7 +297,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.4.1</version>
<version>3.5.0</version>
<configuration>
<sourcepath>src/main/java</sourcepath>
<additionalOptions>-Xdoclint:none</additionalOptions>
Expand Down Expand Up @@ -336,7 +336,8 @@
<plugin>
<groupId>org.graalvm.buildtools</groupId>
<artifactId>native-maven-plugin</artifactId>
<version>0.9.3</version>
<version>0.9.21</version>
<extensions>true</extensions>
<executions>
<execution>
<id>test-native</id>
Expand All @@ -345,22 +346,18 @@
</goals>
<phase>test</phase>
</execution>
<execution>
<id>build-native</id>
<goals>
<goal>build</goal>
</goals>
<phase>package</phase>
</execution>
</executions>
<configuration>
<imageName>sqlite-jdbc-osinfo</imageName>
<mainClass>org.sqlite.util.OSInfo</mainClass>
<fallback>false</fallback>
<verbose>true</verbose>
<buildArgs>
<buildArg>--no-fallback</buildArg>
<buildArg>--verbose</buildArg>
<buildArg>--enable-url-protocols=jar</buildArg>
<buildArg>--report-unsupported-elements-at-runtime</buildArg>
<!--
ArchUnit tests don't run in native-image tests.
Remove the ArchUnit JUnit Engine from the ServiceLoader.
-->
<buildArg>
-H:ServiceLoaderFeatureExcludeServiceProviders=com.tngtech.archunit.junit.internal.ArchUnitTestEngine
</buildArg>
</buildArgs>
</configuration>
</plugin>
Expand All @@ -370,78 +367,55 @@
<artifactId>maven-surefire-plugin</artifactId>
<version>${surefire.version}</version>
<configuration>
<!-- If enabled, will run the GraalVM tracing agent while running tests -->
<!-- <argLine>-agentlib:native-image-agent=config-output-dir=META-INF/native-image</argLine>-->
<excludes>
<!-- Cannot run in native mode, classes under test cannot be found, class path is empty -->
<exclude>**/MultipleClassLoaderTest.java</exclude>
<!-- java.lang.NoSuchMethodError: org.sqlite.BusyHandlerTest$1.callback(I)I -->
<exclude>**/BusyHandlerTest</exclude>
<!-- java.sql.SQLException: Out of memory from JNI org.sqlite.core.NativeDB.throwex(NativeDB.java:510) -->
<include>**/RSMetaDataTest</include>
<!-- SegFault -->
<exclude>**/UDFCustomErrorTest.java</exclude>
<!-- Not needed -->
<exclude>**/architecture/*.java</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<!-- Can be removed once JUnit 5.8 is used -->
<dependency>
<groupId>org.graalvm.buildtools</groupId>
<artifactId>junit-platform-native</artifactId>
<version>0.9.3</version>
<scope>test</scope>
</dependency>
</dependencies>
</profile>
</profiles>

<dependencies>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<artifactId>junit-jupiter</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>3.23.1</version>
<version>3.24.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit-pioneer</groupId>
<artifactId>junit-pioneer</artifactId>
<version>1.7.1</version>
<version>2.0.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>4.8.1</version>
<version>5.3.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.tngtech.archunit</groupId>
<artifactId>archunit-junit5</artifactId>
<version>1.0.0</version>
<version>1.0.1</version>
<scope>test</scope>
</dependency>
<!-- Required by archunit -->
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.3.4</version>
<version>1.4.6</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
Loading

0 comments on commit 79fa812

Please sign in to comment.