|
17 | 17 | - 'uefi-library/**' |
18 | 18 | - 'android/**' |
19 | 19 | - 'Arduino/sketches/**' |
| 20 | + - 'fullstack/**' |
| 21 | + - 'java/**' |
| 22 | + - 'RT1060/**' |
20 | 23 | - '.github/workflows/cross-build.yml' |
21 | 24 | pull_request: |
22 | 25 | types: [opened, synchronize, reopened, ready_for_review] |
@@ -319,6 +322,125 @@ jobs: |
319 | 322 | arduino-cli compile --fqbn esp32:esp32:esp32 \ |
320 | 323 | --libraries "$HOME/Arduino/libraries" . --warnings none |
321 | 324 |
|
| 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 | +
|
322 | 444 | # cross-build.yml already triggers on puf/**, but had no job to run: editing |
323 | 445 | # puf/ fired CI that ignored it. PUF_TEST defaults to 1 (synthetic SRAM), so |
324 | 446 | # this builds without a board. |
|
0 commit comments