Skip to content

Commit a5d98ca

Browse files
committed
Create the stub options.h android README documents and find ndk-build
1 parent 66cc28c commit a5d98ca

1 file changed

Lines changed: 18 additions & 2 deletions

File tree

.github/workflows/cross-build.yml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,14 +229,30 @@ jobs:
229229
distribution: temurin
230230
java-version: '17'
231231

232+
# android/README.md step 3: wolfSSL release tarballs ship wolfssl/options.h
233+
# but a GitHub clone does not, and the jni sources include it.
234+
- name: Create the stub options.h the README documents
235+
run: |
236+
set -euo pipefail
237+
cd '${{ matrix.example }}'
238+
if [ -f wolfssl/wolfssl/options.h.in ] && [ ! -f wolfssl/wolfssl/options.h ]; then
239+
cp wolfssl/wolfssl/options.h.in wolfssl/wolfssl/options.h
240+
echo "created wolfssl/wolfssl/options.h"
241+
fi
242+
232243
# These are Studio projects with no instrumentation harness, so a build is
233244
# the honest ceiling.
234245
- name: Build ${{ matrix.example }}
235246
run: |
236247
set -euo pipefail
237248
cd '${{ matrix.example }}'
238-
if [ -f gradlew ]; then chmod +x gradlew; ./gradlew assembleDebug --no-daemon; \
239-
else ndk-build || { echo "no gradlew and ndk-build failed"; exit 1; }; fi
249+
if [ -f gradlew ]; then
250+
chmod +x gradlew
251+
./gradlew assembleDebug --no-daemon
252+
else
253+
# the older standalone-toolchain sample: Android.mk + ndk-build
254+
"${ANDROID_NDK_HOME:-$ANDROID_NDK_ROOT}/ndk-build"
255+
fi
240256
241257
- name: Assert an apk or .so came out
242258
run: |

0 commit comments

Comments
 (0)