Jenkinsfile 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. parallel_nodes(['linux && cura', 'windows && cura']) {
  2. // Prepare building
  3. stage('Prepare') {
  4. // Ensure we start with a clean build directory.
  5. step([$class: 'WsCleanup'])
  6. // Checkout whatever sources are linked to this pipeline.
  7. checkout scm
  8. }
  9. // If any error occurs during building, we want to catch it and continue with the "finale" stage.
  10. catchError {
  11. // Building and testing should happen in a subdirectory.
  12. dir('build') {
  13. // Perform the "build". Since Uranium is Python code, this basically only ensures CMake is setup.
  14. stage('Build') {
  15. // Ensure CMake is setup. Note that since this is Python code we do not really "build" it.
  16. def uranium_dir = get_workspace_dir("Ultimaker/Uranium/master")
  17. cmake("..", "-DCMAKE_PREFIX_PATH=${env.CURA_ENVIRONMENT_PATH} -DCMAKE_BUILD_TYPE=Release -DURANIUM_DIR=${uranium_dir}")
  18. }
  19. // Try and run the unit tests. If this stage fails, we consider the build to be "unstable".
  20. stage('Unit Test') {
  21. try {
  22. make('test')
  23. } catch(e) {
  24. currentBuild.result = "UNSTABLE"
  25. }
  26. }
  27. }
  28. }
  29. // Perform any post-build actions like notification and publishing of unit tests.
  30. stage('Finalize') {
  31. // Publish the test results to Jenkins.
  32. junit allowEmptyResults: true, testResults: 'build/junit*.xml'
  33. notify_build_result(env.CURA_EMAIL_RECIPIENTS, '#cura-dev', ['master', '2.'])
  34. }
  35. }