|
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 * * *" |
|
45 | 31 | runs-on: "ubuntu-24.04" |
46 | 32 | outputs: |
47 | 33 | centos_stream_9_image_changed: "${{steps.filter.outputs.centos_stream_9_image}}" |
| 34 | + manylinux_2_28_x86_64_image_changed: "${{steps.filter.outputs.manylinux_2_28_x86_64_image}}" |
| 35 | + musllinux_1_2_x86_64_image_changed: "${{steps.filter.outputs.musllinux_1_2_x86_64_image}}" |
48 | 36 | ubuntu_jammy_image_changed: "${{steps.filter.outputs.ubuntu_jammy_image}}" |
49 | 37 | clp_changed: "${{steps.filter.outputs.clp}}" |
50 | 38 | steps: |
@@ -72,19 +60,31 @@ jobs: |
72 | 60 | filters: | |
73 | 61 | centos_stream_9_image: |
74 | 62 | - ".github/actions/**" |
75 | | - - ".github/workflows/clp-core-build.yaml" |
| 63 | + - ".github/workflows/clp-artifact-build.yaml" |
76 | 64 | - "components/core/tools/scripts/lib_install/*.sh" |
77 | 65 | - "components/core/tools/docker-images/clp-env-base-centos-stream-9/**" |
78 | 66 | - "components/core/tools/scripts/lib_install/centos-stream-9/**" |
| 67 | + manylinux_2_28_x86_64_image: |
| 68 | + - ".github/actions/**" |
| 69 | + - ".github/workflows/clp-artifact-build.yaml" |
| 70 | + - "components/core/tools/scripts/lib_install/*.sh" |
| 71 | + - "components/core/tools/docker-images/clp-env-base-manylinux_2_28-x86_64/**" |
| 72 | + - "components/core/tools/scripts/lib_install/manylinux_2_28/**" |
| 73 | + musllinux_1_2_x86_64_image: |
| 74 | + - ".github/actions/**" |
| 75 | + - ".github/workflows/clp-artifact-build.yaml" |
| 76 | + - "components/core/tools/scripts/lib_install/*.sh" |
| 77 | + - "components/core/tools/docker-images/clp-env-base-musllinux_1_2-x86_64/**" |
| 78 | + - "components/core/tools/scripts/lib_install/musllinux_1_2/**" |
79 | 79 | ubuntu_jammy_image: |
80 | 80 | - ".github/actions/**" |
81 | | - - ".github/workflows/clp-core-build.yaml" |
| 81 | + - ".github/workflows/clp-artifact-build.yaml" |
82 | 82 | - "components/core/tools/scripts/lib_install/*.sh" |
83 | 83 | - "components/core/tools/docker-images/clp-env-base-ubuntu-jammy/**" |
84 | 84 | - "components/core/tools/scripts/lib_install/ubuntu-jammy/**" |
85 | 85 | clp: |
86 | 86 | - ".github/actions/**" |
87 | | - - ".github/workflows/clp-core-build.yaml" |
| 87 | + - ".github/workflows/clp-artifact-build.yaml" |
88 | 88 | - ".gitmodules" |
89 | 89 | - "components/core/cmake/**" |
90 | 90 | - "components/core/CMakeLists.txt" |
@@ -121,6 +121,58 @@ jobs: |
121 | 121 | ${{github.event_name != 'pull_request' && github.ref == 'refs/heads/main'}} |
122 | 122 | token: "${{secrets.GITHUB_TOKEN}}" |
123 | 123 |
|
| 124 | + manylinux_2_28-x86_64-deps-image: |
| 125 | + name: "manylinux_2_28-x86_64-deps-image" |
| 126 | + if: "needs.filter-relevant-changes.outputs.manylinux_2_28_x86_64_image_changed == 'true'" |
| 127 | + needs: "filter-relevant-changes" |
| 128 | + runs-on: "ubuntu-24.04" |
| 129 | + steps: |
| 130 | + - uses: "actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683" |
| 131 | + with: |
| 132 | + submodules: "recursive" |
| 133 | + |
| 134 | + - name: "Work around actions/runner-images/issues/6775" |
| 135 | + run: "chown $(id -u):$(id -g) -R ." |
| 136 | + shell: "bash" |
| 137 | + |
| 138 | + - uses: "./.github/actions/clp-core-build-containers" |
| 139 | + env: |
| 140 | + OS_NAME: "manylinux_2_28" |
| 141 | + with: |
| 142 | + image_name: "${{env.DEPS_IMAGE_NAME_PREFIX}}${{env.OS_NAME}}" |
| 143 | + docker_context: "components/core" |
| 144 | + docker_file: "components/core/tools/docker-images/clp-env-base-${{env.OS_NAME}}-x86_64\ |
| 145 | + /Dockerfile" |
| 146 | + push_deps_image: >- |
| 147 | + ${{github.event_name != 'pull_request' && github.ref == 'refs/heads/main'}} |
| 148 | + token: "${{secrets.GITHUB_TOKEN}}" |
| 149 | + |
| 150 | + musllinux_1_2-x86_64-deps-image: |
| 151 | + name: "musllinux_1_2-x86_64-deps-image" |
| 152 | + if: "needs.filter-relevant-changes.outputs.musllinux_1_2_x86_64_image_changed == 'true'" |
| 153 | + needs: "filter-relevant-changes" |
| 154 | + runs-on: "ubuntu-24.04" |
| 155 | + steps: |
| 156 | + - uses: "actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683" |
| 157 | + with: |
| 158 | + submodules: "recursive" |
| 159 | + |
| 160 | + - name: "Work around actions/runner-images/issues/6775" |
| 161 | + run: "chown $(id -u):$(id -g) -R ." |
| 162 | + shell: "bash" |
| 163 | + |
| 164 | + - uses: "./.github/actions/clp-core-build-containers" |
| 165 | + env: |
| 166 | + OS_NAME: "musllinux_1_2" |
| 167 | + with: |
| 168 | + image_name: "${{env.DEPS_IMAGE_NAME_PREFIX}}${{env.OS_NAME}}" |
| 169 | + docker_context: "components/core" |
| 170 | + docker_file: "components/core/tools/docker-images/clp-env-base-${{env.OS_NAME}}-x86_64\ |
| 171 | + /Dockerfile" |
| 172 | + push_deps_image: >- |
| 173 | + ${{github.event_name != 'pull_request' && github.ref == 'refs/heads/main'}} |
| 174 | + token: "${{secrets.GITHUB_TOKEN}}" |
| 175 | + |
124 | 176 | ubuntu-jammy-deps-image: |
125 | 177 | name: "ubuntu-jammy-deps-image" |
126 | 178 | if: "needs.filter-relevant-changes.outputs.ubuntu_jammy_image_changed == 'true'" |
@@ -186,6 +238,86 @@ jobs: |
186 | 238 | --build-dir /mnt/repo/components/core/build |
187 | 239 | --num-jobs $(getconf _NPROCESSORS_ONLN) |
188 | 240 |
|
| 241 | + manylinux_2_28-x86_64-binaries: |
| 242 | + # Run if the ancestor jobs succeeded OR they were skipped and clp was changed. |
| 243 | + if: >- |
| 244 | + success() |
| 245 | + || (!cancelled() && !failure() && needs.filter-relevant-changes.outputs.clp_changed == 'true') |
| 246 | + needs: |
| 247 | + - "manylinux_2_28-x86_64-deps-image" |
| 248 | + - "filter-relevant-changes" |
| 249 | + strategy: |
| 250 | + matrix: |
| 251 | + use_shared_libs: [true, false] |
| 252 | + name: >- |
| 253 | + manylinux_2_28-x86_64-${{matrix.use_shared_libs == true && 'dynamic' || 'static'}}-linked-bins |
| 254 | + continue-on-error: true |
| 255 | + runs-on: "ubuntu-24.04" |
| 256 | + steps: |
| 257 | + - uses: "actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683" |
| 258 | + with: |
| 259 | + submodules: "recursive" |
| 260 | + |
| 261 | + - name: "Work around actions/runner-images/issues/6775" |
| 262 | + run: "chown $(id -u):$(id -g) -R ." |
| 263 | + shell: "bash" |
| 264 | + |
| 265 | + - uses: "./.github/actions/run-on-image" |
| 266 | + env: |
| 267 | + OS_NAME: "manylinux_2_28" |
| 268 | + with: |
| 269 | + image_name: "${{env.DEPS_IMAGE_NAME_PREFIX}}${{env.OS_NAME}}" |
| 270 | + use_published_image: >- |
| 271 | + ${{needs.filter-relevant-changes.outputs.manylinux_2_28_x86_64_image_changed == 'false' |
| 272 | + || (github.event_name != 'pull_request' && github.ref == 'refs/heads/main')}} |
| 273 | + run_command: >- |
| 274 | + CLP_CORE_MAX_PARALLELISM_PER_BUILD_TASK=$(getconf _NPROCESSORS_ONLN) task deps:core |
| 275 | + && python3 /mnt/repo/components/core/tools/scripts/utils/build-and-run-unit-tests.py |
| 276 | + ${{matrix.use_shared_libs == true && '--use-shared-libs' || ''}} |
| 277 | + --source-dir /mnt/repo/components/core |
| 278 | + --build-dir /mnt/repo/components/core/build |
| 279 | + --num-jobs $(getconf _NPROCESSORS_ONLN) |
| 280 | +
|
| 281 | + musllinux_1_2-x86_64-binaries: |
| 282 | + # Run if the ancestor jobs succeeded OR they were skipped and clp was changed. |
| 283 | + if: >- |
| 284 | + success() |
| 285 | + || (!cancelled() && !failure() && needs.filter-relevant-changes.outputs.clp_changed == 'true') |
| 286 | + needs: |
| 287 | + - "musllinux_1_2-x86_64-deps-image" |
| 288 | + - "filter-relevant-changes" |
| 289 | + strategy: |
| 290 | + matrix: |
| 291 | + use_shared_libs: [true, false] |
| 292 | + name: >- |
| 293 | + musllinux_1_2-x86_64-${{matrix.use_shared_libs == true && 'dynamic' || 'static'}}-linked-bins |
| 294 | + continue-on-error: true |
| 295 | + runs-on: "ubuntu-24.04" |
| 296 | + steps: |
| 297 | + - uses: "actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683" |
| 298 | + with: |
| 299 | + submodules: "recursive" |
| 300 | + |
| 301 | + - name: "Work around actions/runner-images/issues/6775" |
| 302 | + run: "chown $(id -u):$(id -g) -R ." |
| 303 | + shell: "bash" |
| 304 | + |
| 305 | + - uses: "./.github/actions/run-on-image" |
| 306 | + env: |
| 307 | + OS_NAME: "musllinux_1_2" |
| 308 | + with: |
| 309 | + image_name: "${{env.DEPS_IMAGE_NAME_PREFIX}}${{env.OS_NAME}}" |
| 310 | + use_published_image: >- |
| 311 | + ${{needs.filter-relevant-changes.outputs.musllinux_1_2_x86_64_image_changed == 'false' |
| 312 | + || (github.event_name != 'pull_request' && github.ref == 'refs/heads/main')}} |
| 313 | + run_command: >- |
| 314 | + CLP_CORE_MAX_PARALLELISM_PER_BUILD_TASK=$(getconf _NPROCESSORS_ONLN) task deps:core |
| 315 | + && python3 /mnt/repo/components/core/tools/scripts/utils/build-and-run-unit-tests.py |
| 316 | + ${{matrix.use_shared_libs == true && '--use-shared-libs' || ''}} |
| 317 | + --source-dir /mnt/repo/components/core |
| 318 | + --build-dir /mnt/repo/components/core/build |
| 319 | + --num-jobs $(getconf _NPROCESSORS_ONLN) |
| 320 | +
|
189 | 321 | ubuntu-jammy-binaries: |
190 | 322 | # Run if the ancestor jobs succeeded OR they were skipped and clp was changed. |
191 | 323 | if: >- |
@@ -374,3 +506,42 @@ jobs: |
374 | 506 | .task/checksum/utils-cpp-lint-clang-tidy-* |
375 | 507 | build/lint-clang-tidy |
376 | 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