From db057a8b695ac3b8ff0b283c7781a84314904854 Mon Sep 17 00:00:00 2001 From: Gauthier Roebroeck Date: Mon, 29 Apr 2024 15:15:51 +0800 Subject: [PATCH] ci: fix failing multi-arch --- .github/workflows/ci.yml | 12 ++++++------ .../java/org/sqlite/MultipleClassLoaderTest.java | 5 +++++ src/test/java/org/sqlite/util/OSInfoTest.java | 2 +- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7d4f7a48b..dbc4a1ed8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -94,18 +94,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 @@ -143,12 +143,12 @@ jobs: --user 1001:121 env: | - SKIP_TEST_OSINFO: true + SKIP_TEST_MULTIARCH: true run: | echo "Architecture: `uname -a`" mvn --version - cd /work && mvn --batch-mode --no-transfer-progress test + cd /work && 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). diff --git a/src/test/java/org/sqlite/MultipleClassLoaderTest.java b/src/test/java/org/sqlite/MultipleClassLoaderTest.java index 54287a5a1..d3efde6e9 100644 --- a/src/test/java/org/sqlite/MultipleClassLoaderTest.java +++ b/src/test/java/org/sqlite/MultipleClassLoaderTest.java @@ -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; diff --git a/src/test/java/org/sqlite/util/OSInfoTest.java b/src/test/java/org/sqlite/util/OSInfoTest.java index 5e8befa8e..9ff64be68 100644 --- a/src/test/java/org/sqlite/util/OSInfoTest.java +++ b/src/test/java/org/sqlite/util/OSInfoTest.java @@ -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