-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Added Posix Demo run in github action #997
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
.github/workflows/freertos_demos.yml
Outdated
| if: success() || failure() && steps.build-posix-gcc-demo.outcome == 'success' | ||
| working-directory: FreeRTOS/Demo/Posix_GCC | ||
| run: | | ||
| timeout 3m build/posix_demo | tee output.txt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we just integrate this into the github action itself? Suggestions for the command to run the binary:
timeout <seconds from action input>s stdbuf -oL <exe to run from action> &> <exe name>.log &
stdbuf -oL will make it so that only one line of the output is buffered at a time which makes it so another program can read its ouput in "real-time", &> just outputs both stderr and stdout to the output file and the last & runs the command in the background.
Immediately after this command you could call something like
exe_pid=$!
to get the PID of the executable.
At this point you could either start a monitoring script that just reads the output file of the program - this will just read the output to see if the expected output line is found and will stop the action if found or you could just wait for the pid of the executable to stop and capture the exit code by doing the following:
timeout <timeout seconds>s wait $exe_pid
echo $?
Echo $? will output the the exit code of the wait call which will be the exit code of the exe if it stops before the timeout.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One thing to be aware of with this to is that any command run in the action's- "run" field will fail the action if the exit status is not 0 ... which is a bit of an annoying caveat ...
.github/workflows/freertos_demos.yml
Outdated
| - name: Build Posix_GCC Demo | ||
| - name: Build Posix_GCC Full Demo | ||
| id: build-posix-gcc-demo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename this id to build-posix-gcc-full-demo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| id: build-posix-gcc-demo | |
| id: build-posix-gcc-full-demo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename this to this so you can differentiate between the two build steps
.github/workflows/freertos_demos.yml
Outdated
| make -j | ||
| - name: Run and monitor Posix_GCC Full Demo | ||
| if: success() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| if: success() | |
| if: success() || failure() && steps.build-posix-gcc-full-demo.outcome == 'success' |
.github/workflows/freertos_demos.yml
Outdated
| fi | ||
| - name: Build Posix_GCC Blinky Demo | ||
| if: success() || failure() && steps.build-posix-gcc-demo.outcome == 'success' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| if: success() || failure() && steps.build-posix-gcc-demo.outcome == 'success' | |
| id: build-posix-gcc-blinky-demo | |
| if: success() || failure() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
adding this id will allow you to differentiate between the two make steps. success() || failure() will make this run despite previous steps failing, but will still allow you to cancel the flow. You could add an ID to the install gcc step and add it as a dependency as well but probably not needed
.github/workflows/freertos_demos.yml
Outdated
| make -j | ||
| - name: Run and monitor Posix_GCC Blinky Demo | ||
| if: success() || failure() && steps.build-posix-gcc-demo.outcome == 'success' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| if: success() || failure() && steps.build-posix-gcc-demo.outcome == 'success' | |
| if: success() || failure() && steps.build-posix-gcc-blinky-demo.outcome == 'success' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will make it so this only runs as long as the build for the blinky demo succeeds if you commit my previous suggestion.
* Added demo runs for Posix GCC in git action --------- Co-authored-by: Joseph Julicher <[email protected]>
* Add IAR projects for LPC55S69 (#1007) * Add IAR projects for LPC55S69 * IAR Project for trustzone * MCUXpresso and IAR projects for non-trustzone (NTZ) ports Signed-off-by: Gaurav Aggarwal <[email protected]> * Fix build issues and warnings Signed-off-by: Gaurav Aggarwal <[email protected]> * Fix formatting check Signed-off-by: Gaurav Aggarwal <[email protected]> --------- Signed-off-by: Gaurav Aggarwal <[email protected]> * Set configMAX_SYSCALL_INTERRUPT_PRIORITY to 4 for QEMU demos (#986) * Update FreeRTOSConfig.h * Update FreeRTOSConfig.h * Update FreeRTOSConfig.h * Added Posix Demo run in github action (#997) * Added demo runs for Posix GCC in git action --------- Co-authored-by: Joseph Julicher <[email protected]> * Update FreeRTOSconfig.h for M2351 (#1005) The number of implemented priority bits for Armv8-M baseline implementation is defined by the architecture as 2. Therefore the config option `configPRIO_BITS` is updated to 2. In addition, in Armv8-M baseline implementation BASEPRI is RES0. Therefore, `configMAX_SYSCALL_INTERRUPT_PRIORITY` is not supported. Hence this config option is removed. Signed-off-by: Devaraj Ranganna <[email protected]> Co-authored-by: Gaurav-Aggarwal-AWS <[email protected]> * Fix file path in the project file (#1013) Signed-off-by: Gaurav Aggarwal <[email protected]> * Add unit tests for kernel PR #679 (#1015) Also, fix the broken tests by that PR. Signed-off-by: Gaurav Aggarwal <[email protected]> * Update FreeRTOS-Kernel Source submodule * Updating kernel release script to update source files with tags and release in separate scripts (#1016) * separating source file updation to separate script * give execute permission to update_src_version.py * risc-v: Fix build flags and linker scripts (#906) 1. miss debug info in assembly code RISC-V-spike-htif_GCC LDFLAGS add arch and abi info for linker for riscv64-unknown-elf multilib, if there is no arch and abi info, will link to default lib and have below error target emulation `elf32-littleriscv' does not match `elf64-littleriscv' use CFLAGS to replace ASFLAGS when compile assembly code because DEBUG flag is added in CFLAGS, if we use ASFLAGS to compile assembly code, there is no debug info in assembly code objfile 2. binutils 2.39 ld warn 'has a LOAD segment with RWX permissions' RISC-V-Qemu-virt_GCC RISC-V-spike-htif_GCC RISC-V_RV32_QEMU_VIRT_GCC 3. fix build fail RISC-V_RV32_QEMU_VIRT_GCC Signed-off-by: Eric Chan <[email protected]> * Create GitHub Workflows that execute the p3 FreeRTOS Kernel Demos (#1018) * test full demo * Revert "test full demo" This reverts commit 09efa00. revert back to origin * pre-define user demo to blinky demo * pre-define user demo to blinky demo with -j * test run win32-msvc demo * test run win32-msvc demo * test run win32-msvc demo * update git workflow to run WIN32-MSVC demo * update git workflow to run WIN32-MSVC demo * update git workflow to run WIN32-MSVC demo * update git workflow to run WIN32-MSVC demo * update git workflow to run WIN32-MSVC demo * update git workflow to run WIN32-MSVC demo * update git workflow to run WIN32-MSVC demo * update trigger action * build and run WIN32-MSVC blinky demo * build and run WIN32-MSVC blinky demo * build and run WIN32-MSVC blinky demo * update WIN32-MSVC workflow * update WIN32-MSVC Demo main.c file to remove buffer * Update main.c files to remove buffer when running executable_monitor file for Git Action * update formatting for WIN32-MSVC demos * update formatting for Posix demo * update comment for setvbuf function used in main.c * add git build and run action for WIN32-MingW Full and Blinky demos; update main.c file to set buffer size as 0 * add git build and run action for WIN32-MingW Full and Blinky demos; update main.c file to set buffer size as 0 * remove whitespace for freertos_demos.yml file * add function to Force stdout to write immediately by setting the buffer size for it to 0 in demo main.c file when running git Run Action; Correct formatting error for WIN32-MingW main.c file * add function to Force stdout to write immediately by setting the buffer size for it to 0 in demo main.c file when running git Run Action * update git run action commands for Posix_GCC demo * update git run action commands for Posix_GCC demo * update git run action commands for Posix_GCC demo * reduce timeout and correct formatting issue * reduce timeout --------- Co-authored-by: Xiaodong Li <[email protected]> * Revert "Remove coroutines (#874)" (#1019) * Revert "Remove coroutines (#874)" This reverts commit 569c78f. * Update freertos Kernel submodule to latest head * Remove temporary files * Fix MingW demos and spell check * Fix manifest version; fix headers * Add ignore files and paths to core-checker.py * Fix copyright in remaining files * Fix PR check build failure 1. Remove defining `inline` in Makefile. This was causing build warnings. 2. Ensure that the linker removed unused functions from various compilation units. 3. Update the linker script so that all the functions are correctly placed in FLASH section. Signed-off-by: Gaurav Aggarwal <[email protected]> --------- Signed-off-by: Gaurav Aggarwal <[email protected]> Co-authored-by: Gaurav Aggarwal <[email protected]> * Adding CMakeList.txt in posix GCC demos (#1020) * Add cmake for posix GCC demo --------- Co-authored-by: Gaurav-Aggarwal-AWS <[email protected]> * Update File Header CI check failures --------- Signed-off-by: Gaurav Aggarwal <[email protected]> Signed-off-by: Devaraj Ranganna <[email protected]> Signed-off-by: Eric Chan <[email protected]> Co-authored-by: Gaurav-Aggarwal-AWS <[email protected]> Co-authored-by: kar-rahul-aws <[email protected]> Co-authored-by: xuelix <[email protected]> Co-authored-by: Joseph Julicher <[email protected]> Co-authored-by: Devaraj Ranganna <[email protected]> Co-authored-by: Paul Bartell <[email protected]> Co-authored-by: Tony Josi <[email protected]> Co-authored-by: e14002270 <[email protected]> Co-authored-by: Xiaodong Li <[email protected]> Co-authored-by: Xiaodong Li <[email protected]> Co-authored-by: Aniruddha Kanhere <[email protected]> Co-authored-by: Gaurav Aggarwal <[email protected]> Co-authored-by: chinglee-iot <[email protected]>
* Added demo runs for Posix GCC in git action --------- Co-authored-by: Joseph Julicher <[email protected]>
Description
During the action, after demo build, Posix_GCC port will run both Full demo and Blinky demo.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.