config.yml 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. version: 2.1
  2. # Required for dynamic configuration
  3. setup: true
  4. # Orbs
  5. orbs:
  6. path-filtering: circleci/[email protected]
  7. continuation: circleci/[email protected]
  8. # All input parameters to pass to build config
  9. parameters:
  10. run-docs-only:
  11. type: boolean
  12. default: false
  13. upload-to-storage:
  14. type: string
  15. default: '1'
  16. run-build-linux:
  17. type: boolean
  18. default: false
  19. run-build-mac:
  20. type: boolean
  21. default: false
  22. run-linux-publish:
  23. type: boolean
  24. default: false
  25. linux-publish-arch-limit:
  26. type: enum
  27. default: all
  28. enum: ["all", "arm", "arm64", "x64", "ia32"]
  29. run-macos-publish:
  30. type: boolean
  31. default: false
  32. macos-publish-arch-limit:
  33. type: enum
  34. default: all
  35. enum: ["all", "osx-x64", "osx-arm64", "mas-x64", "mas-arm64"]
  36. jobs:
  37. generate-config:
  38. docker:
  39. - image: cimg/node:16.14
  40. steps:
  41. - checkout
  42. - path-filtering/set-parameters:
  43. base-revision: main
  44. mapping: |
  45. ^((?!docs/).)*$ run-build-mac true
  46. ^((?!docs/).)*$ run-build-linux true
  47. docs/.* run-docs-only true
  48. ^((?!docs/).)*$ run-docs-only false
  49. - run:
  50. command: |
  51. cd .circleci/config
  52. yarn
  53. export CIRCLECI_BINARY="$HOME/circleci"
  54. curl -fLSs https://raw.githubusercontent.com/CircleCI-Public/circleci-cli/main/install.sh | DESTDIR=$CIRCLECI_BINARY bash
  55. node build.js
  56. name: Pack config.yml
  57. - run:
  58. name: Set params
  59. command: node .circleci/config/params.js
  60. - continuation/continue:
  61. configuration_path: .circleci/config-staging/built.yml
  62. parameters: /tmp/pipeline-parameters.json
  63. # Initial setup workflow
  64. workflows:
  65. setup:
  66. jobs:
  67. - generate-config