Skip to content

Add CI that builds and runs every example #5

Add CI that builds and runs every example

Add CI that builds and runs every example #5

Workflow file for this run

name: Fullstack
on:
push:
paths:
- 'fullstack/**'
- '.github/workflows/fullstack.yml'
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
schedule:
- cron: '45 6 * * *'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
resolve:
uses: ./.github/workflows/_resolve-wolfssl.yml
with:
stable_count: 1
fullstack:
needs: resolve
name: fullstack (freertos + wolfip + wolfssl) wolfSSL ${{ matrix.wolfssl_ref }}
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
wolfssl_ref: ${{ fromJson(needs.resolve.outputs.refs_json) }}
timeout-minutes: 30
steps:
- uses: actions/checkout@v5
# setup.sh clones FreeRTOS, wolfSSL and wolfIP as siblings of the repo and
# builds them; CMakeLists.txt reaches them via ../../../wolfip etc.
# setup_network.sh is only needed to run the sim, not to build it.
# setup.sh clones wolfSSL master itself, but only when the dir is absent,
# so pre-place the ref under test and let its guard skip that clone.
- name: Pre-place the wolfSSL ref under test
run: |
set -euo pipefail
cd "$GITHUB_WORKSPACE/.."
git clone -q --depth 1 --branch '${{ matrix.wolfssl_ref }}' \
https://github.com/wolfSSL/wolfssl.git wolfssl
cd wolfssl
./autogen.sh >/dev/null 2>&1
./configure --enable-tls13 --enable-static >/dev/null
make -j"$(nproc)" >/dev/null
sudo make install >/dev/null
sudo ldconfig
- name: Run the example's own setup.sh
run: |
set -euo pipefail
cd fullstack/freertos-wolfip-wolfssl-https
chmod +x setup.sh
./setup.sh
- name: Build
run: |
set -euo pipefail
cd fullstack/freertos-wolfip-wolfssl-https
mkdir -p build && cd build
cmake ..
make
- name: Assert the sim binary came out
run: |
set -euo pipefail
cd fullstack/freertos-wolfip-wolfssl-https
f=$(find . -name 'freertos_sim' -type f | head -n1)
[ -n "$f" ] || { echo "FAIL: freertos_sim not built"; exit 1; }
file "$f"