Create GitHub workflows to execute the WinSim demos with libslirp network interface implemented in FreeRTOS+TCP VS Static Project (#1054)

* Add libslirp to the existing FreeRTOS+TCP static project

* Update demos to run with libslirp

* Add ipconfigUSE_LIBSLIRP

* Call developer command prompt and update meson build options

---------

Co-authored-by: Xiaodong Li <xiaodonn@amazon.com>
This commit is contained in:
Xiaodong Li 2023-07-27 12:18:09 -07:00 committed by GitHub
parent f776f5ee4a
commit 792efb4bb7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
39 changed files with 3825 additions and 137 deletions

View file

@ -309,6 +309,7 @@ FREERTOS_IGNORED_FILES = [
'interrupt_vector.s',
'reg_test.S',
'gdbinit',
'libslirp-version.h',
]
FREERTOS_HEADER = [

View file

@ -18,7 +18,7 @@ jobs:
# Fetch Kernel Submodule
echo "::group::Fetch Kernel Submodule"
git submodule update --checkout --init --depth 1 FreeRTOS/Source
echo "::engdroup::"
echo "::endgroup::"
if [[ "$?" = "0" ]]
then
echo -e "\033[32;3mCloned the Kernel\033[0m"
@ -125,7 +125,7 @@ jobs:
# Fetch Kernel Submodule
echo "::group::Fetch Kernel Submodule"
git submodule update --checkout --init --depth 1 FreeRTOS/Source
echo "::engdroup::"
echo "::endgroup::"
if [[ "$?" = "0" ]]
then
echo -e "\033[32;3mCloned the Kernel\033[0m"
@ -172,7 +172,6 @@ jobs:
echo "::group::Build WIN32-MingW Blinky Demo"
$content = Get-Content -Path 'main.c' -Raw
$newContent = $content -replace '#define\s+mainCREATE_SIMPLE_BLINKY_DEMO_ONLY\s+0', '#define mainCREATE_SIMPLE_BLINKY_DEMO_ONLY 1'
$newContent = $newContent -replace 'int\s+main(.*?)void(.*?)\r?\n\s*{', 'int main( void ){setvbuf( stdout, NULL, _IONBF, 0 );'
$newContent | Set-Content -Path 'main.c'
gcc --version
make --version
@ -207,7 +206,7 @@ jobs:
# Fetch Kernel Submodule
echo "::group::Fetch Kernel Submodule"
git submodule update --checkout --init --depth 1 FreeRTOS/Source
echo "::engdroup::"
echo "::endgroup::"
if [ "$?" = "0" ]; then
echo -e "\033[32;3mCloned the Kernel\033[0m"
else
@ -298,7 +297,7 @@ jobs:
# Fetch Kernel Submodule
echo "::group::Fetch Kernel Submodule"
git submodule update --checkout --init --depth 1 FreeRTOS/Source
echo "::engdroup::"
echo "::endgroup::"
if [ "$?" = "0" ]; then
echo -e "\033[32;3mCloned the Kernel\033[0m"
else
@ -349,7 +348,7 @@ jobs:
# Fetch Kernel Submodule
echo "::group::Fetch Kernel Submodule"
git submodule update --checkout --init --depth 1 FreeRTOS/Source
echo "::engdroup::"
echo "::endgroup::"
if [ "$?" = "0" ]; then
echo -e "\033[32;3mCloned the Kernel\033[0m"
else
@ -378,7 +377,7 @@ jobs:
echo "::group::Install GNU ARM Toolchain"
sudo apt-get -y update
sudo apt-get -y install gcc-arm-none-eabi build-essential cmake git ninja-build python3-minimal
echo "::engdroup::"
echo "::endgroup::"
if [ "$?" = "0" ]; then
echo -e "\033[32;3mInstalled the GNU ARM Toolchain\033[0m"
else
@ -393,7 +392,7 @@ jobs:
# Build CORTEX_MPU_M3_MPS2_QEMU_GCC Demo
echo "::group::Build CORTEX_MPU_M3_MPS2_QEMU_GCC Demo"
make -j
echo "::engdroup::"
echo "::endgroup::"
if [ "$?" = "0" ]; then
echo -e "\033[32;3mBuild CORTEX_MPU_M3_MPS2_QEMU_GCC Demo\033[0m"
else
@ -408,7 +407,7 @@ jobs:
# Build CORTEX_LM3S102_GCC Demo
echo "::group::Build CORTEX_LM3S102_GCC Demo"
make -j
echo "::engdroup::"
echo "::endgroup::"
if [ "$?" = "0" ]; then
echo -e "\033[32;3mBuilt the CORTEX_LM3S102_GCC Demo Kernel\033[0m"
else
@ -424,7 +423,7 @@ jobs:
echo "::group::Build CORTEX_M3_MPS2_QEMU_GCC Demo"
make clean
make -j
echo "::engdroup::"
echo "::endgroup::"
if [ "$?" = "0" ]; then
echo -e "\033[32;3mBuilt the CORTEX_M3_MPS2_QEMU_GCC Demo\033[0m"
else
@ -440,7 +439,7 @@ jobs:
echo "::group::Build CORTEX_M3_MPS2_QEMU_GCC Full Demo"
make clean
make FULL_DEMO=1 -j
echo "::engdroup::"
echo "::endgroup::"
if [ "$?" = "0" ]; then
echo -e "\033[32;3mBuilt the CORTEX_M3_MPS2_QEMU_GCC Full Demo\033[0m"
else
@ -455,7 +454,7 @@ jobs:
# Build CORTEX_LM3S811_GCC Demo
echo "::group::Build CORTEX_LM3S811_GCC Demo"
make -j
echo "::engdroup::"
echo "::endgroup::"
if [ "$?" = "0" ]; then
echo -e "\033[32;3mBuilt the CORTEX_LM3S811_GCC Demo\033[0m"
else
@ -472,7 +471,7 @@ jobs:
git clone https://github.com/raspberrypi/pico-sdk.git
cmake -B build -DPICO_SDK_PATH=pico-sdk -GNinja
ninja -C build --verbose
echo "::engdroup::"
echo "::endgroup::"
if [ "$?" = "0" ]; then
echo -e "\033[32;3mBuilt CORTEX_M0+_RP2040 Demos\033[0m"
else
@ -487,7 +486,7 @@ jobs:
# Build CORTEX_MPS2_QEMU_IAR_GCC Demo
echo "::group::Build CORTEX_MPS2_QEMU_IAR_GCC Demo"
make -C build/gcc -j
echo "::engdroup::"
echo "::endgroup::"
if [ "$?" = "0" ]; then
echo -e "\033[32;3mBuilt the CORTEX_MPS2_QEMU_IAR_GCC Demo\033[0m"
else

View file

@ -83,7 +83,9 @@ jobs:
FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP \
FreeRTOS-Plus/Source/Utilities/backoff_algorithm \
FreeRTOS-Plus/Source/coreJSON \
FreeRTOS-Plus/ThirdParty/mbedtls
FreeRTOS-Plus/ThirdParty/mbedtls \
FreeRTOS-Plus/ThirdParty/glib \
FreeRTOS-Plus/ThirdParty/libslirp
git -C FreeRTOS-Plus/Source/Application-Protocols/coreHTTP submodule update --checkout --init --depth 1 source/dependency/3rdparty/llhttp
- name: Add msbuild to PATH
@ -112,26 +114,30 @@ jobs:
echo ' #define democonfigS3_OBJECT_NAME ""' | tee -a */demo_config.h
echo '#endif /* DEMO_CONFIG_H_TEST_BUILD */' | tee -a */demo_config.h
- name: Build HTTP Mutual Auth Demo
working-directory: FreeRTOS-Plus/Demo/coreHTTP_Windows_Simulator/HTTP_Mutual_Auth
run: msbuild http_mutual_auth_demo.sln -t:rebuild
- name: Build HTTP Plain Text Demo
id: build-http-plain-text-demo
working-directory: FreeRTOS-Plus/Demo/coreHTTP_Windows_Simulator/HTTP_Plaintext
run: msbuild http_plain_text_demo.sln -t:rebuild
run: msbuild http_plain_text_demo.sln -t:rebuild -property:Configuration=Debug -m
- name: Build HTTP S3 Download Demo
working-directory: FreeRTOS-Plus/Demo/coreHTTP_Windows_Simulator/HTTP_S3_Download
run: msbuild http_s3_download_demo.sln -t:rebuild
- name: Build HTTP S3 Download Multithreaded Demo
working-directory: FreeRTOS-Plus/Demo/coreHTTP_Windows_Simulator/HTTP_S3_Download_Multithreaded
run: msbuild http_s3_download_multithreaded_demo.sln -t:rebuild
- name: Build HTTP Mutual Auth Demo
id: build-http-mutual-auth-demo
working-directory: FreeRTOS-Plus/Demo/coreHTTP_Windows_Simulator/HTTP_Mutual_Auth
run: msbuild http_mutual_auth_demo.sln -t:rebuild -property:Configuration=Debug -m
- name: Build HTTP S3 Upload Demo
id: build-http-s3-upload-demo
working-directory: FreeRTOS-Plus/Demo/coreHTTP_Windows_Simulator/HTTP_S3_Upload
run: msbuild http_s3_upload_demo.sln -t:rebuild
run: msbuild http_s3_upload_demo.sln -t:rebuild -property:Configuration=Debug -m
- name: Build HTTP S3 Download Multithreaded Demo
id: build-http-s3-download-multithreaded-demo
working-directory: FreeRTOS-Plus/Demo/coreHTTP_Windows_Simulator/HTTP_S3_Download_Multithreaded
run: msbuild http_s3_download_multithreaded_demo.sln -t:rebuild -property:Configuration=Debug -m
- name: Build HTTP S3 Download Demo
id: build-http-s3-download-demo
working-directory: FreeRTOS-Plus/Demo/coreHTTP_Windows_Simulator/HTTP_S3_Download
run: msbuild http_s3_download_demo.sln -t:rebuild -property:Configuration=Debug -m
winsim_corePKCS11:
name: corePKCS11 WinSim Demos
@ -151,16 +157,42 @@ jobs:
FreeRTOS-Plus/Source/Utilities/backoff_algorithm \
FreeRTOS-Plus/Source/coreJSON \
FreeRTOS-Plus/Source/corePKCS11 \
FreeRTOS-Plus/ThirdParty/mbedtls
FreeRTOS-Plus/ThirdParty/mbedtls \
FreeRTOS-Plus/ThirdParty/glib \
FreeRTOS-Plus/ThirdParty/libslirp
git -C FreeRTOS-Plus/Source/corePKCS11 submodule update --checkout --init --depth 1 source/dependency/3rdparty/pkcs11
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.1
- name: corePKCS11 Demo
- name: Install meson
run: pip install meson
- name: Install Glib
continue-on-error: true
shell: cmd
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat"
cd FreeRTOS-Plus/ThirdParty/glib
meson setup build --backend=vs2019 -Dselinux=disabled -Dxattr=false -Dbsymbolic_functions=false -Dtests=false -Dglib_debug=disabled -Dglib_assert=false --buildtype=release
meson compile -C build
- name: Build corePKCS11 Demo
id: build-corePKCS11-demo
working-directory: FreeRTOS-Plus/Demo/corePKCS11_Windows_Simulator
run: msbuild CorePKCS11_Demos.sln -t:rebuild -m
run: msbuild CorePKCS11_Demos.sln -t:rebuild -property:Configuration=Debug_with_Libslirp -property:Platform=Win32 -m
- name: Run and monitor corePKCS11 Demo
if: success() || failure() && steps.build-corePKCS11-demo.outcome == 'success'
uses: FreeRTOS/CI-CD-GitHub-Actions/executable-monitor@main
with:
exe-path: FreeRTOS-Plus/Demo/corePKCS11_Windows_Simulator/Debug_with_Libslirp/CorePKCS11_Demos.exe
log-dir: demo_run_logs
timeout-seconds: 30
success-line: "Finished DEMO"
success-exit-code: 0
retry-attempts: 3
winsim_corelibs:
name: core Library Windows Simulator Demos
@ -194,7 +226,9 @@ jobs:
FreeRTOS-Plus/Source/corePKCS11 \
FreeRTOS-Plus/ThirdParty/mbedtls \
FreeRTOS-Plus/ThirdParty/tinycbor \
FreeRTOS-Plus/ThirdParty/wolfSSL
FreeRTOS-Plus/ThirdParty/wolfSSL \
FreeRTOS-Plus/ThirdParty/glib \
FreeRTOS-Plus/ThirdParty/libslirp
git -C FreeRTOS-Plus/Source/Application-Protocols/coreHTTP submodule update --checkout --init --depth 1 source/dependency/3rdparty/llhttp
git -C FreeRTOS-Plus/Source/corePKCS11 submodule update --checkout --init --depth 1 source/dependency/3rdparty/pkcs11
@ -202,49 +236,221 @@ jobs:
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.1
- name: Configure coreMQTT Demos
shell: bash
working-directory: FreeRTOS-Plus/Demo/coreMQTT_Windows_Simulator
- name: Install meson
run: pip install meson
- name: Install Glib
continue-on-error: true
shell: cmd
run: |
echo '#ifndef DEMO_CONFIG_H_TEST_BUILD' | tee -a */demo_config.h
echo ' #define DEMO_CONFIG_H_TEST_BUILD' | tee -a */demo_config.h
echo ' #define democonfigCLIENT_CERTIFICATE_PEM ""' | tee -a */demo_config.h
echo ' #define democonfigCLIENT_IDENTIFIER ""' | tee -a */demo_config.h
echo ' #define democonfigCLIENT_PRIVATE_KEY_PEM ""' | tee -a */demo_config.h
echo ' #define democonfigCLIENT_PRIVATE_KEY_PEM ""' | tee -a */demo_config.h
echo ' #define democonfigMQTT_BROKER_ENDPOINT ""' | tee -a */demo_config.h
echo ' #define democonfigMQTT_BROKER_PORT ( 8883 )' | tee -a */demo_config.h
echo ' #define democonfigROOT_CA_PEM ""' | tee -a */demo_config.h
echo ' #define democonfigUSE_AWS_IOT_CORE_BROKER ( 1U )' | tee -a */demo_config.h
echo '#endif /* DEMO_CONFIG_H_TEST_BUILD */' | tee -a */demo_config.h
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat"
cd FreeRTOS-Plus/ThirdParty/glib
meson setup build --backend=vs2019 -Dselinux=disabled -Dxattr=false -Dbsymbolic_functions=false -Dtests=false -Dglib_debug=disabled -Dglib_assert=false --buildtype=release
meson compile -C build
- name: Build MQTT Basic TLS Demo
working-directory: FreeRTOS-Plus/Demo/coreMQTT_Windows_Simulator/MQTT_Basic_TLS
run: msbuild mqtt_basic_tls_demo.sln -t:rebuild -property:Configuration=Debug -m
- name: Generate SSL credentials
id: generate-credentials
uses: FreeRTOS/CI-CD-GitHub-Actions/ssl-credential-creator@main
- name: Build MQTT Keep Alive Demo
working-directory: FreeRTOS-Plus/Demo/coreMQTT_Windows_Simulator/MQTT_Keep_Alive
run: msbuild mqtt_keep_alive_demo.sln -t:rebuild -property:Configuration=Debug -m
- name: Start localhost MQTT broker
id: mqtt-broker
uses: FreeRTOS/CI-CD-GitHub-Actions/localhost-mqtt-broker@main
with:
root-ca-cert-path: ${{ steps.generate-credentials.outputs.root-ca-cert-path }}
server-priv-key-path: ${{ steps.generate-credentials.outputs.server-priv-key-path }}
server-cert-path: ${{ steps.generate-credentials.outputs.server-cert-path }}
- name: Build MQTT Multi-Task Demo
working-directory: FreeRTOS-Plus/Demo/coreMQTT_Windows_Simulator/MQTT_Multitask
run: msbuild mqtt_multitask_demo.sln -t:rebuild -property:Configuration=Debug -m
- name: Update main.c to force stdout to write immediately
working-directory: FreeRTOS-Plus/Demo/coreMQTT_Windows_Simulator/Common
run: |
$content = Get-Content -Path 'main.c' -Raw
$newContent = $content -replace 'int\s+main(.*?)void(.*?)\r?\n\s*{', 'int main( void ){setvbuf( stdout, NULL, _IONBF, 0 );'
$newContent | Set-Content -Path 'main.c'
- name: Build MQTT Mutual Authentication with mbedtls Demo
working-directory: FreeRTOS-Plus/Demo/coreMQTT_Windows_Simulator/MQTT_Mutual_Auth
run: msbuild mqtt_mutual_auth_demo.sln -t:rebuild -property:Configuration=Debug -m
- name: Build MQTT Mutual Authentication with WolfSSL Demo
working-directory: FreeRTOS-Plus/Demo/coreMQTT_Windows_Simulator/MQTT_Mutual_Auth_wolfSSL
run: msbuild mqtt_mutual_auth_demo_wolfSSL.sln -t:rebuild -property:Configuration=Debug -m
- name: Configure MQTT Plain Text Demo
shell: bash
working-directory: FreeRTOS-Plus/Demo/coreMQTT_Windows_Simulator/MQTT_Plain_Text
run: |
echo '#define democonfigCLIENT_IDENTIFIER "mqtt_demo_test"' >> demo_config.h
echo '#define democonfigMQTT_BROKER_ENDPOINT "127.0.0.1"' >> demo_config.h
echo '#define democonfigMQTT_BROKER_PORT ( 1883 )' >> demo_config.h
- name: Build MQTT Plain Text Demo
id: build-mqtt-plain-text-demo
working-directory: FreeRTOS-Plus/Demo/coreMQTT_Windows_Simulator/MQTT_Plain_Text
run: msbuild mqtt_plain_text_demo.sln -t:rebuild -property:Configuration=Debug -m
run: |
msbuild mqtt_plain_text_demo.sln -t:rebuild -property:Configuration=Debug_with_Libslirp -property:Platform=Win32 -m
- name: Run and monitor MQTT Plain Text Demo
if: success() || failure() && steps.build-mqtt-plain-text-demo.outcome == 'success'
uses: FreeRTOS/CI-CD-GitHub-Actions/executable-monitor@main
with:
exe-path: FreeRTOS-Plus/Demo/coreMQTT_Windows_Simulator/MQTT_Plain_Text/Debug_with_Libslirp/MQTT_Plain_Text.exe
log-dir: demo_run_logs
timeout-seconds: 120
success-line: "Demo completed successfully"
retry-attempts: 3
- name: Configure MQTT Basic TLS Demo
shell: bash
working-directory: FreeRTOS-Plus/Demo/coreMQTT_Windows_Simulator/MQTT_Basic_TLS
run: |
echo '#define democonfigROOT_CA_PEM \' >> demo_config.h
sed 's/.*/"&\\n"\\/' ${{ steps.generate-credentials.outputs.root-ca-cert-path }} >> root_ca_cert.txt
sed '$ s/.$//' root_ca_cert.txt >> demo_config.h
echo '#define democonfigCLIENT_IDENTIFIER "mqtt_demo_test"' >> demo_config.h
echo '#define democonfigMQTT_BROKER_ENDPOINT "127.0.0.1"' >> demo_config.h
echo '#define democonfigMQTT_BROKER_PORT ( 8883 )' >> demo_config.h
sed -i -z "s/define[[:space:]]*democonfigDISABLE_SNI[[:space:]]*([[:space:]]*[a-zA-Z0-9]\+[[:space:]]*)/define democonfigDISABLE_SNI ( pdTRUE )/g" demo_config.h
- name: Build MQTT Basic TLS Demo
id: build-mqtt-basic-tls-demo
working-directory: FreeRTOS-Plus/Demo/coreMQTT_Windows_Simulator/MQTT_Basic_TLS
run: msbuild mqtt_basic_tls_demo.sln -t:rebuild -property:Configuration=Debug_with_Libslirp -property:Platform=Win32 -m
- name: Run and monitor MQTT Basic TLS Demo
if: success() || failure() && steps.build-mqtt-basic-tls-demo.outcome == 'success'
uses: FreeRTOS/CI-CD-GitHub-Actions/executable-monitor@main
with:
exe-path: FreeRTOS-Plus/Demo/coreMQTT_Windows_Simulator/MQTT_Basic_TLS/Debug_with_Libslirp/MQTT_Basic_TLS.exe
log-dir: demo_run_logs
timeout-seconds: 120
success-line: "Demo completed successfully"
retry-attempts: 3
- name: Configure MQTT Mutual Authentication with mbedtls Demo
shell: bash
working-directory: FreeRTOS-Plus/Demo/coreMQTT_Windows_Simulator/MQTT_Mutual_Auth
run: |
echo '#define democonfigROOT_CA_PEM \' >> demo_config.h
sed 's/.*/"&\\n"\\/' ${{ steps.generate-credentials.outputs.root-ca-cert-path }} >> root_ca_cert.txt
sed '$ s/.$//' root_ca_cert.txt >> demo_config.h
echo '#define democonfigCLIENT_CERTIFICATE_PEM \' >> demo_config.h
sed 's/.*/"&\\n"\\/' ${{ steps.generate-credentials.outputs.device-cert-path }} >> device_cert.txt
sed '$ s/.$//' device_cert.txt >> demo_config.h
echo '#define democonfigCLIENT_PRIVATE_KEY_PEM \' >> demo_config.h
sed 's/.*/"&\\n"\\/' ${{ steps.generate-credentials.outputs.device-priv-key-path }} >> device_priv_key.txt
sed '$ s/.$//' device_priv_key.txt >> demo_config.h
echo '#define democonfigCLIENT_IDENTIFIER "mqtt_demo_test"' >> demo_config.h
echo '#define democonfigMQTT_BROKER_ENDPOINT "127.0.0.1"' >> demo_config.h
echo '#define democonfigMQTT_BROKER_PORT ( 8883 )' >> demo_config.h
sed -i -z "s/define[[:space:]]*democonfigDISABLE_SNI[[:space:]]*([[:space:]]*[a-zA-Z0-9]\+[[:space:]]*)/define democonfigDISABLE_SNI ( pdTRUE )/g" demo_config.h
- name: Build MQTT Mutual Authentication with mbedtls Demo
id: build-mqtt-mutual-auth-demo
working-directory: FreeRTOS-Plus/Demo/coreMQTT_Windows_Simulator/MQTT_Mutual_Auth
run: msbuild mqtt_mutual_auth_demo.sln -t:rebuild -property:Configuration=Debug_with_Libslirp -property:Platform=Win32 -m
- name: Run and monitor MQTT Mutual Authentication with mbedtls Demo
if: success() || failure() && steps.build-mqtt-mutual-auth-demo.outcome == 'success'
uses: FreeRTOS/CI-CD-GitHub-Actions/executable-monitor@main
with:
exe-path: FreeRTOS-Plus/Demo/coreMQTT_Windows_Simulator/MQTT_Mutual_Auth/Debug_with_Libslirp/MQTT_Mutual_Auth.exe
log-dir: demo_run_logs
timeout-seconds: 120
success-line: "Demo completed successfully"
retry-attempts: 3
- name: Configure MQTT Keep Alive Demo
shell: bash
working-directory: FreeRTOS-Plus/Demo/coreMQTT_Windows_Simulator/MQTT_Keep_Alive
run: |
echo '#ifndef DEMO_CONFIG_H_TEST_BUILD' >> demo_config.h
echo ' #define DEMO_CONFIG_H_TEST_BUILD' >> demo_config.h
echo ' #define democonfigCLIENT_IDENTIFIER "mqtt_demo_test"' >> demo_config.h
echo ' #define democonfigMQTT_BROKER_ENDPOINT "127.0.0.1"' >> demo_config.h
echo ' #define democonfigMQTT_BROKER_PORT ( 1883 )' >> demo_config.h
echo '#endif /* DEMO_CONFIG_H_TEST_BUILD */' >> demo_config.h
- name: Build MQTT Keep Alive Demo
id: build-mqtt-keep-alive-demo
working-directory: FreeRTOS-Plus/Demo/coreMQTT_Windows_Simulator/MQTT_Keep_Alive
run: msbuild mqtt_keep_alive_demo.sln -t:rebuild -property:Configuration=Debug_with_Libslirp -property:Platform=Win32 -m
- name: Run and monitor MQTT Keep Alive Demo
if: success() || failure() && steps.build-mqtt-keep-alive-demo.outcome == 'success'
uses: FreeRTOS/CI-CD-GitHub-Actions/executable-monitor@main
with:
exe-path: FreeRTOS-Plus/Demo/coreMQTT_Windows_Simulator/MQTT_Keep_Alive/Debug_with_Libslirp/MQTT_Keep_Alive.exe
log-dir: demo_run_logs
timeout-seconds: 90
success-line: "Demo completed successfully"
retry-attempts: 3
- name: Configure MQTT Serializer Demo
shell: bash
working-directory: FreeRTOS-Plus/Demo/coreMQTT_Windows_Simulator/MQTT_Serializer
run: |
echo '#define democonfigCLIENT_IDENTIFIER "mqtt_demo_test"' >> demo_config.h
echo '#define democonfigMQTT_BROKER_ENDPOINT "127.0.0.1"' >> demo_config.h
echo '#define democonfigMQTT_BROKER_PORT ( 1883 )' >> demo_config.h
- name: Build MQTT Serializer Demo
id: build-mqtt-serializer-demo
working-directory: FreeRTOS-Plus/Demo/coreMQTT_Windows_Simulator/MQTT_Serializer
run: msbuild mqtt_serializer_demo.sln -t:rebuild -property:Configuration=Debug -m
run: msbuild mqtt_serializer_demo.sln -t:rebuild -property:Configuration=Debug_with_Libslirp -property:Platform=Win32 -m
- name: Run and monitor MQTT Serializer Demo
if: success() || failure() && steps.build-mqtt-serializer-demo.outcome == 'success'
uses: FreeRTOS/CI-CD-GitHub-Actions/executable-monitor@main
with:
exe-path: FreeRTOS-Plus/Demo/coreMQTT_Windows_Simulator/MQTT_Serializer/Debug_with_Libslirp/MQTT_Serializer.exe
log-dir: demo_run_logs
timeout-seconds: 90
success-line: "Demo completed successfully"
retry-attempts: 3
- name: Configure MQTT Mutual Authentication with WolfSSL Demo
shell: bash
working-directory: FreeRTOS-Plus/Demo/coreMQTT_Windows_Simulator/MQTT_Mutual_Auth_wolfSSL
run: |
echo '#define democonfigCREDENTIALS_IN_BUFFER 0' >> demo_config.h
echo '#define democonfigROOT_CA_PEM \' >> demo_config.h
sed 's/.*/"&\\n"\\/' ${{ steps.generate-credentials.outputs.root-ca-cert-path }} >> root_ca_cert.txt
sed '$ s/.$//' root_ca_cert.txt >> demo_config.h
echo '#define democonfigCLIENT_CERTIFICATE_PEM \' >> demo_config.h
sed 's/.*/"&\\n"\\/' ${{ steps.generate-credentials.outputs.device-cert-path }} >> device_cert.txt
sed '$ s/.$//' device_cert.txt >> demo_config.h
echo '#define democonfigCLIENT_PRIVATE_KEY_PEM \' >> demo_config.h
sed 's/.*/"&\\n"\\/' ${{ steps.generate-credentials.outputs.device-priv-key-path }} >> device_priv_key.txt
sed '$ s/.$//' device_priv_key.txt >> demo_config.h
echo '#define democonfigCLIENT_IDENTIFIER "mqtt_demo_test"' >> demo_config.h
echo '#define democonfigMQTT_BROKER_ENDPOINT "127.0.0.1"' >> demo_config.h
echo '#define democonfigMQTT_BROKER_PORT ( 8883 )' >> demo_config.h
- name: Build MQTT Mutual Authentication with WolfSSL Demo
id: build-mqtt-mutual-auth-with-wolfssl-demo
working-directory: FreeRTOS-Plus/Demo/coreMQTT_Windows_Simulator/MQTT_Mutual_Auth_wolfSSL
run: msbuild mqtt_mutual_auth_demo_wolfSSL.sln -t:rebuild -property:Configuration=Debug_with_Libslirp -property:Platform=Win32 -m
- name: Run and monitor MQTT Mutual Authentication with WolfSSL Demo
if: success() || failure() && steps.build-mqtt-mutual-auth-with-wolfssl-demo.outcome == 'success'
uses: FreeRTOS/CI-CD-GitHub-Actions/executable-monitor@main
with:
exe-path: FreeRTOS-Plus/Demo/coreMQTT_Windows_Simulator/MQTT_Mutual_Auth_wolfSSL/Debug/RTOSDemo.exe
log-dir: demo_run_logs
timeout-seconds: 90
success-line: "Demo completed successfully"
retry-attempts: 3
- name: Configure MQTT Multi-Task Demo
shell: bash
working-directory: FreeRTOS-Plus/Demo/coreMQTT_Windows_Simulator/MQTT_Multitask
run: |
echo '#ifndef DEMO_CONFIG_H_TEST_BUILD' | tee -a demo_config.h
echo ' #define DEMO_CONFIG_H_TEST_BUILD' | tee -a demo_config.h
echo ' #define democonfigCLIENT_CERTIFICATE_PEM ""' | tee -a demo_config.h
echo ' #define democonfigCLIENT_IDENTIFIER ""' | tee -a demo_config.h
echo ' #define democonfigCLIENT_PRIVATE_KEY_PEM ""' | tee -a demo_config.h
echo ' #define democonfigMQTT_BROKER_ENDPOINT ""' | tee -a demo_config.h
echo ' #define democonfigMQTT_BROKER_PORT ( 8883 )' | tee -a demo_config.h
echo ' #define democonfigROOT_CA_PEM ""' | tee -a demo_config.h
echo '#endif /* DEMO_CONFIG_H_TEST_BUILD */' | tee -a demo_config.h
- name: Build MQTT Multi-Task Demo
id: build-mqtt-multitask-demo
working-directory: FreeRTOS-Plus/Demo/coreMQTT_Windows_Simulator/MQTT_Multitask
run: msbuild mqtt_multitask_demo.sln -t:rebuild -property:Configuration=Debug -m
- name: Configure corePKCS11_MQTT_Mutual_Auth_Windows_Simulator
shell: bash
@ -265,7 +471,7 @@ jobs:
- name: Build corePKCS11 + coreMQTT Mutual Auth Demo
working-directory: FreeRTOS-Plus/Demo/corePKCS11_MQTT_Mutual_Auth_Windows_Simulator
run: msbuild corePKCS11_MQTT_Mutual_Auth.sln -t:rebuild
run: msbuild corePKCS11_MQTT_Mutual_Auth.sln -t:rebuild -property:Configuration=Debug -property:Platform=Win32 -m
- name: Configure coreSNTP_Windows_Simulator
shell: bash
@ -279,10 +485,9 @@ jobs:
echo ' #define democonfigSNTP_CLIENT_POLLING_INTERVAL_SECONDS 500U' | tee -a demo_config.h
echo '#endif /* DEMO_CONFIG_H_TEST_BUILD */' | tee -a demo_config.h
- name: coreSNTP Demo
- name: Build coreSNTP Demo
working-directory: FreeRTOS-Plus/Demo/coreSNTP_Windows_Simulator
run: msbuild core_sntp_demo.sln -t:rebuild
run: msbuild core_sntp_demo.sln -t:rebuild -property:Configuration=Debug -property:Platform=Win32 -m
winsim_aws_iot:
name: AWS IoT Windows Simulator Demos
@ -403,8 +608,9 @@ jobs:
with:
exe-path: FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Echo_Posix/build/posix_tcp_demo
log-dir: demo_run_logs
timeout-seconds: 180
success-line: "Received correct data 3 times."
timeout-seconds: 30
success-line: "Received correct data 3 times"
retry-attempts: 3
plus_tcp_arm:
name: FreeRTOS+TCP QEMU ARM MPS2 AN385
@ -442,23 +648,91 @@ jobs:
FreeRTOS/Source \
FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP \
FreeRTOS-Plus/ThirdParty/mbedtls \
FreeRTOS-Plus/ThirdParty/wolfSSL
FreeRTOS-Plus/ThirdParty/wolfSSL \
FreeRTOS-Plus/ThirdParty/glib \
FreeRTOS-Plus/ThirdParty/libslirp
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.1
- name: Install meson
run: pip install meson
- name: Install Glib
continue-on-error: true
shell: cmd
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat"
cd FreeRTOS-Plus/ThirdParty/glib
meson setup build --backend=vs2019 -Dselinux=disabled -Dxattr=false -Dbsymbolic_functions=false -Dtests=false -Dglib_debug=disabled -Dglib_assert=false --buildtype=release
meson compile -C build
- name: Start localhost Echo server
id: echo-server
uses: FreeRTOS/CI-CD-GitHub-Actions/localhost-echo-server@main
with:
port_number: 5000
- name: Build FreeRTOS+TCP Minimal Demo
id: build-plus-tcp-minimal-demo
working-directory: FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Minimal_Windows_Simulator
run: msbuild FreeRTOS_Plus_TCP_Minimal.sln -t:rebuild -property:Configuration=Debug -m
run: |
$content = Get-Content -Path 'DemoTasks\TCPEchoClient_SingleTasks.c' -Raw
$newContent = $content -replace '#define\s+echoECHO_PORT.*', '#define echoECHO_PORT ( 5000 )'
$newContent | Set-Content -Path 'DemoTasks\TCPEchoClient_SingleTasks.c'
$content = Get-Content -Path 'tcp_echo_config.h' -Raw
$newContent = $content -replace '#define\s+configECHO_SERVER_ADDR.*', '#define configECHO_SERVER_ADDR "127.0.0.1"'
$newContent | Set-Content -Path 'tcp_echo_config.h'
$content = Get-Content -Path 'main.c' -Raw
$newContent = $content -replace 'int\s+main(.*?)void(.*?)\r?\n\s*{', 'int main( void ){setvbuf( stdout, NULL, _IONBF, 0 );'
$newContent | Set-Content -Path 'main.c'
msbuild FreeRTOS_Plus_TCP_Minimal.sln -t:rebuild -property:Configuration=Debug_with_Libslirp -property:Platform=Win32 -m
- name: Run and monitor FreeRTOS+TCP Minimal Demo
if: success() || failure() && steps.build-plus-tcp-minimal-demo.outcome == 'success'
uses: FreeRTOS/CI-CD-GitHub-Actions/executable-monitor@main
with:
exe-path: FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Minimal_Windows_Simulator/Debug_with_Libslirp/FreeRTOS_Plus_TCP_Minimal.exe
log-dir: demo_run_logs
timeout-seconds: 30
success-line: "Received correct data 3 times"
retry-attempts: 3
- name: Generate SSL credentials
id: generate-credentials
uses: FreeRTOS/CI-CD-GitHub-Actions/ssl-credential-creator@main
- name: Configure FreeRTOS+WolfSSL Demo
shell: bash
working-directory: FreeRTOS-Plus/Demo/FreeRTOS_Plus_WolfSSL_Windows_Simulator
run: |
cp ${{ steps.generate-credentials.outputs.root-ca-cert-path }} .
cp ${{ steps.generate-credentials.outputs.server-cert-path }} .
cp ${{ steps.generate-credentials.outputs.server-priv-key-path }} .
sed -i -z "s/ca-cert.pem/root_ca_cert.crt/g" SecureTCPServerTask.c
sed -i -z "s/server-cert.pem/server_cert.crt/g" SecureTCPServerTask.c
sed -i -z "s/server-key.pem/server_priv_key.key/g" SecureTCPServerTask.c
sed -i -z "s/ca-cert.pem/root_ca_cert.crt/g" SecureTCPClientTask.c
- name: Build FreeRTOS+WolfSSL Demo
id: build-freertos-wolfssl-demo
working-directory: FreeRTOS-Plus/Demo/FreeRTOS_Plus_WolfSSL_Windows_Simulator
run: msbuild FreeRTOS_Plus_WolfSSL.sln -t:rebuild -property:Configuration=Debug_with_Libslirp -property:Platform=Win32 -m
- name: Run and monitor FreeRTOS+WolfSSL Demo
if: success() || failure() && steps.build-freertos-wolfssl-demo.outcome == 'success'
uses: FreeRTOS/CI-CD-GitHub-Actions/executable-monitor@main
with:
exe-path: FreeRTOS-Plus/Demo/FreeRTOS_Plus_WolfSSL_Windows_Simulator/Debug_with_Libslirp/FreeRTOS_Plus_WolfSSL_Windows_Simulator.exe
log-dir: demo_run_logs
timeout-seconds: 60
success-line: "Received by the secure server: Message number 9"
retry-attempts: 3
- name: Build FreeRTOS+TCP UDP CLI Demo
working-directory: FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_UDP_Mode_CLI_Windows_Simulator
run: msbuild FreeRTOS_Plus_UDP_with_CLI.sln -t:rebuild -property:Configuration=Debug -m
- name: Build FreeRTOS+WolfSSL Demo
working-directory: FreeRTOS-Plus/Demo/FreeRTOS_Plus_WolfSSL_Windows_Simulator
run: msbuild FreeRTOS_Plus_WolfSSL.sln -t:rebuild -property:Configuration=Debug -m
- name: Build FreeRTOS+WolfSSL FIPS Demo
working-directory: FreeRTOS-Plus/Demo/FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator
run: msbuild FreeRTOS_Plus_WolfSSL.sln -t:rebuild -property:Configuration=Debug -m
@ -511,4 +785,3 @@ jobs:
- name: Build FreeRTOS+RelianceEdge+CLI Demo
working-directory: FreeRTOS-Plus/Demo/FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator
run: msbuild FreeRTOS_Plus_Reliance_Edge_with_CLI.sln -t:rebuild -property:Configuration=Debug -m