boinc icon indicating copy to clipboard operation
boinc copied to clipboard

[CI] Add 'samples/wrapper/BuildMacWrapper.sh' to CI build flow

Open AenBleidd opened this issue 3 years ago • 4 comments

AenBleidd avatar Aug 19 '22 13:08 AenBleidd

The BuildmacWraspper.sh script probably won't need to be modified to run under CI, but both Makefile and Makefile_Mac will need modification, since it doesn't make sense to add the Mac Wrapper builds to CI without also adding the Windows and Linux builds. (I don't know if there is an Android version of Wrapper.)

Building the Wrapper depends on linking it with several BOINC libraries which must have been previously built separately. They cannot now be built as part of this build process because wrapper is not part of the Xcode , vcxproj or Linux make projects which build these libraries. The CI builds store the built libraries in a different location relative to the wrapper source files and make files than when built on a local computer. As a result, the make files will almost certainly need to be substantially modified to build under CI.

For that reason, and because the wrapper is updated so rarely (the previous builds were 7 wars ago), the benefit of adding the builds to CI is minimal while the effort is great. I strongly recommend against doing this.

CharlieFenton avatar Aug 20 '22 03:08 CharlieFenton

The CI builds store the built libraries in a different location relative to the wrapper source files and make files than when built on a local computer.

Actually, I'm not sure about this, so you might want to test it. At least in the case of the Mac, when BuildmacBOINC.sh is run on a local computer, it puts the built libraries as well as the intermediate files (*.o, etc.) into the source tree under the mac_build directory, which is where the Wrapper make files expect to find the built BOINC libraries. And the wrapper builds put the generated executable and *.o files in the Samples/wrapper directory. I suspect that we would not want these build products added to the source tree on GitHub, but I don't know if that is where the CI build puts them.

CharlieFenton avatar Aug 20 '22 04:08 CharlieFenton

We have already build CI flows for win/Linux/Android to build on every PR or push to master. Having the same done for osx would be nice and consistent. I'll check this script and will try 5o do the same we have already for osx CI flow. I doubt this will require changes in Makefile but let's see. I have limited access to osx device to test both local and CI builds.

AenBleidd avatar Aug 20 '22 04:08 AenBleidd

We have already build CI flows for win/Linux/Android to build on every PR or push to master.

I did not know we were already building the Samples for other platforms under CI. In that case, it may work for macOS without major changes.

CharlieFenton avatar Aug 20 '22 07:08 CharlieFenton

Hey, I'd like to work on this. Can you guide me on how I can go about adding scripts to CI build flows as I'm new to this

aswarthm avatar Sep 28 '22 16:09 aswarthm

@aswarthm, OSX CI flows are configured here: https://github.com/BOINC/boinc/blob/master/.github/workflows/osx.yml You should check this file and others in the same folder to understand how it works now and how to add a new flow.

AenBleidd avatar Sep 28 '22 17:09 AenBleidd

Sure, I'll take this up during Hacktoberfest

aswarthm avatar Sep 29 '22 10:09 aswarthm