Skip to content

Travis-CI ignoring cmake flags #28

Closed

Description

@tresf

So for some reason Travis-CI is skipping some of our cmake flags. I’m not sure why. Here’s an example: https://travis-ci.org/java-native/java-simple-serial-connector/jobs/517483760#L851

cmake-generate:
     [exec] -- Configuring done
     [exec] CMake Warning:-- Generating done
     [exec]   Manually-specified variables were not used by the project:
     [exec] 
     [exec]     CMAKE_TOOLCHAIN_FILE
     [exec] 

The builds aren’t catching this problem -- of course — because we’re (intentionally) not doing unit tests on cross-compiles. This can be reproduced locally if you don’t delete /target between cross-compile builds. One “fix” is to call mvn clean (or equivalent) before each build, but before blindly doing that, first I’d like to know how the /target directory can even exist when we’re not explicitly caching it. Thoughts welcome. Please help baby-sit Travis-CI for a bit to make sure it does not happen again.

Activity

  1. bmarwell commented on Apr 9, 2019

    @bmarwell

    Yeah always do clean install. At the moment it is just install.
    We should also remove the cached entries from $HOME/.m2/repository/jssc/

  2. added a commit that references this issue on Apr 9, 2019
    1eb4601
  3. bmarwell commented on Apr 9, 2019

    @bmarwell

    The commit does two things to fix this:

    • defaultGoal in pom.xml set to clean install instead of just install.
    • Remove the artefacts generated from previous builds from the cached .m2/repository folder.

    Enhancement:

    • resolve/download dependencies before executing mvn --batch-mode clean install, so the output does not get clutterd with "Downloading ….jar" messages.

    @tresf please close if you agree to that commit.

  4. tresf commented on Apr 9, 2019

    @tresf
    Author

    The commit 1eb4601 does two things to fix this:

    • Remove the artefacts generated from previous builds from the cached .m2/repository folder.

    Thanks. Travis-CI offers a before_cache: step. I've moved cache cleanup step there (also simplified the logic -- currently blows away any java-native namespaced maven cached objects), hopefully it's desired, but note this should have nothing to do with this bug report.

    • defaultGoal in pom.xml set to clean install instead of just install.

    Although this technically fixes the problem, this has been reverted as it can have negative effects on users. This will force mvn for the casual user to rebuild the entire project each time, something that's undesired.

    I think a more permanent solution is to find out why CMakeCache.txt is getting cached to begin with; a possible bug with Travis-CI.

  5. tresf commented on Apr 9, 2019

    @tresf
    Author

    The latest commits are no longer showing this symptom. I believe it to be a fluke with Travis-CI but I do not have a commercial support contract with Travis to escalate. I'm going to close this for now, but we should still babysit the builds to make sure it's not occuring. The concern I have is it's not a true "test" of the compiler(s) when this occurs and it for those reasons it shouldn't ever happen as it could hide a bug.

    Closing for now feel free to reopen if this resurfaces.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions