#25 ✓resolved
Thell Fowler

[trivial] introduce Hudson job and build script

Reported by Thell Fowler | November 28th, 2009 @ 05:26 PM

This is a no-code change that adds a simple Hudson continuous integration server job and script to the project for anyone desiring to do build testing.

Comments and changes to this ticket

  • Thell Fowler

    Thell Fowler November 28th, 2009 @ 05:36 PM

    • State changed from “new” to “needs_ack”

    Available for ack review at:

    http://github.com/almostautomated/npp-community/tree/tf/LH-25/intro...

    hudson: introduce Hudson job and build script

    • Hudson, the continuous integration server, can be easily installed and setup locally by any developer until we have an official public build server. It requires java and the hudson.war. After starting the Hudson server using 'java -jar hudson.war' create a new job, then shutdown the server, copy the contrib\hudson-ci\config.xml to your local ~.hudson\$new_project\ path replacing the one that is there and restart the hudson server. Lastly, you will need to define a NPPCR_ROOT_PATH variable under in the 'Manage Hudson' area. Edit the job configurations to suit your needs.

    [#25 state:needs_ack]

    Signed-off-by: Thell Fowler git@tbfowler.name

  • Thell Fowler

    Thell Fowler December 12th, 2009 @ 03:43 PM

    (from [fd6b4e6102c9b4493a2bfdd8c83c662337943e55]) hudson: introduce Hudson job and build script

    • Hudson, the continuous integration server, can be easily installed and setup locally by any developer until we have an official public build server. It requires java and the hudson.war. After starting the Hudson server using 'java -jar hudson.war' create a new job, then shutdown the server, copy the contrib\hudson-ci\config.xml to your local ~.hudson\$new_project\ path replacing the one that is there and restart the hudson server. Lastly, you will need to define a NPPCR_ROOT_PATH variable under in the 'Manage Hudson' area. Edit the job configurations to suit your needs.

    [#25]

    Signed-off-by: Thell Fowler git@tbfowler.name
    http://github.com/almostautomated/npp-community/commit/fd6b4e6102c9...

  • Thell Fowler

    Thell Fowler February 3rd, 2010 @ 03:46 AM

    (from [8a18547da9b99df3ef55e30f2db9c83a8bf17b8d]) hudson: introduce Hudson job and build script

    • Hudson, the continuous integration server, can be easily installed and setup locally by any developer until we have an official public build server. The test script verifies builds using a matrix of settings covering VC 8, VC 9, Google Mock and test both as submodules and as stand-alone installs, Debug, Release, and Shipping builds as well as executing the Debug build to check output for detected memory leaks.
    • Includes README with setup documentation.
    • Requires the Hudson Setenv Plugin

    [#25]

    Signed-off-by: Thell Fowler git@tbfowler.name
    http://github.com/almostautomated/npp-community/commit/8a18547da9b9...

  • Thell Fowler

    Thell Fowler February 3rd, 2010 @ 03:46 AM

    (from [e7a01c48278cd64c92c36ed7df15298a2f6dca3c]) NPPCR-HUDSON-BUILD-TESTS.bat: add leakdetect switch

    • This patch makes use of the NPPCR leakdetect switch to enable auto exit after notepad_plus initializes and emits the NPPN_READY msg so that we can get a more accurate memory leak detection check.

    • This patch is on top of patches from [#33]

    [#25] http://github.com/almostautomated/npp-community/commit/e7a01c48278c...

  • Jocelyn Legault

    Jocelyn Legault February 5th, 2010 @ 06:30 AM

    From the README file

    • The following line:

    select the 'Hudson Setenv Plugin' for installation.

    Should read

    select the 'Setenv Plugin' for installation.

    As it's how it's named in the plugin list (though it's named as currently written in the README once installed).
    - The New job creation step doesn't mention what type of job we should create. - Mentioning that none of the options are required and that we can safely press "save" from the Job creation page would also be a nice plus in the setup steps. - The following step:

    Copy the contrib\Hudson-ci\config.xml file to ~.hudson\jobs\N++CR Matrix\

    isn't clear for casual Windows users. It should probably be:

    Copy the contrib\Hudson-ci\config.xml file to C:\Document and Settings<username>.hudson\jobs\N++CR Matrix\

    In the batch file

    The following lines (23 and 24)

    set NPPCR_GTEST_DIR=
    set NPPCR_GTEST_DIR=
    

    should read

    set GOOGLE_TEST_DIR=
    set GOOGLE_MOCK_DIR=
    

    At this point, I still can't get the projects to build correctly. I'll get back to it asap.

  • Thell Fowler

    Thell Fowler February 5th, 2010 @ 08:57 PM

    (from [363433bf3f22e1d78373dd805777b8d6fd7f0d8e]) NPPCR-HUDSON-BUILD-TESTS.bat: add leakdetect switch

    • This patch makes use of the NPPCR leakdetect switch to enable auto exit after notepad_plus initializes and emits the NPPN_READY msg so that we can get a more accurate memory leak detection check.

    • This patch is on top of patches from [#33]

    [#25]

    Signed-off-by: Thell Fowler git@tbfowler.name
    http://github.com/almostautomated/npp-community/commit/363433bf3f22...

  • Thell Fowler

    Thell Fowler February 5th, 2010 @ 09:05 PM

    Should read

    select the 'Setenv Plugin' for installation.

    Corrected

    The New job creation step doesn't mention what type of job we should create. - Mentioning >that none of the options are required and that we can safely press "save" from the Job >creation page would also be a nice plus in the setup steps.

    Corrected, now states to select the 'Build Multi-Config'

    Copy the contrib\Hudson-ci\config.xml file to ~.hudson\jobs\N++CR Matrix\ isn't clear for casual Windows users. It should probably be:

    Copy the contrib\Hudson-ci\config.xml file to C:\Document and Settings.hudson\jobs\N++CR Matrix\

    Altered to state:
    Copy the contrib\Hudson-ci\config.xml file to ~.hudson\jobs\N++CR Matrix\ in your home directory.

    The following lines (23 and 24)

    set NPPCR_GTEST_DIR= set NPPCR_GTEST_DIR=

    should read

    set GOOGLE_TEST_DIR= set GOOGLE_MOCK_DIR=

    Corrected.

    At this point, I still can't get the projects to build correctly. I'll get back to it asap.

    Let me know.

  • Jocelyn Legault

    Jocelyn Legault February 7th, 2010 @ 06:17 AM

    I updated to the new GTest and GMock (1.4), and I've build both libraries in Debug and Release with both VC8 and VC9.
    I've also compiled manually N++CR with VC8 and VC9 in all configurations, and everything went just fine.
    However, with Hudson, it seems that only the Shipping builds worked. For all other builds, it seems the cl.exe that is started by Hudson can't figure out where to get gtest.lib from.

    I've attached the logs I've produced so far. Simply look at the 2010-02-06_23-03-25 logs for the results I got with everything updated.

  • Thell Fowler

    Thell Fowler February 7th, 2010 @ 10:59 PM

    (from [72514699b5e30b0928e7af0f55cb8021f52a66b5]) NPPCR-HUDSON-BUILD-TESTS.bat: add leakdetect switch

    • This patch makes use of the NPPCR leakdetect switch to enable auto exit after notepad_plus initializes and emits the NPPN_READY msg so that we can get a more accurate memory leak detection check.

    • This patch is on top of patches from [#33]

    [#25]

    Signed-off-by: Thell Fowler git@tbfowler.name
    http://github.com/almostautomated/npp-community/commit/72514699b5e3...

  • Jocelyn Legault

    Jocelyn Legault February 8th, 2010 @ 04:33 AM

    In the following block:

    if %ERR_CODE% EQU 0 (
      set MSBUILD_OPTS=/v:detailed /t:rebuild /p:Configuration
      call set MSBUILD_OPTS=%%MSBUILD_OPTS%%=%NPPCR_BUILD_CONFIGURATION%
      call msbuild %%MSBUILD_OPTS%% "%NPPCR_ROOT_PATH%%SOLUTION%"
      set ERR_CODE=%ERRORLEVEL%
    )
    

    The set ERR_CODE=%ERRORLEVEL% can't work. You absolutely need to use
    setLocal EnableDelayedExpansion and !ERRORLEVEL in that case, like so:

    setLocal EnableDelayedExpansion
    if %ERR_CODE% EQU 0 (
      set MSBUILD_OPTS=/v:detailed /t:rebuild /p:Configuration
      call set MSBUILD_OPTS=%%MSBUILD_OPTS%%=%NPPCR_BUILD_CONFIGURATION%
      call msbuild %%MSBUILD_OPTS%% "%NPPCR_ROOT_PATH%%SOLUTION%"
      set ERR_CODE=!ERRORLEVEL!
    )
    endLocal
    

    You will never get the accurate value for ERRORLEVEL otherwise.

  • Thell Fowler

    Thell Fowler February 8th, 2010 @ 07:18 PM

    Good eye! I should have removed that if block while I was there.

    I restructured it a bit so as to not need the if block.

    Now the variables are setup and found at the start of the file, Then the main processing routine is run.

  • Thell Fowler

    Thell Fowler February 8th, 2010 @ 07:19 PM

    (from [aac98d60bc6390e317e32b7ad8778ffb41f50dc6]) NPPCR-HUDSON-BUILD-TESTS.bat: add leakdetect switch

    • This patch makes use of the NPPCR leakdetect switch to enable auto exit after notepad_plus initializes and emits the NPPN_READY msg so that we can get a more accurate memory leak detection check.

    • This patch is on top of patches from [#33]

    [#25]

    Signed-off-by: Thell Fowler git@tbfowler.name
    http://github.com/almostautomated/npp-community/commit/aac98d60bc63...

  • Jocelyn Legault

    Jocelyn Legault February 9th, 2010 @ 04:38 AM

    Now it seems it works too well!
    All the configurations built properly, even the submodule ones... However, I don't have GMock and GTest setup as submodules so it should have failed.

    You'll find the whole ~/.hudson/jobs folder attached.

  • Jocelyn Legault

    Jocelyn Legault February 9th, 2010 @ 06:05 AM

    • State changed from “needs_ack” to “acked”
  • Thell Fowler

    Thell Fowler February 14th, 2010 @ 05:57 PM

    • State changed from “acked” to “proposed”
  • Thell Fowler

    Thell Fowler February 26th, 2010 @ 08:12 PM

    • State changed from “proposed” to “candidate”
  • Thell Fowler

    Thell Fowler October 29th, 2010 @ 11:23 PM

    • State changed from “candidate” to “resolved”
    • Milestone order changed from “0” to “0”

    This was merged into master but I forgot to reference this ticket.


    Merge branch 'tf/LH-25v7/introduce-hudson-build-script'

    • tf/LH-25v7/introduce-hudson-build-script: NPPCR-HUDSON-BUILD-TESTS.bat: add leakdetect switch hudson: introduce Hudson job and build script

    http://github.com/npp-community/npp-community/commit/6f57f14c6bb031...

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.