-
Notifications
You must be signed in to change notification settings - Fork 202
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
Fix95, CI build multiple targets #758
Fix95, CI build multiple targets #758
Conversation
Added a second CPU to the build configuration to ensure the build system is functioning properly with Travis CI for multiple targets. Resolves: nasa#95
After adding the second CPU (by uncommenting CPU2 from targets.cmake), added in necessary scr and header files for cpu2. Combined, this should make cpu2 in the exe directory. This build configuration if successful will ensure the build system is functioning properly with Travis CI for multiple targets. Resolves: nasa#95
In my original commits from git, it looks like it might be linking to the cFE issue #95 which is not correct. This pull request is intended to resolve nasa/cFS#95. |
|
||
# CPU2 is uncommented to test Travis CI's ability to build multiple targets, ensuring | ||
# the build system is functioning properly. | ||
SET(TGT2_NAME cpu2) | ||
SET(TGT2_APPLIST sample_app sample_lib ci_lab to_lab sch_lab) | ||
SET(TGT2_FILELIST cfe_es_startup.scr) |
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.
Don't change the default behavior of cFE out of the box. This should be part of CI if you want to check 2 targets with CI.
You need to open an issue in this repository specific to the changes you are doing here. As noted above, don't change the default, out-of-the-box behavior of cFE/cFS. You can add the sample configuration files (which is what I recommend you write the issue to do), but the actual configuration change to build 2 targets should be done with CI from cFS. |
I didn't see how to make adjustments in .travis.yml because it looks like CI only does one build for all targets. |
The CI in nasa/cFE doesn't build anything. That's why the issue is in cFS, at which it does a matrix build of the entire framework. I recommend from cFS, write a script to reconfigure the system to build 2 CPUs (the part that I said don't do in this repo), and add another build to the cFS matrix that calls that script and does the two CPU build. |
In fact it may make more sense to not add these files, since they are (I assume?) just a copy of the cpu1 files. Rather just copy them from cpu1_* as part of the script. Otherwise we'd now have 2 sets of files that we need to keep up to date. The copy is trivial and I'd think it would always work if just building. |
We currently have targets.cmake with (commented out) CPU2 & CPU3, either we should remove those entries and have .travis.yml create entries or we should have all of the relevant files in sample_defs to support CPU2/3 if they are uncommented and just have .travis.yml uncomment the entries. We can discuss at CCB today? |
The only reference I could find regarding multiple targets in the Travis CI documentation was here: https://docs.travis-ci.com/user/build-stages/#naming-your-build-stages It looks like we'd have to make two scripts? |
What I suggest you do is have travis alter the targets.cmake and create the addl. .scr and .h files, then just do a single build (which will create multiple CPU's). |
Note you can put targets inside an "if" statement like this:
Note this isn't a pattern I'd recommend projects clone for their own mission config, but it works for CI. We can also have CI-specific "defs" directories stored in a separate CI repo. Ideally for an extended validation test we should build with other CFS apps, and old/imported configs like real projects would. This may not always work, but we should know if we broke it, as it means we probably need to add something in the release notes to guide users that are upgrading. |
Describe the contribution
Added a CPU2 as a second target to the build configuration to ensure build system is functioning properly with Travis CI for multiple targets.
Also added the following files:
Resolves: cFS bundle's issue 95 nasa/cFS#95
Testing performed
Steps taken to test the contribution:
Went through the build steps from "Build and Run" section of https://github.com/nasa/cFS
Expected behavior changes
Expected to see cpu2 in the exe directory, but it did not appear; still only cpu1 was made for me.
However, this worked for Chris Knight after he cloned cFS and pulled from my fork (cpu1 and cpu2 were made).
System(s) tested on
Contributor Info - All information REQUIRED for consideration of pull request
Jandlyn Bentley, NASA-GSFC