diff --git a/.github/workflows/linux-common.yml b/.github/workflows/linux-common.yml index 75d987ea..05a9577a 100644 --- a/.github/workflows/linux-common.yml +++ b/.github/workflows/linux-common.yml @@ -15,6 +15,9 @@ on: wolfssl_configure: required: true type: string + javash_cflags: + required: false + type: string jobs: build_wolfssljni: @@ -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) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 64236be0..aeb2d4a6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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.