Skip to content

Commit 3828f97

Browse files
committed
GitHub Actions: add test for java.sh defining WOLFJNI_USE_IO_SELECT (non default)
1 parent 4310544 commit 3828f97

2 files changed

Lines changed: 25 additions & 1 deletion

File tree

.github/workflows/linux-common.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ on:
1515
wolfssl_configure:
1616
required: true
1717
type: string
18+
javash_cflags:
19+
required: false
20+
type: string
1821

1922
jobs:
2023
build_wolfssljni:
@@ -51,7 +54,7 @@ jobs:
5154
echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$GITHUB_WORKSPACE/build-dir/lib" >> "$GITHUB_ENV"
5255
5356
- name: Build JNI library
54-
run: ./java.sh $GITHUB_WORKSPACE/build-dir
57+
run: CFLAGS=${{ inputs.javah_cflags }} ./java.sh $GITHUB_WORKSPACE/build-dir
5558
- name: Build JAR (ant)
5659
run: ant
5760
- name: Run Java tests (ant test)

.github/workflows/main.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,27 @@ jobs:
120120
jdk_version: ${{ matrix.jdk_version }}
121121
wolfssl_configure: ${{ matrix.wolfssl_configure }}
122122

123+
# -------------------- WOLFJNI_USE_IO_SELECT sanity check --------------------
124+
# Only check one Linux and Mac JDK version as a sanity check.
125+
# Using Zulu, but this can be expanded if needed.
126+
linux-zulu-ioselect:
127+
strategy:
128+
matrix:
129+
os: [ 'ubuntu-latest', 'macos-latest' ]
130+
jdk_version: [ '11' ]
131+
wolfssl_configure: [
132+
'--enable-jni',
133+
]
134+
javash_cflags: [ '-DWOLFJNI_USE_IO_SELECT' ]
135+
name: ${{ matrix.os }} (Zulu JDK ${{ matrix.jdk_version }}, ${{ matrix.wolfssl_configure}}, ${{ matrix.javash_cflags }})
136+
uses: ./.github/workflows/linux-common.yml
137+
with:
138+
os: ${{ matrix.os }}
139+
jdk_distro: "zulu"
140+
jdk_version: ${{ matrix.jdk_version }}
141+
wolfssl_configure: ${{ matrix.wolfssl_configure }}
142+
javash_cflags: ${{ matrix.javash_cflags }}
143+
123144
# ------------------ Facebook Infer static analysis -------------------
124145
# Run Facebook infer over PR code, only running on Linux with one
125146
# JDK/version for now.

0 commit comments

Comments
 (0)