Skip to content

Commit

Permalink
Merge remote-tracking branch 'xerial/master' into sync-3.46.0
Browse files Browse the repository at this point in the history
# Conflicts:
#	.github/workflows/ci.yml
#	VERSION
#	pom.xml
#	src/main/resources/org/sqlite/native/FreeBSD/aarch64/libsqlitejdbc.so
#	src/main/resources/org/sqlite/native/FreeBSD/x86/libsqlitejdbc.so
#	src/main/resources/org/sqlite/native/FreeBSD/x86_64/libsqlitejdbc.so
#	src/main/resources/org/sqlite/native/Linux-Android/aarch64/libsqlitejdbc.so
#	src/main/resources/org/sqlite/native/Linux-Android/arm/libsqlitejdbc.so
#	src/main/resources/org/sqlite/native/Linux-Android/x86/libsqlitejdbc.so
#	src/main/resources/org/sqlite/native/Linux-Android/x86_64/libsqlitejdbc.so
#	src/main/resources/org/sqlite/native/Linux-Musl/aarch64/libsqlitejdbc.so
#	src/main/resources/org/sqlite/native/Linux-Musl/x86/libsqlitejdbc.so
#	src/main/resources/org/sqlite/native/Linux-Musl/x86_64/libsqlitejdbc.so
#	src/main/resources/org/sqlite/native/Linux/aarch64/libsqlitejdbc.so
#	src/main/resources/org/sqlite/native/Linux/arm/libsqlitejdbc.so
#	src/main/resources/org/sqlite/native/Linux/armv6/libsqlitejdbc.so
#	src/main/resources/org/sqlite/native/Linux/armv7/libsqlitejdbc.so
#	src/main/resources/org/sqlite/native/Linux/ppc64/libsqlitejdbc.so
#	src/main/resources/org/sqlite/native/Linux/x86/libsqlitejdbc.so
#	src/main/resources/org/sqlite/native/Linux/x86_64/libsqlitejdbc.so
#	src/main/resources/org/sqlite/native/Mac/aarch64/libsqlitejdbc.dylib
#	src/main/resources/org/sqlite/native/Mac/x86_64/libsqlitejdbc.dylib
#	src/main/resources/org/sqlite/native/Windows/aarch64/sqlitejdbc.dll
#	src/main/resources/org/sqlite/native/Windows/armv7/sqlitejdbc.dll
#	src/main/resources/org/sqlite/native/Windows/x86/sqlitejdbc.dll
#	src/main/resources/org/sqlite/native/Windows/x86_64/sqlitejdbc.dll
  • Loading branch information
Willena committed Jun 8, 2024
2 parents 773c648 + 50ef887 commit e749f21
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 35 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,18 +105,18 @@ jobs:
# ARM v7
- arch: armv7
distro: ubuntu_latest
java: 11 # apt-get maven is 3.6.x, doesn't support Java 17
java: 21
# ARM 64
- arch: aarch64
distro: ubuntu_latest
java: 11 # apt-get maven is 3.6.x, doesn't support Java 17
java: 21
- arch: aarch64
distro: alpine_latest
java: 11
java: 21
# PPC64
- arch: ppc64le
distro: ubuntu_latest
java: 11 # apt-get maven is 3.6.x, doesn't support Java 17
java: 21
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -156,12 +156,13 @@ jobs:
env: |
SKIP_TEST_OSINFO: true
SKIP_TEST_MULTIARCH: true
run: |
echo "Architecture: `uname -a`"
mvn --version
export JAVA_HOME=$(dirname $(dirname $(readlink -f $(which javac))))
cd /work && make jni-header native && mvn --batch-mode --no-transfer-progress test
cd /work && make jni-header native && mvn -Dmaven.repo.local=/work/.m2/repository --batch-mode --no-transfer-progress test
# This will test the build process using an external amalgamation, as well as the
# Java tests with that native library, as some functions will not be available (extensions).
Expand Down Expand Up @@ -263,4 +264,4 @@ jobs:
# uses: EndBug/add-and-commit@v9
# with:
# message: 'chore(release): prepare next snapshot [skip ci]'
# default_author: github_actions
# default_author: github_actions
4 changes: 2 additions & 2 deletions README.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
= SQLite JDBC Driver
:project-version: 3.45.3.0
:project-version: 3.46.0.0

