From 637bde0183150d1f9492223c8f3f46d938f534ec Mon Sep 17 00:00:00 2001 From: xuelix <33909469+xuelix@users.noreply.github.com> Date: Mon, 8 May 2023 15:29:47 -0700 Subject: Added Posix Demo run in github action (#997) * Added demo runs for Posix GCC in git action --------- Co-authored-by: Joseph Julicher --- .github/workflows/freertos_demos.yml | 43 +++++++++++++++++++++++++++++++++--- 1 file changed, 40 insertions(+), 3 deletions(-) diff --git a/.github/workflows/freertos_demos.yml b/.github/workflows/freertos_demos.yml index f09dac156..6b20a08be 100644 --- a/.github/workflows/freertos_demos.yml +++ b/.github/workflows/freertos_demos.yml @@ -1,5 +1,7 @@ name: FreeRTOS Demos -on: pull_request +on: + push: + pull_request: jobs: WIN32-MSVC: @@ -66,10 +68,45 @@ jobs: sudo apt-get -y update sudo apt-get -y install build-essential - - name: Build Posix_GCC Demo + - name: Build Posix_GCC Full Demo + id: build-posix-gcc-full-demo shell: bash working-directory: FreeRTOS/Demo/Posix_GCC - run: make -j + run: | + make -j + + - name: Run and monitor Posix_GCC Full Demo + if: success() || failure() && steps.build-posix-gcc-full-demo.outcome == 'success' + working-directory: FreeRTOS/Demo/Posix_GCC + run: | + timeout 5m build/posix_demo | tee output.txt + if grep -q "OK: No errors" output.txt; then + echo -e "\nSUCCESS - Found SUCCESS string in output." + else + echo -e "\nFAILURE - SUCCESS string not found in output." + exit 1 + fi + + - name: Build Posix_GCC Blinky Demo + id: build-posix-gcc-blinky-demo + if: success() || failure() + shell: bash + working-directory: FreeRTOS/Demo/Posix_GCC + run: | + sed -i "s/#define[[:space:]]\+mainSELECTED_APPLICATION[[:space:]]\+FULL_DEMO/#define mainSELECTED_APPLICATION BLINKY_DEMO/g" main.c + make -j + + - name: Run and monitor Posix_GCC Blinky Demo + if: success() || failure() && steps.build-posix-gcc-blinky-demo.outcome == 'success' + working-directory: FreeRTOS/Demo/Posix_GCC + run: | + timeout 30s build/posix_demo | tee output.txt + if grep -q "Message received from software timer" output.txt; then + echo -e "\nSUCCESS - Found SUCCESS string in output." + else + echo -e "\nFAILURE - SUCCESS string not found in output." + exit 1 + fi MSP430-GCC: name: GNU MSP430 Toolchain -- cgit v1.2.1