-
Notifications
You must be signed in to change notification settings - Fork 207
87 lines (78 loc) · 2.91 KB
/
Copy pathfullstack.yml
File metadata and controls
87 lines (78 loc) · 2.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
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"