Skip to content

Commit 77c88d4

Browse files
committed
Build fullstack, java and rt1060 instead of skipping them
1 parent 5f2f55e commit 77c88d4

3 files changed

Lines changed: 129 additions & 7 deletions

File tree

.github/examples-manifest.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1121,8 +1121,7 @@ examples:
11211121
path: RT1060
11221122
tier: cross
11231123
profile: all
1124-
mode: skip
1125-
reason: "needs the NXP MCUXpresso SDK, which README.md says to generate by hand from mcuxpresso.nxp.com; not fetchable in CI"
1124+
mode: build-only
11261125
- id: puf
11271126
path: puf
11281127
tier: cross
@@ -1152,8 +1151,7 @@ examples:
11521151
path: fullstack/freertos-wolfip-wolfssl-https
11531152
tier: cross
11541153
profile: all
1155-
mode: skip
1156-
reason: "wants wolfssl and wolfip checked out as repo siblings (src/https_server.h hardcodes ../../../../wolfssl/certs); no job wired yet"
1154+
mode: build-only
11571155
- id: android-wolfcryptjni
11581156
path: android/wolfcryptjni-ndk-gradle
11591157
tier: cross
@@ -1253,8 +1251,7 @@ examples:
12531251
path: java/https-url
12541252
tier: cross
12551253
profile: default
1256-
mode: skip
1257-
reason: "plain javac against wolfssljni; needs the wolfssljni jar + JNI lib built first, not wired yet"
1254+
mode: build-only
12581255
build: none
12591256

12601257
- id: kernel-bsdkm

.github/scripts/manifest.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,10 @@ def job_built_paths():
108108
for sk in matrix.get("sketch") or []:
109109
paths.add("Arduino/sketches/" + sk)
110110
# jobs that build one hardcoded dir rather than a matrix
111-
for job, path in (("puf", "puf"), ("rpi-pico", "RPi-Pico")):
111+
for job, path in (("puf", "puf"), ("rpi-pico", "RPi-Pico"),
112+
("fullstack", "fullstack/freertos-wolfip-wolfssl-https"),
113+
("java", "java/https-url"),
114+
("rt1060", "RT1060")):
112115
if job in jobs:
113116
paths.add(path)
114117
# the pico job builds the whole cmake tree, so its subdirs come with it

