conan-package-create.yml 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. name: Create and Upload Conan package
  2. on:
  3. workflow_call:
  4. inputs:
  5. recipe_id_full:
  6. required: true
  7. type: string
  8. runs_on:
  9. required: true
  10. type: string
  11. python_version:
  12. required: true
  13. type: string
  14. conan_config_branch:
  15. required: false
  16. type: string
  17. conan_logging_level:
  18. required: false
  19. type: string
  20. env:
  21. CONAN_LOGIN_USERNAME_CURA: ${{ secrets.CONAN_USER }}
  22. CONAN_PASSWORD_CURA: ${{ secrets.CONAN_PASS }}
  23. CONAN_LOGIN_USERNAME_CURA_CE: ${{ secrets.CONAN_USER }}
  24. CONAN_PASSWORD_CURA_CE: ${{ secrets.CONAN_PASS }}
  25. CONAN_LOG_RUN_TO_OUTPUT: 1
  26. CONAN_LOGGING_LEVEL: ${{ inputs.conan_logging_level }}
  27. CONAN_NON_INTERACTIVE: 1
  28. jobs:
  29. conan-package-create:
  30. runs-on: ${{ inputs.runs_on }}
  31. steps:
  32. - name: Checkout CuraEngine
  33. uses: actions/checkout@v3
  34. - name: Setup Python and pip
  35. uses: actions/setup-python@v4
  36. with:
  37. python-version: ${{ inputs.python_version }}
  38. cache: 'pip'
  39. cache-dependency-path: .github/workflows/requirements-conan-package.txt
  40. - name: Install Python requirements and Create default Conan profile
  41. run: |
  42. pip install -r .github/workflows/requirements-conan-package.txt
  43. conan profile new default --detect
  44. - name: Cache Conan local repository packages (Bash)
  45. uses: actions/cache@v3
  46. if: ${{ runner.os != 'Windows' }}
  47. with:
  48. path: $HOME/.conan/data
  49. key: ${{ runner.os }}-conan
  50. - name: Cache Conan local repository packages (Powershell)
  51. uses: actions/cache@v3
  52. if: ${{ runner.os == 'Windows' }}
  53. with:
  54. path: |
  55. C:\Users\runneradmin\.conan\data
  56. C:\.conan
  57. key: ${{ runner.os }}-conan
  58. - name: Get Conan configuration from branch
  59. if: ${{ inputs.conan_config_branch != '' }}
  60. run: conan config install https://github.com/Ultimaker/conan-config.git -a "-b ${{ inputs.conan_config_branch }}"
  61. - name: Get Conan configuration
  62. if: ${{ inputs.conan_config_branch == '' }}
  63. run: conan config install https://github.com/Ultimaker/conan-config.git
  64. - name: Create the Packages
  65. run: conan install ${{ inputs.recipe_id_full }} --build=missing --update
  66. - name: Upload the Package(s)
  67. run: |
  68. conan upload "*" -r cura --all -c
  69. conan upload "*" -r cura-ce -c