Skip to content

Commit c7b54a2

Browse files
committed
ci: expand multiarch test to arm64/alpine and ppc64/ubuntu
1 parent 50c0458 commit c7b54a2

File tree

2 files changed

+33
-9
lines changed

2 files changed

+33
-9
lines changed

.github/workflows/test.yml

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,22 @@ jobs:
8181
name: test ${{ matrix.arch }} ${{ matrix.distro }} jdk${{ matrix.java }}
8282
strategy:
8383
matrix:
84-
# armv6 cannot install the JDK properly via apt-get on Debian
85-
arch: [ armv7, aarch64 ]
86-
# no point adding Alpine, as we only have x86_64 binaries for it
87-
distro: [ ubuntu20.04 ]
88-
# cannot add Java 16, maven installed by apt-get is 3.6.x and does not support Java 16
89-
# use only java 11, so we don't run too many CI jobs
90-
java: [ 11 ]
84+
include:
85+
# ARM v7
86+
- arch: armv7
87+
distro: ubuntu_latest
88+
java: 11 # apt-get maven is 3.6.x, doesn't support Java 17
89+
# ARM 64
90+
- arch: aarch64
91+
distro: ubuntu_latest
92+
java: 11 # apt-get maven is 3.6.x, doesn't support Java 17
93+
- arch: aarch64
94+
distro: alpine_latest
95+
java: 11
96+
# PPC64
97+
- arch: ppc64le
98+
distro: ubuntu_latest
99+
java: 11 # apt-get maven is 3.6.x, doesn't support Java 17
91100
runs-on: ubuntu-latest
92101
steps:
93102
- uses: actions/checkout@v3
@@ -107,15 +116,26 @@ jobs:
107116
# publicly in your project's package repository, so it is vital that
108117
# no secrets are present in the container state or logs.
109118
install: |
110-
apt-get update -q -y
111-
apt-get install -q -y maven openjdk-${{ matrix.java }}-jdk
119+
case "${{ matrix.distro }}" in
120+
ubuntu*|jessie|stretch|buster|bullseye)
121+
apt-get update -q -y
122+
apt-get install -q -y maven openjdk-${{ matrix.java }}-jdk
123+
;;
124+
alpine*)
125+
apk update
126+
apk add maven openjdk${{ matrix.java }}
127+
;;
128+
esac
112129
113130
# We use the Github Action user, 1001:121, so that maven can access
114131
# the /work directory and create target/classes
115132
dockerRunArgs: |
116133
--volume "${PWD}:/work"
117134
--user 1001:121
118135
136+
env: |
137+
SKIP_TEST_OSINFO: true
138+
119139
run: |
120140
echo "Architecture: `uname -a`"
121141
mvn --version

src/test/java/org/sqlite/util/OSInfoTest.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@
2424
import org.junit.jupiter.api.condition.DisabledIfEnvironmentVariable;
2525
import org.junitpioneer.jupiter.SetSystemProperty;
2626

27+
@DisabledIfEnvironmentVariable(
28+
named = "SKIP_TEST_OSINFO",
29+
matches = "true",
30+
disabledReason = "Those tests would fail when ran on a musl based Linux")
2731
public class OSInfoTest {
2832
private static final Logger logger = Logger.getLogger(OSInfoTest.class.getName());
2933

0 commit comments

Comments
 (0)