conan-package-create.yml 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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_ULTIMAKER: ${{ secrets.CONAN_USER }}
  22. CONAN_PASSWORD_ULTIMAKER: ${{ secrets.CONAN_PASS }}
  23. CONAN_LOG_RUN_TO_OUTPUT: 1
  24. CONAN_LOGGING_LEVEL: ${{ inputs.conan_logging_level }}
  25. CONAN_NON_INTERACTIVE: 1
  26. jobs:
  27. conan-package-create:
  28. runs-on: ${{ inputs.runs_on }}
  29. steps:
  30. - name: Checkout CuraEngine
  31. uses: actions/checkout@v3
  32. - name: Setup Python and pip
  33. uses: actions/setup-python@v4
  34. with:
  35. python-version: ${{ inputs.python_version }}
  36. cache: 'pip'
  37. cache-dependency-path: .github/workflows/requirements-conan-package.txt
  38. - name: Install Python requirements and Create default Conan profile
  39. run: |
  40. pip install -r .github/workflows/requirements-conan-package.txt
  41. conan profile new default --detect
  42. - name: Get Conan configuration from branch
  43. if: "${{ inputs.conan_config_branch == '' }}"
  44. run: conan config install https://github.com/Ultimaker/conan-config.git -a "-b ${{ inputs.conan_config_branch }}"
  45. - name: Get Conan configuration
  46. if: "${{ inputs.conan_config_branch != '' }}"
  47. run: conan config install https://github.com/Ultimaker/conan-config.git
  48. - name: Cache Conan local repository packages (Bash)
  49. uses: actions/cache@v3
  50. if: ${{ runner.os != 'Windows' }}
  51. with:
  52. path: $HOME/.conan/data
  53. key: ${{ runner.os }}-conan
  54. - name: Cache Conan local repository packages (Powershell)
  55. uses: actions/cache@v3
  56. if: ${{ runner.os == 'Windows' }}
  57. with:
  58. path: |
  59. C:\Users\runneradmin\.conan\data
  60. C:\.conan
  61. key: ${{ runner.os }}-conan
  62. - name: Create the Packages
  63. run: conan install ${{ inputs.recipe_id_full }} -pr:b cura_build.jinja -pr:h cura_release.jinja --build=missing --update
  64. - name: Upload the Package(s)
  65. run: conan upload "*" -r ultimaker --all -c