mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-07-06 06:10:49 +02:00
dd2f9d3ab8
The 10 GB, LRU-evicted, PR-scoped Actions cache was being thrashed - the
docker simulator buildx layers (~6 GiB), plus per-PR ccache and apt-archive
writes whose keys never hit - which kept evicting the shared ccache, while
the apt mirror timed out often enough to break PR CI. Move the heavy caches
to ghcr (free, separate pool) and make PR runs read-only against the Actions
cache.
apt dependencies from prebuilt ghcr .deb bundles
- ci-deps-image.yml resolves each package list under .github/ci-deps/ into
its .deb closure and publishes ghcr.io/<owner>/wolfssl-ci-debs:<tag> in
two tiers: <ver>-minimal (make-check family) and <ver>-full (interop
superset), for ubuntu-22.04 and 24.04.
- install-apt-deps gains a ghcr-debs-tag input: pull the bundle and install
offline (--no-download) so the apt mirror is never on the PR critical
path. Any failure (bundle missing/not public/incomplete) falls through to
the existing apt path, so it is always safe to set.
sim-test buildx layers to a shared ghcr registry cache
- the 7 docker simulator workflows switch from cache-to: type=gha to
ghcr.io/wolfssl/wolfssl-sim-cache:<scope>. cache-from reads on every run
(anonymous); cache-to writes only on the weekend cron and manual
workflow_dispatch. Per-distinct-image tags and de-duplicated writers keep
parallel matrix jobs from racing on one ref.
ccache: PRs read, the schedule writes
- ccache-setup gains read-only: PR runs restore the shared master-scoped
cache but never upload; schedule/push runs refresh it. Wired across
os-check (linux + macOS), pq-all, smoke-test and the 12 small make-check
workflows.
- parallel-make-check.py gains --build-only (compile every config, skip the
test phase) so weekday-morning seed crons warm the cache PR runs consume.
artifact retention capped at 7 days on the failure-log/result uploads that
previously defaulted to 90.
ONE-TIME SETUP: after their first publish, make the ghcr packages
wolfssl-ci-debs and wolfssl-sim-cache PUBLIC so anonymous pulls work from PR
(including fork) runs; until then everything falls back cleanly.
129 lines
5.7 KiB
YAML
129 lines
5.7 KiB
YAML
name: Zephyr tests
|
|
|
|
# START OF COMMON SECTION
|
|
on:
|
|
push:
|
|
branches: [ 'release/**' ]
|
|
pull_request:
|
|
types: [opened, synchronize, reopened, ready_for_review]
|
|
branches: [ '*' ]
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
# END OF COMMON SECTION
|
|
|
|
jobs:
|
|
run_test:
|
|
name: Build and run
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
config:
|
|
- zephyr-ref: v3.4.0
|
|
zephyr-sdk: 0.16.1
|
|
- zephyr-ref: v3.5.0
|
|
zephyr-sdk: 0.16.3
|
|
- zephyr-ref: v2.7.4
|
|
zephyr-sdk: 0.16.3
|
|
if: ${{ (github.repository_owner == 'wolfssl') && (github.event_name != 'pull_request' || github.event.pull_request.draft == false) }}
|
|
runs-on: ubuntu-22.04
|
|
# This should be a safe limit for the tests to run.
|
|
timeout-minutes: 45
|
|
steps:
|
|
- name: Checkout wolfSSL CI actions
|
|
uses: actions/checkout@v5
|
|
with:
|
|
sparse-checkout: .github/actions
|
|
fetch-depth: 1
|
|
|
|
- name: Install dependencies
|
|
uses: ./.github/actions/install-apt-deps
|
|
with:
|
|
packages: zip bridge-utils uml-utilities git cmake ninja-build gperf ccache dfu-util device-tree-compiler wget python3-dev python3-pip python3-setuptools python3-tk python3-wheel xz-utils file make gcc gcc-multilib g++-multilib libsdl2-dev libmagic1 autoconf automake bison build-essential ca-certificates cargo ccache chrpath cmake cpio device-tree-compiler dfu-util diffstat dos2unix doxygen file flex g++ gawk gcc gcovr git git-core gnupg gperf gtk-sharp3 help2man iproute2 lcov libcairo2-dev libglib2.0-dev libgtk2.0-0 liblocale-gettext-perl libncurses5-dev libpcap-dev libpopt0 libsdl1.2-dev libsdl2-dev libssl-dev libtool libtool-bin locales make net-tools ninja-build openssh-client parallel pkg-config python3-dev python3-pip python3-ply python3-setuptools python-is-python3 qemu-kvm rsync socat srecord sudo texinfo unzip wget ovmf xz-utils
|
|
ghcr-debs-tag: ubuntu-22.04-full
|
|
|
|
- name: Setup cmake version
|
|
uses: jwlawson/actions-setup-cmake@v2
|
|
with:
|
|
cmake-version: '3.25.x'
|
|
|
|
- name: Install west
|
|
run: sudo pip install west
|
|
|
|
- name: Init west workspace
|
|
run: west init --mr ${{ matrix.config.zephyr-ref }} zephyr
|
|
|
|
- name: Update west.yml
|
|
working-directory: zephyr/zephyr
|
|
run: |
|
|
REF=$(echo '${{ github.ref }}' | sed -e 's/\//\\\//g')
|
|
sed -e 's/remotes:/remotes:\n \- name: wolfssl\n url\-base: https:\/\/github.com\/${{ github.repository_owner }}/' -i west.yml
|
|
sed -e "s/projects:/projects:\n \- name: wolfssl\n path: modules\/crypto\/wolfssl\n remote: wolfssl\n revision: $REF/" -i west.yml
|
|
|
|
- name: Update west workspace
|
|
working-directory: zephyr
|
|
run: west update -n -o=--depth=1
|
|
|
|
- name: Export zephyr
|
|
working-directory: zephyr
|
|
run: west zephyr-export
|
|
|
|
- name: Install pip dependencies
|
|
working-directory: zephyr
|
|
run: sudo pip install -r zephyr/scripts/requirements.txt
|
|
|
|
- name: Install zephyr SDK
|
|
run: |
|
|
wget -q https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v${{ matrix.config.zephyr-sdk }}/zephyr-sdk-${{ matrix.config.zephyr-sdk }}_linux-x86_64_minimal.tar.xz
|
|
tar xf zephyr-sdk-${{ matrix.config.zephyr-sdk }}_linux-x86_64_minimal.tar.xz
|
|
cd zephyr-sdk-${{ matrix.config.zephyr-sdk }}
|
|
./setup.sh -h -c -t x86_64-zephyr-elf
|
|
|
|
- name: Fix options for 2.7.4
|
|
if: ${{ matrix.config.zephyr-ref == 'v2.7.4' }}
|
|
working-directory: zephyr/modules/crypto/wolfssl
|
|
run: |
|
|
sed -i -e 's/CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE/CONFIG_MINIMAL_LIBC_MALLOC_ARENA_SIZE/g' $(find -name prj.conf)
|
|
|
|
- name: Run wolfssl test
|
|
id: wolfssl-test
|
|
working-directory: zephyr
|
|
run: |
|
|
./zephyr/scripts/twister -T modules/crypto/wolfssl --test zephyr/samples/wolfssl_test/sample.crypto.wolfssl_test -vvv
|
|
rm -rf zephyr/twister-out
|
|
./zephyr/scripts/twister -T modules/crypto/wolfssl --test zephyr/samples/wolfssl_test/sample.crypto.wolfssl_test_no_malloc -vvv
|
|
rm -rf zephyr/twister-out
|
|
|
|
- name: Run wolfssl TLS sock test
|
|
# Results in a page fault that I can't trace
|
|
if: ${{ matrix.config.zephyr-ref != 'v2.7.4' }}
|
|
id: wolfssl-tls-sock
|
|
working-directory: zephyr
|
|
run: |
|
|
./zephyr/scripts/twister -T modules/crypto/wolfssl --test zephyr/samples/wolfssl_tls_sock/sample.crypto.wolfssl_tls_sock -vvv
|
|
rm -rf zephyr/twister-out
|
|
./zephyr/scripts/twister -T modules/crypto/wolfssl --test zephyr/samples/wolfssl_tls_sock/sample.crypto.wolfssl_tls_sock_no_malloc -vvv
|
|
rm -rf zephyr/twister-out
|
|
|
|
- name: Run wolfssl TLS thread test
|
|
if: ${{ matrix.config.zephyr-ref != 'v2.7.4' }}
|
|
id: wolfssl-tls-thread
|
|
working-directory: zephyr
|
|
run: |
|
|
./zephyr/scripts/twister -T modules/crypto/wolfssl --test zephyr/samples/wolfssl_tls_thread/sample.crypto.wolfssl_tls_thread -vvv
|
|
rm -rf zephyr/twister-out
|
|
|
|
- name: Zip failure logs
|
|
if: ${{ failure() && (steps.wolfssl-test.outcome == 'failure' || steps.wolfssl-tls-sock.outcome == 'failure' || steps.wolfssl-tls-thread.outcome == 'failure') }}
|
|
run: |
|
|
zip -9 -r logs.zip zephyr/twister-out
|
|
|
|
- name: Upload failure logs
|
|
if: ${{ failure() && (steps.wolfssl-test.outcome == 'failure' || steps.wolfssl-tls-sock.outcome == 'failure' || steps.wolfssl-tls-thread.outcome == 'failure') }}
|
|
uses: actions/upload-artifact@v6
|
|
with:
|
|
name: zephyr-client-test-logs
|
|
path: logs.zip
|
|
retention-days: 5
|