|
1 | | -name: "clp-core-build" |
| 1 | +name: "clp-artifact-build" |
2 | 2 |
|
3 | 3 | on: |
4 | 4 | pull_request: |
5 | | - paths: |
6 | | - - ".github/actions/clp-core-build-containers/action.yaml" |
7 | | - - ".github/actions/run-on-image/action.yaml" |
8 | | - - ".github/workflows/clp-core-build.yaml" |
9 | | - - ".gitmodules" |
10 | | - - "components/core/**" |
11 | | - - "taskfile.yaml" |
12 | | - - "taskfiles/**" |
13 | | - - "tools/scripts/deps-download/**" |
14 | | - - "!components/core/tools/scripts/lib_install/macos/**" |
| 5 | + paths-ignore: &ignored_paths |
| 6 | + - ".github/*" |
| 7 | + - ".github/ISSUE_TEMPLATE/**" |
| 8 | + - "components/core/tools/scripts/lib_install/macos/**" |
| 9 | + - "docs/**" |
15 | 10 | push: |
16 | | - paths: |
17 | | - - ".github/actions/clp-core-build-containers/action.yaml" |
18 | | - - ".github/actions/run-on-image/action.yaml" |
19 | | - - ".github/workflows/clp-core-build.yaml" |
20 | | - - ".gitmodules" |
21 | | - - "components/core/**" |
22 | | - - "taskfile.yaml" |
23 | | - - "taskfiles/**" |
24 | | - - "tools/scripts/deps-download/**" |
25 | | - - "!components/core/tools/scripts/lib_install/macos/**" |
| 11 | + paths-ignore: *ignored_paths |
26 | 12 | schedule: |
27 | 13 | # Run daily at 00:15 UTC (the 15 is to avoid periods of high load) |
28 | 14 | - cron: "15 0 * * *" |
@@ -74,31 +60,31 @@ jobs: |
74 | 60 | filters: | |
75 | 61 | centos_stream_9_image: |
76 | 62 | - ".github/actions/**" |
77 | | - - ".github/workflows/clp-core-build.yaml" |
| 63 | + - ".github/workflows/clp-artifact-build.yaml" |
78 | 64 | - "components/core/tools/scripts/lib_install/*.sh" |
79 | 65 | - "components/core/tools/docker-images/clp-env-base-centos-stream-9/**" |
80 | 66 | - "components/core/tools/scripts/lib_install/centos-stream-9/**" |
81 | 67 | manylinux_2_28_x86_64_image: |
82 | 68 | - ".github/actions/**" |
83 | | - - ".github/workflows/clp-core-build.yaml" |
| 69 | + - ".github/workflows/clp-artifact-build.yaml" |
84 | 70 | - "components/core/tools/scripts/lib_install/*.sh" |
85 | 71 | - "components/core/tools/docker-images/clp-env-base-manylinux_2_28-x86_64/**" |
86 | 72 | - "components/core/tools/scripts/lib_install/manylinux_2_28/**" |
87 | 73 | musllinux_1_2_x86_64_image: |
88 | 74 | - ".github/actions/**" |
89 | | - - ".github/workflows/clp-core-build.yaml" |
| 75 | + - ".github/workflows/clp-artifact-build.yaml" |
90 | 76 | - "components/core/tools/scripts/lib_install/*.sh" |
91 | 77 | - "components/core/tools/docker-images/clp-env-base-musllinux_1_2-x86_64/**" |
92 | 78 | - "components/core/tools/scripts/lib_install/musllinux_1_2/**" |
93 | 79 | ubuntu_jammy_image: |
94 | 80 | - ".github/actions/**" |
95 | | - - ".github/workflows/clp-core-build.yaml" |
| 81 | + - ".github/workflows/clp-artifact-build.yaml" |
96 | 82 | - "components/core/tools/scripts/lib_install/*.sh" |
97 | 83 | - "components/core/tools/docker-images/clp-env-base-ubuntu-jammy/**" |
98 | 84 | - "components/core/tools/scripts/lib_install/ubuntu-jammy/**" |
99 | 85 | clp: |
100 | 86 | - ".github/actions/**" |
101 | | - - ".github/workflows/clp-core-build.yaml" |
| 87 | + - ".github/workflows/clp-artifact-build.yaml" |
102 | 88 | - ".gitmodules" |
103 | 89 | - "components/core/cmake/**" |
104 | 90 | - "components/core/CMakeLists.txt" |
@@ -520,3 +506,42 @@ jobs: |
520 | 506 | .task/checksum/utils-cpp-lint-clang-tidy-* |
521 | 507 | build/lint-clang-tidy |
522 | 508 | key: "${{steps.cache-restore-lint-check-cpp-static-full.outputs.cache-primary-key}}" |
| 509 | + |
| 510 | + package-image: |
| 511 | + name: "package-image" |
| 512 | + if: >- |
| 513 | + !cancelled() && !failure() && ( |
| 514 | + needs.filter-relevant-changes.outputs.ubuntu_jammy_image_changed == 'false' || |
| 515 | + needs.ubuntu-jammy-deps-image.result == 'success' |
| 516 | + ) |
| 517 | + needs: |
| 518 | + - "filter-relevant-changes" |
| 519 | + - "ubuntu-jammy-deps-image" |
| 520 | + runs-on: "ubuntu-24.04" |
| 521 | + steps: |
| 522 | + - uses: "actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683" |
| 523 | + with: |
| 524 | + submodules: "recursive" |
| 525 | + |
| 526 | + - name: "Workaround actions/runner-images/issues/6775" |
| 527 | + shell: "bash" |
| 528 | + run: "chown $(id -u):$(id -g) -R ." |
| 529 | + |
| 530 | + - name: "Build the package" |
| 531 | + uses: "./.github/actions/run-on-image" |
| 532 | + env: |
| 533 | + OS_NAME: "ubuntu-jammy" |
| 534 | + with: |
| 535 | + image_name: "${{env.DEPS_IMAGE_NAME_PREFIX}}${{env.OS_NAME}}" |
| 536 | + use_published_image: >- |
| 537 | + ${{needs.filter-relevant-changes.outputs.ubuntu_jammy_image_changed == 'false' |
| 538 | + || (github.event_name != 'pull_request' && github.ref == 'refs/heads/main')}} |
| 539 | + run_command: >- |
| 540 | + CLP_CORE_MAX_PARALLELISM_PER_BUILD_TASK=$(getconf _NPROCESSORS_ONLN) task package |
| 541 | +
|
| 542 | + - uses: "./.github/actions/clp-build-runtime-image" |
| 543 | + with: |
| 544 | + image_type: "package" |
| 545 | + image_registry: "ghcr.io" |
| 546 | + image_registry_username: "${{github.actor}}" |
| 547 | + image_registry_password: "${{secrets.GITHUB_TOKEN}}" |
0 commit comments