image:https://img.shields.io/github/actions/workflow/status/willena/sqlite-jdbc-crypt/ci.yml?branch=master[GitHub Workflow Status (branch),link=https://github.com/willena/sqlite-jdbc/actions/workflows/ci.yml?query=branch%3Amaster]
image:https://maven-badges.herokuapp.com/maven-central/io.github.willena/sqlite-jdbc/badge.svg[Maven Central,link=https://maven-badges.herokuapp.com/maven-central/io.github.willena/sqlite-jdbc/]
Expand Down Expand Up @@ -62,7 +62,7 @@ id = 2
{
public static void main(String[] args)
{
// NOTE: Connection and Statement are AutoClosable.
// NOTE: Connection and Statement are AutoCloseable.
// Don't forget to close them both in order to avoid leaks.
try
(
Expand Down
6 changes: 3 additions & 3 deletions VERSION
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
version=3.45.2
artifactVersion=3.45.2.0
sqliteMCVersion=1.8.4
version=3.46.0
artifactVersion=3.46.0.0-SNAPSHOT
sqliteMCVersion=1.8.5
2 changes: 1 addition & 1 deletion demo/Sample.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public class Sample
{
public static void main(String[] args)
{
// NOTE: Connection and Statement are AutoClosable.
// NOTE: Connection and Statement are AutoCloseable.
// Don't forget to close them both in order to avoid leaks.
try
(
Expand Down
53 changes: 31 additions & 22 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>io.github.willena</groupId>
<artifactId>sqlite-jdbc</artifactId>
<version>3.45.2.0</version>
<version>3.46.0.0-SNAPSHOT</version>
<name>SQLite JDBC</name>
<description>SQLite JDBC library with encryption and authentication support</description>
<url>https://github.com/Willena/sqlite-jdbc-crypt</url>
Expand All @@ -13,7 +13,8 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<junit.version>5.10.2</junit.version>
<surefire.version>3.2.5</surefire.version>
<graalvm.version>24.0.0</graalvm.version>
<archunit.version>1.3.0</archunit.version>
<graalvm.version>24.0.1</graalvm.version>
<java9.sourceDirectory>${project.basedir}/src/main/java9</java9.sourceDirectory>
</properties>

Expand Down Expand Up @@ -134,7 +135,7 @@

<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>3.4.0</version>
<version>3.4.1</version>
<configuration>
<!-- Pick the MANIFEST generated by the bundle plugin -->
<archive>
Expand Down Expand Up @@ -184,7 +185,7 @@
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.13</version>
<version>1.7.0</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
Expand All @@ -202,7 +203,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.4.1</version>
<version>3.5.0</version>
<executions>
<execution>
<id>enforce-maven</id>
Expand Down Expand Up @@ -279,7 +280,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.2.3</version>
<version>3.2.4</version>
<configuration>
<!-- Prevent gpg from using pinentry programs -->
<gpgArguments>
Expand All @@ -300,7 +301,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.6.3</version>
<version>3.7.0</version>
<configuration>
<sourcepath>src/main/java</sourcepath>
<additionalOptions>-Xdoclint:none</additionalOptions>
Expand Down Expand Up @@ -339,7 +340,7 @@
<plugin>
<groupId>org.graalvm.buildtools</groupId>
<artifactId>native-maven-plugin</artifactId>
<version>0.10.1</version>
<version>0.10.2</version>
<extensions>true</extensions>
<executions>
<execution>
Expand All @@ -353,15 +354,6 @@
<configuration>
<fallback>false</fallback>
<verbose>true</verbose>
<buildArgs>
<!--
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 @@ -373,13 +365,30 @@
<excludes>
<!-- Cannot run in native mode, classes under test cannot be found, class path is empty -->
<exclude>**/MultipleClassLoaderTest.java</exclude>
<!-- Not needed -->
<exclude>**/architecture/*.java</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>

<dependencies>
<dependency>
<groupId>com.tngtech.archunit</groupId>
<artifactId>archunit-junit5</artifactId>
<version>${archunit.version}</version>
<scope>test</scope>
<exclusions>
<!--
ArchUnit tests don't run in native-image tests.
Remove the ArchUnit JUnit Engine entirely from the dependency graph thus from the ServiceLoader.
-->
<exclusion>
<groupId>com.tngtech.archunit</groupId>
<artifactId>archunit-junit5-engine</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</profile>
<profile>
<id>native-exported</id>
Expand Down Expand Up @@ -425,7 +434,7 @@
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>3.25.3</version>
<version>3.26.0</version>
<scope>test</scope>
<exclusions>
<exclusion>
Expand All @@ -447,13 +456,13 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>5.11.0</version>
<version>5.12.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.tngtech.archunit</groupId>
<artifactId>archunit-junit5</artifactId>
<version>1.2.1</version>
<version>${archunit.version}</version>
<scope>test</scope>
</dependency>
<!-- Required by archunit -->
Expand Down
5 changes: 5 additions & 0 deletions src/test/java/org/sqlite/MultipleClassLoaderTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,12 @@
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledIfEnvironmentVariable;

@DisabledIfEnvironmentVariable(
named = "SKIP_TEST_MULTIARCH",
matches = "true",
disabledReason = "Those tests would fail when ran on a multi-arch image")
public class MultipleClassLoaderTest {

private Connection connection = null;
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/org/sqlite/util/OSInfoTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import org.junitpioneer.jupiter.SetSystemProperty;

@DisabledIfEnvironmentVariable(
named = "SKIP_TEST_OSINFO",
named = "SKIP_TEST_MULTIARCH",
matches = "true",
disabledReason = "Those tests would fail when ran on a musl based Linux")
@DisabledInNativeImage
Expand Down

0 comments on commit e749f21

Please sign in to comment.