.github/workflows/cross-build.yml

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ on:
1717
- 'uefi-library/**'
1818
- 'android/**'
1919
- 'Arduino/sketches/**'
20+
- 'fullstack/**'
21+
- 'java/**'
22+
- 'RT1060/**'
2023
- '.github/workflows/cross-build.yml'
2124
pull_request:
2225
types: [opened, synchronize, reopened, ready_for_review]
@@ -319,6 +322,125 @@ jobs:
319322
arduino-cli compile --fqbn esp32:esp32:esp32 \
320323
--libraries "$HOME/Arduino/libraries" . --warnings none
321324
325+
fullstack:
326+
name: fullstack (freertos + wolfip + wolfssl)
327+
runs-on: ubuntu-24.04
328+
timeout-minutes: 30
329+
steps:
330+
- uses: actions/checkout@v5
331+
332+
# setup.sh clones FreeRTOS, wolfSSL and wolfIP as siblings of the repo and
333+
# builds them; CMakeLists.txt reaches them via ../../../wolfip etc.
334+
# setup_network.sh is only needed to run the sim, not to build it.
335+
- name: Run the example's own setup.sh
336+
run: |
337+
set -euo pipefail
338+
cd fullstack/freertos-wolfip-wolfssl-https
339+
chmod +x setup.sh
340+
./setup.sh
341+
342+
- name: Build
343+
run: |
344+
set -euo pipefail
345+
cd fullstack/freertos-wolfip-wolfssl-https
346+
mkdir -p build && cd build
347+
cmake ..
348+
make
349+
350+
- name: Assert the sim binary came out
351+
run: |
352+
set -euo pipefail
353+
cd fullstack/freertos-wolfip-wolfssl-https
354+
f=$(find . -name 'freertos_sim' -type f | head -n1)
355+
[ -n "$f" ] || { echo "FAIL: freertos_sim not built"; exit 1; }
356+
file "$f"
357+
358+
java:
359+
name: java (https-url)
360+
runs-on: ubuntu-24.04
361+
timeout-minutes: 25
362+
steps:
363+
- uses: actions/checkout@v5
364+
365+
- uses: actions/setup-java@v4
366+
with:
367+
distribution: temurin
368+
java-version: '17'
369+
370+
# README: javac -cp <wolfssljni>/lib/wolfssl-jsse.jar URLClient.java
371+
# so wolfSSL must be built with JNI support and wolfssljni built on top.
372+
- name: Build wolfSSL and wolfssljni
373+
run: |
374+
set -euo pipefail
375+
sudo apt-get update -qq
376+
sudo apt-get install -y --no-install-recommends ant >/dev/null
377+
git clone -q --depth 1 https://github.com/wolfSSL/wolfssl /tmp/wolfssl
378+
cd /tmp/wolfssl
379+
./autogen.sh >/dev/null 2>&1
380+
./configure --enable-jni --enable-static --enable-shared >/dev/null
381+
make -j"$(nproc)" >/dev/null
382+
sudo make install >/dev/null
383+
sudo ldconfig
384+
git clone -q --depth 1 https://github.com/wolfSSL/wolfssljni /tmp/wolfssljni
385+
cd /tmp/wolfssljni
386+
./java.sh
387+
ant
388+
test -f lib/wolfssl-jsse.jar || { echo "FAIL: wolfssl-jsse.jar not built"; exit 1; }
389+
390+
- name: Compile URLClient
391+
run: |
392+
set -euo pipefail
393+
cd java/https-url
394+
javac -cp /tmp/wolfssljni/lib/wolfssl-jsse.jar URLClient.java
395+
test -f URLClient.class || { echo "FAIL: no class produced"; exit 1; }
396+
echo "verified: URLClient.class"
397+
398+
rt1060:
399+
name: rt1060 (arm-none-eabi)
400+
runs-on: ubuntu-24.04
401+
timeout-minutes: 25
402+
steps:
403+
- uses: actions/checkout@v5
404+
405+
- name: Install toolchain
406+
run: |
407+
set -euo pipefail
408+
sudo apt-get update -qq
409+
sudo apt-get install -y --no-install-recommends \
410+
gcc-arm-none-eabi libnewlib-arm-none-eabi build-essential >/dev/null
411+
412+
# README.md says to generate the SDK by hand from mcuxpresso.nxp.com, but
413+
# NXP publishes the same tree on GitHub. CMSIS is a separate repo there,
414+
# which the SDK Builder zip folds in as $(SDK)/CMSIS.
415+
- name: Fetch the MCUXpresso SDK
416+
run: |
417+
set -euo pipefail
418+
git clone -q --depth 1 https://github.com/nxp-mcuxpresso/mcux-sdk /tmp/sdk
419+
git clone -q --depth 1 https://github.com/nxp-mcuxpresso/CMSIS_5 /tmp/cmsis
420+
cp -r /tmp/cmsis/CMSIS /tmp/sdk/CMSIS
421+
test -d /tmp/sdk/devices/MIMXRT1062/drivers || { echo "FAIL: SDK layout unexpected"; exit 1; }
422+
test -d /tmp/sdk/CMSIS/Core/Include || { echo "FAIL: CMSIS missing"; exit 1; }
423+
424+
- name: Build
425+
run: |
426+
set -euo pipefail
427+
git clone -q --depth 1 https://github.com/wolfSSL/wolfssl /tmp/wolfssl
428+
cd RT1060
429+
make SDK=/tmp/sdk WOLFSSL=/tmp/wolfssl
430+
431+
- name: Assert it really cross-compiled
432+
run: |
433+
set -euo pipefail
434+
cd RT1060
435+
elf=$(find . -name '*.elf' | head -n1)
436+
[ -n "$elf" ] || { echo "FAIL: no .elf produced"; exit 1; }
437+
arch=$(readelf -h "$elf" | awk -F: '/Machine:/ {print $2}' | xargs)
438+
echo "machine: $arch"
439+
case "$arch" in
440+
*ARM*) echo "cross-compile verified" ;;
441+
*) echo "FAIL: not an ARM binary: $arch"; exit 1 ;;
442+
esac
443+
322444
# cross-build.yml already triggers on puf/**, but had no job to run: editing
323445
# puf/ fired CI that ignored it. PUF_TEST defaults to 1 (synthetic SRAM), so
324446
# this builds without a board.

0 commit comments

Comments
 (0)