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
ee51c2d
ci: switch to official GraalVM setup action
kkriske Dec 26, 2022
292ee15
refactor: store jmethodID references for callbacks
kkriske Dec 26, 2022
48f67f8
chore: update native libraries
github-actions[bot] Dec 26, 2022
be914b5
refactor: store jmethodID references for callbacks
kkriske Dec 26, 2022
e1e5466
chore: update native libraries
github-actions[bot] Dec 26, 2022
c9366e6
refactor: store jmethodID and jfieldID references on library load
kkriske Dec 26, 2022
4230aa4
refactor: store jmethodID and jfieldID references on library load
kkriske Dec 26, 2022
73baea1
chore: update native libraries
github-actions[bot] Dec 26, 2022
435a06b
refactor: store jclass in weak global ref
kkriske Dec 26, 2022
9a2df7d
chore: update native libraries
github-actions[bot] Dec 26, 2022
60bab16
refactor: store primitive jclass in non-weak ref
kkriske Dec 26, 2022
4fd66d6
refactor: accidentally used a local scoped variable
kkriske Dec 26, 2022
af210b2
chore: update native libraries
github-actions[bot] Dec 26, 2022
0b5d8cb
refactor: store jclass global reference of exception class
kkriske Dec 26, 2022
1073b86
chore: update native libraries
github-actions[bot] Dec 26, 2022
7f34d50
refactor: update GraalVM native-image configuration to fix native tes…
kkriske Dec 27, 2022
4bf413d
build(deps): bump JReleaser to 1.4.0
gotson Jan 3, 2023
3511289
docs: changelog shows breaking change description
gotson Jan 3, 2023
2e20358
docs: update README badge for CI
gotson Jan 5, 2023
b77d46f
feat: update SQLite to 3.40.1
gotson Jan 5, 2023
5c877e2
build: add 2023 url for amalgamation download
gotson Jan 5, 2023
33e0e85
ci: try to fix build native for PRs
gotson Jan 5, 2023
1fb8f7e
ci: try to fix build native for PRs
gotson Jan 5, 2023
bbeffe4
ci: try to fix build native for PRs
gotson Jan 5, 2023
2539e7b
fix(native): fixes and improvements for backup/restore
pyckle Jan 5, 2023
0781349
chore: update native libraries
github-actions[bot] Dec 26, 2022
f6735ec
refactor: remove unnecessary refetching of method id
kkriske Jan 5, 2023
119e75f
chore: update native libraries
github-actions[bot] Jan 5, 2023
dc6c400
Merge branch 'master' into fix-native-image-setup
kkriske Jan 5, 2023
80cb104
refactor: use disabled annotation instead of string reference in pom …
kkriske Jan 5, 2023
df30385
fix: rebasing/merging the base branch caused duplication of modified …
kkriske Jan 5, 2023
6e200b0
chore: update native libraries
github-actions[bot] Jan 5, 2023
47ebbed
Merge branch 'master' into fix-native-image-setup
kkriske Jan 21, 2023
d8e3ad0
ci: add GraalVM JDK 17 to native-image tests
kkriske Jan 21, 2023
fef7f86
fix(jni) add math lib to linker opts for graal native image
pyckle Jan 24, 2023
8a01398
fix(ci): properly run on the configured os of the matrix strategy
kkriske Jan 25, 2023
4788698
chore: update native libraries
github-actions[bot] Jan 25, 2023
5dd9f27
fix(jni) fix makefile linker opts to include -lm and -pthreads
Jan 28, 2023
202da6d
fix(jni) Fix Makefile to use default linker flags for x86_64
pyckle Jan 30, 2023
e345c62
chore: update native libraries
github-actions[bot] Jan 31, 2023
c3cc33d
chore: update native libraries
github-actions[bot] Feb 1, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 17 additions & 18 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
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
44 changes: 12 additions & 32 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<junit.version>5.9.1</junit.version>
<surefire.version>2.22.2</surefire.version>
<surefire.version>3.0.0-M7</surefire.version>
<java9.sourceDirectory>${project.basedir}/src/main/java9</java9.sourceDirectory>
</properties>

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.19</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,33 +367,16 @@
<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>

Expand Down
Loading