Add CI that builds and runs every example #19
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Fullstack | |
| on: | |
| push: | |
| paths: | |
| - 'fullstack/**' | |
| - '.github/workflows/fullstack.yml' | |
| pull_request: | |
| types: [opened, synchronize, reopened, ready_for_review] | |
| # No cron: nightly.yml calls this, so the whole nightly is ONE run | |
| # and therefore one triage writer. See nightly.yml's header. | |
| workflow_call: | |
| inputs: | |
| caller_run_id: | |
| description: 'run id of the calling workflow; keeps a called run in its own concurrency group' | |
| type: string | |
| default: '' | |
| workflow_dispatch: | |
| # Hardcode this workflow's OWN name: github.workflow is the CALLER's in a called | |
| # workflow, so keying on it put all 12 targets in one group -- and GitHub cancels | |
| # the previously-pending run in a group, so only the last target survived. | |
| concurrency: | |
| group: ${{ inputs.caller_run_id && format('fullstack-call-{0}', inputs.caller_run_id) || format('fullstack-{0}', github.ref) }} | |
| cancel-in-progress: ${{ !inputs.caller_run_id }} | |
| permissions: | |
| contents: read | |
| jobs: | |
| resolve: | |
| uses: ./.github/workflows/_resolve-wolfssl.yml | |
| with: | |
| stable_count: 1 | |
| fullstack: | |
| needs: resolve | |
| name: Build / 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" |