|
| 1 | +name: RealTek RTL8735B (AmebaPro2) HUK port Tests |
| 2 | + |
| 3 | +# START OF COMMON SECTION |
| 4 | +on: |
| 5 | + push: |
| 6 | + branches: [ 'release/**' ] |
| 7 | + pull_request: |
| 8 | + types: [opened, synchronize, reopened, ready_for_review] |
| 9 | + branches: [ '*' ] |
| 10 | + # Weekday-morning cron seeds the master-scoped ccache that PR runs restore |
| 11 | + # read-only (see ccache-setup). |
| 12 | + schedule: |
| 13 | + - cron: '27 10 * * 1-5' |
| 14 | + |
| 15 | +concurrency: |
| 16 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 17 | + cancel-in-progress: true |
| 18 | +# END OF COMMON SECTION |
| 19 | + |
| 20 | +jobs: |
| 21 | + # Compile + helper-KAT gate for the RTL8735B HUK crypto-callback port. |
| 22 | + # --enable-rtl8735b sets WOLFSSL_RTL8735B_HOST_TEST, which swaps the vendor HAL |
| 23 | + # headers for rtl8735b_shim.h (sentinel stubs, no real crypto). Two levels: |
| 24 | + # (1) build-only matrix -- exercises crypto-callback dispatch, info-struct |
| 25 | + # field access, compile guards, and build wiring across algo/guard combos |
| 26 | + # and both WOLFSSL_SMALL_STACK branches, via parallel-make-check.py. |
| 27 | + # (2) one config runs testwolfcrypt, which calls wc_Rtl8735b_HukSelfTest() -- |
| 28 | + # real KATs of the silicon-independent helpers (BE/LE word conversion, CTR |
| 29 | + # counter increment, HMAC accumulator growth/overflow/cap, bounce |
| 30 | + # alignment). No fake-crypto shim path is asserted as "correct". |
| 31 | + # Functional crypto correctness (AES/GCM/ECDSA on silicon) is validated on |
| 32 | + # RTL8735B hardware, NOT here (see the port README). |
| 33 | + build: |
| 34 | + name: build + helper KATs (--enable-rtl8735b) |
| 35 | + if: ${{ (github.repository_owner == 'wolfssl') && (github.event_name != 'pull_request' || github.event.pull_request.draft == false) }} |
| 36 | + runs-on: ubuntu-24.04 |
| 37 | + timeout-minutes: 15 |
| 38 | + steps: |
| 39 | + - uses: actions/checkout@v5 |
| 40 | + name: Checkout wolfSSL |
| 41 | + |
| 42 | + - name: Install dependencies |
| 43 | + uses: ./.github/actions/install-apt-deps |
| 44 | + with: |
| 45 | + packages: autoconf automake libtool build-essential |
| 46 | + ghcr-debs-tag: ubuntu-24.04-minimal |
| 47 | + |
| 48 | + - name: Set up ccache |
| 49 | + uses: ./.github/actions/ccache-setup |
| 50 | + with: |
| 51 | + workflow-id: rtl8735b |
| 52 | + read-only: ${{ github.event_name == 'pull_request' }} |
| 53 | + max-size: 100M |
| 54 | + |
| 55 | + - name: Build all configs (compile-only, out-of-tree) |
| 56 | + run: | |
| 57 | + cat > "$RUNNER_TEMP/rtl8735b-configs.json" <<'EOF' |
| 58 | + [ |
| 59 | + {"name": "full-smallstack", "minutes": 2, |
| 60 | + "comment": "All port paths (AES-GCM/ECB/CBC/CTR, HMAC-SHA256, ECDSA P-256) with WOLFSSL_SMALL_STACK -> exercises the heap branch of the HW-ECDSA mp_int helpers.", |
| 61 | + "configure": ["--enable-rtl8735b", "--enable-cryptocb", "--enable-ecc", |
| 62 | + "--enable-aesgcm", "--enable-aesctr", "--enable-aescbc", |
| 63 | + "CPPFLAGS=-DWOLFSSL_SMALL_STACK"]}, |
| 64 | + {"name": "full", "minutes": 2, |
| 65 | + "comment": "Same algo coverage without WOLFSSL_SMALL_STACK -> exercises the on-stack (array) branch of the HW-ECDSA mp_int helpers.", |
| 66 | + "configure": ["--enable-rtl8735b", "--enable-cryptocb", "--enable-ecc", |
| 67 | + "--enable-aesgcm", "--enable-aesctr", "--enable-aescbc"]}, |
| 68 | + {"name": "min", "minutes": 2, |
| 69 | + "comment": "Minimal: no ECC (HW/SW ECDSA sign code compiled out), AES + HMAC only -> exercises the non-ECC compile guards.", |
| 70 | + "configure": ["--enable-rtl8735b", "--enable-cryptocb"]} |
| 71 | + ] |
| 72 | + EOF |
| 73 | + .github/scripts/parallel-make-check.py --build-only \ |
| 74 | + "$RUNNER_TEMP/rtl8735b-configs.json" |
| 75 | +
|
| 76 | + - name: Run helper KATs on host (testwolfcrypt self-test) |
| 77 | + run: | |
| 78 | + ./autogen.sh |
| 79 | + ./configure --enable-rtl8735b --enable-cryptocb --enable-ecc \ |
| 80 | + --enable-aesgcm --enable-aesctr --enable-aescbc |
| 81 | + make -j"$(nproc)" |
| 82 | + ./wolfcrypt/test/testwolfcrypt |
| 83 | +
|
| 84 | + - name: ccache stats |
| 85 | + if: always() |
| 86 | + run: ccache -s || true |
| 87 | + |
| 88 | + - name: Upload logs on failure |
| 89 | + if: failure() |
| 90 | + uses: actions/upload-artifact@v6 |
| 91 | + with: |
| 92 | + retention-days: 7 |
| 93 | + name: rtl8735b-logs |
| 94 | + path: | |
| 95 | + build-*/config.log |
| 96 | + if-no-files-found: ignore |
0 commit comments