Skip to content

Commit

Permalink
GitHub Actions: add test for java.sh defining WOLFJNI_USE_IO_SELECT (…
Browse files Browse the repository at this point in the history
…non default)
  • Loading branch information
cconlon committed Jan 2, 2025
1 parent 9aa5fe4 commit 3bdea1a
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/linux-common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ on:
wolfssl_configure:
required: true
type: string
javash_cflags:
required: false
type: string

jobs:
build_wolfssljni:
Expand Down Expand Up @@ -51,7 +54,7 @@ jobs:
echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$GITHUB_WORKSPACE/build-dir/lib" >> "$GITHUB_ENV"
- name: Build JNI library
run: ./java.sh $GITHUB_WORKSPACE/build-dir
run: CFLAGS=${{ inputs.javah_cflags }} ./java.sh $GITHUB_WORKSPACE/build-dir
- name: Build JAR (ant)
run: ant
- name: Run Java tests (ant test)
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,27 @@ jobs:
jdk_version: ${{ matrix.jdk_version }}
wolfssl_configure: ${{ matrix.wolfssl_configure }}

# -------------------- WOLFJNI_USE_IO_SELECT sanity check --------------------
# Only check one Linux and Mac JDK version as a sanity check.
# Using Zulu, but this can be expanded if needed.
linux-zulu-sesscache:
strategy:
matrix:
os: [ 'ubuntu-latest', 'macos-latest' ]
jdk_version: [ '11' ]
wolfssl_configure: [
'--enable-jni',
]
javash_cflags: [ '-DWOLFJNI_USE_IO_SELECT' ]
name: ${{ matrix.os }} (Zulu JDK ${{ matrix.jdk_version }}, ${{ matrix.wolfssl_configure}}, ${{ matrix.javash_cflags }})
uses: ./.github/workflows/linux-common.yml
with:
os: ${{ matrix.os }}
jdk_distro: "zulu"
jdk_version: ${{ matrix.jdk_version }}
wolfssl_configure: ${{ matrix.wolfssl_configure }}
javash_cflags: ${{ matrix.javash_cflags }}

# ------------------ Facebook Infer static analysis -------------------
# Run Facebook infer over PR code, only running on Linux with one
# JDK/version for now.
Expand Down

0 comments on commit 3bdea1a

Please sign in to comment.