Skip to content

Commit fbd5a12

Browse files
Bill-hbrhbrjackluo923kirkrodrigues
authored
ci: Add manylinux_2_28 and musllinux_1_2 dependency image and binary jobs to clp-core-build GH workflow. (#1261)
Co-authored-by: Jack Luo <[email protected]> Co-authored-by: kirkrodrigues <[email protected]>
1 parent dd91cf9 commit fbd5a12

File tree

3 files changed

+177
-1
lines changed

3 files changed

+177
-1
lines changed

.github/workflows/clp-core-build.yaml

Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ jobs:
4545
runs-on: "ubuntu-24.04"
4646
outputs:
4747
centos_stream_9_image_changed: "${{steps.filter.outputs.centos_stream_9_image}}"
48+
manylinux_2_28_x86_64_image_changed: "${{steps.filter.outputs.manylinux_2_28_x86_64_image}}"
49+
musllinux_1_2_x86_64_image_changed: "${{steps.filter.outputs.musllinux_1_2_x86_64_image}}"
4850
ubuntu_jammy_image_changed: "${{steps.filter.outputs.ubuntu_jammy_image}}"
4951
clp_changed: "${{steps.filter.outputs.clp}}"
5052
steps:
@@ -76,6 +78,18 @@ jobs:
7678
- "components/core/tools/scripts/lib_install/*.sh"
7779
- "components/core/tools/docker-images/clp-env-base-centos-stream-9/**"
7880
- "components/core/tools/scripts/lib_install/centos-stream-9/**"
81+
manylinux_2_28_x86_64_image:
82+
- ".github/actions/**"
83+
- ".github/workflows/clp-core-build.yaml"
84+
- "components/core/tools/scripts/lib_install/*.sh"
85+
- "components/core/tools/docker-images/clp-env-base-manylinux_2_28-x86_64/**"
86+
- "components/core/tools/scripts/lib_install/manylinux_2_28/**"
87+
musllinux_1_2_x86_64_image:
88+
- ".github/actions/**"
89+
- ".github/workflows/clp-core-build.yaml"
90+
- "components/core/tools/scripts/lib_install/*.sh"
91+
- "components/core/tools/docker-images/clp-env-base-musllinux_1_2-x86_64/**"
92+
- "components/core/tools/scripts/lib_install/musllinux_1_2/**"
7993
ubuntu_jammy_image:
8094
- ".github/actions/**"
8195
- ".github/workflows/clp-core-build.yaml"
@@ -121,6 +135,58 @@ jobs:
121135
${{github.event_name != 'pull_request' && github.ref == 'refs/heads/main'}}
122136
token: "${{secrets.GITHUB_TOKEN}}"
123137

138+
manylinux_2_28-x86_64-deps-image:
139+
name: "manylinux_2_28-x86_64-deps-image"
140+
if: "needs.filter-relevant-changes.outputs.manylinux_2_28_x86_64_image_changed == 'true'"
141+
needs: "filter-relevant-changes"
142+
runs-on: "ubuntu-24.04"
143+
steps:
144+
- uses: "actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683"
145+
with:
146+
submodules: "recursive"
147+
148+
- name: "Work around actions/runner-images/issues/6775"
149+
run: "chown $(id -u):$(id -g) -R ."
150+
shell: "bash"
151+
152+
- uses: "./.github/actions/clp-core-build-containers"
153+
env:
154+
OS_NAME: "manylinux_2_28"
155+
with:
156+
image_name: "${{env.DEPS_IMAGE_NAME_PREFIX}}${{env.OS_NAME}}"
157+
docker_context: "components/core"
158+
docker_file: "components/core/tools/docker-images/clp-env-base-${{env.OS_NAME}}-x86_64\
159+
/Dockerfile"
160+
push_deps_image: >-
161+
${{github.event_name != 'pull_request' && github.ref == 'refs/heads/main'}}
162+
token: "${{secrets.GITHUB_TOKEN}}"
163+
164+
musllinux_1_2-x86_64-deps-image:
165+
name: "musllinux_1_2-x86_64-deps-image"
166+
if: "needs.filter-relevant-changes.outputs.musllinux_1_2_x86_64_image_changed == 'true'"
167+
needs: "filter-relevant-changes"
168+
runs-on: "ubuntu-24.04"
169+
steps:
170+
- uses: "actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683"
171+
with:
172+
submodules: "recursive"
173+
174+
- name: "Work around actions/runner-images/issues/6775"
175+
run: "chown $(id -u):$(id -g) -R ."
176+
shell: "bash"
177+
178+
- uses: "./.github/actions/clp-core-build-containers"
179+
env:
180+
OS_NAME: "musllinux_1_2"
181+
with:
182+
image_name: "${{env.DEPS_IMAGE_NAME_PREFIX}}${{env.OS_NAME}}"
183+
docker_context: "components/core"
184+
docker_file: "components/core/tools/docker-images/clp-env-base-${{env.OS_NAME}}-x86_64\
185+
/Dockerfile"
186+
push_deps_image: >-
187+
${{github.event_name != 'pull_request' && github.ref == 'refs/heads/main'}}
188+
token: "${{secrets.GITHUB_TOKEN}}"
189+
124190
ubuntu-jammy-deps-image:
125191
name: "ubuntu-jammy-deps-image"
126192
if: "needs.filter-relevant-changes.outputs.ubuntu_jammy_image_changed == 'true'"
@@ -186,6 +252,86 @@ jobs:
186252
--build-dir /mnt/repo/components/core/build
187253
--num-jobs $(getconf _NPROCESSORS_ONLN)
188254
255+
manylinux_2_28-x86_64-binaries:
256+
# Run if the ancestor jobs succeeded OR they were skipped and clp was changed.
257+
if: >-
258+
success()
259+
|| (!cancelled() && !failure() && needs.filter-relevant-changes.outputs.clp_changed == 'true')
260+
needs:
261+
- "manylinux_2_28-x86_64-deps-image"
262+
- "filter-relevant-changes"
263+
strategy:
264+
matrix:
265+
use_shared_libs: [true, false]
266+
name: >-
267+
manylinux_2_28-x86_64-${{matrix.use_shared_libs == true && 'dynamic' || 'static'}}-linked-bins
268+
continue-on-error: true
269+
runs-on: "ubuntu-24.04"
270+
steps:
271+
- uses: "actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683"
272+
with:
273+
submodules: "recursive"
274+
275+
- name: "Work around actions/runner-images/issues/6775"
276+
run: "chown $(id -u):$(id -g) -R ."
277+
shell: "bash"
278+
279+
- uses: "./.github/actions/run-on-image"
280+
env:
281+
OS_NAME: "manylinux_2_28"
282+
with:
283+
image_name: "${{env.DEPS_IMAGE_NAME_PREFIX}}${{env.OS_NAME}}"
284+
use_published_image: >-
285+
${{needs.filter-relevant-changes.outputs.manylinux_2_28_x86_64_image_changed == 'false'
286+
|| (github.event_name != 'pull_request' && github.ref == 'refs/heads/main')}}
287+
run_command: >-
288+
CLP_CORE_MAX_PARALLELISM_PER_BUILD_TASK=$(getconf _NPROCESSORS_ONLN) task deps:core
289+
&& python3 /mnt/repo/components/core/tools/scripts/utils/build-and-run-unit-tests.py
290+
${{matrix.use_shared_libs == true && '--use-shared-libs' || ''}}
291+
--source-dir /mnt/repo/components/core
292+
--build-dir /mnt/repo/components/core/build
293+
--num-jobs $(getconf _NPROCESSORS_ONLN)
294+
295+
musllinux_1_2-x86_64-binaries:
296+
# Run if the ancestor jobs succeeded OR they were skipped and clp was changed.
297+
if: >-
298+
success()
299+
|| (!cancelled() && !failure() && needs.filter-relevant-changes.outputs.clp_changed == 'true')
300+
needs:
301+
- "musllinux_1_2-x86_64-deps-image"
302+
- "filter-relevant-changes"
303+
strategy:
304+
matrix:
305+
use_shared_libs: [true, false]
306+
name: >-
307+
musllinux_1_2-x86_64-${{matrix.use_shared_libs == true && 'dynamic' || 'static'}}-linked-bins
308+
continue-on-error: true
309+
runs-on: "ubuntu-24.04"
310+
steps:
311+
- uses: "actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683"
312+
with:
313+
submodules: "recursive"
314+
315+
- name: "Work around actions/runner-images/issues/6775"
316+
run: "chown $(id -u):$(id -g) -R ."
317+
shell: "bash"
318+
319+
- uses: "./.github/actions/run-on-image"
320+
env:
321+
OS_NAME: "musllinux_1_2"
322+
with:
323+
image_name: "${{env.DEPS_IMAGE_NAME_PREFIX}}${{env.OS_NAME}}"
324+
use_published_image: >-
325+
${{needs.filter-relevant-changes.outputs.musllinux_1_2_x86_64_image_changed == 'false'
326+
|| (github.event_name != 'pull_request' && github.ref == 'refs/heads/main')}}
327+
run_command: >-
328+
CLP_CORE_MAX_PARALLELISM_PER_BUILD_TASK=$(getconf _NPROCESSORS_ONLN) task deps:core
329+
&& python3 /mnt/repo/components/core/tools/scripts/utils/build-and-run-unit-tests.py
330+
${{matrix.use_shared_libs == true && '--use-shared-libs' || ''}}
331+
--source-dir /mnt/repo/components/core
332+
--build-dir /mnt/repo/components/core/build
333+
--num-jobs $(getconf _NPROCESSORS_ONLN)
334+
189335
ubuntu-jammy-binaries:
190336
# Run if the ancestor jobs succeeded OR they were skipped and clp was changed.
191337
if: >-

docs/src/dev-docs/tooling-containers.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,13 @@ distros using glibc 2.28+, including:
2929

3030
### clp-core-dependencies-x86-manylinux_2_28
3131

32+
* [GitHub Packages page][core-deps-manylinux_2_28-x86_64]
33+
* Pull command:
34+
35+
```bash
36+
docker pull ghcr.io/y-scope/clp/clp-core-dependencies-x86-manylinux_2_28:main
37+
```
38+
3239
* Path:
3340

3441
```text
@@ -55,6 +62,13 @@ other distros using musl 1.2, including:
5562

5663
### clp-core-dependencies-x86-musllinux_1_2
5764

65+
* [GitHub Packages page][core-deps-musllinux_1_2-x86_64]
66+
* Pull command:
67+
68+
```bash
69+
docker pull ghcr.io/y-scope/clp/clp-core-dependencies-x86-musllinux_1_2:main
70+
```
71+
5872
* Path:
5973

6074
```text
@@ -134,6 +148,8 @@ environment.
134148
```
135149

136150
[core-deps-centos-stream-9]: https://github.com/y-scope/clp/pkgs/container/clp%2Fclp-core-dependencies-x86-centos-stream-9
151+
[core-deps-manylinux_2_28-x86_64]: https://github.com/y-scope/clp/pkgs/container/clp%2Fclp-core-dependencies-x86-manylinux_2_28
152+
[core-deps-musllinux_1_2-x86_64]: https://github.com/y-scope/clp/pkgs/container/clp%2Fclp-core-dependencies-x86-musllinux_1_2
137153
[core-deps-ubuntu-jammy]: https://github.com/y-scope/clp/pkgs/container/clp%2Fclp-core-dependencies-x86-ubuntu-jammy
138154
[core-ubuntu-jammy]: https://github.com/y-scope/clp/pkgs/container/clp%2Fclp-core-x86-ubuntu-jammy
139155
[exe-ubuntu-jammy]: https://github.com/y-scope/clp/pkgs/container/clp%2Fclp-execution-x86-ubuntu-jammy

docs/src/dev-docs/tooling-gh-workflows.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,18 @@ shown below.
2727
}
2828
}
2929
}%%
30-
flowchart TD
30+
flowchart LR
3131
filter-relevant-changes --> centos-stream-9-deps-image
32+
filter-relevant-changes --> manylinux_2_28-x86_64-deps-image
33+
filter-relevant-changes --> musllinux_1_2-x86_64-deps-image
3234
filter-relevant-changes --> ubuntu-jammy-deps-image
3335
filter-relevant-changes --> centos-stream-9-binaries
36+
filter-relevant-changes --> manylinux_2_28-x86_64-binaries
37+
filter-relevant-changes --> musllinux_1_2-x86_64-binaries
3438
filter-relevant-changes --> ubuntu-jammy-binaries
3539
centos-stream-9-deps-image --> centos-stream-9-binaries
40+
manylinux_2_28-x86_64-deps-image --> manylinux_2_28-x86_64-binaries
41+
musllinux_1_2-x86_64-deps-image --> musllinux_1_2-x86_64-binaries
3642
ubuntu-jammy-deps-image --> ubuntu-jammy-binaries
3743
ubuntu-jammy-binaries --> ubuntu-jammy-binaries-image
3844
:::
@@ -43,10 +49,18 @@ Arrows between jobs indicate a dependency. The jobs are as follows:
4349
the following jobs should run.
4450
* `centos-stream-9-deps-image`: Builds a container image containing the dependencies necessary to
4551
build CLP-core in a CentOS Stream 9 x86 environment.
52+
* `manylinux_2_28-x86_64-deps-image`: Builds a container image containing the dependencies necessary
53+
to build CLP-core in a manylinux_2_28 x86 environment.
54+
* `musllinux_1_2-x86_64-deps-image`: Builds a container image containing the dependencies necessary
55+
to build CLP-core in a musllinux_1_2 x86 environment.
4656
* `ubuntu-jammy-deps-image`: Builds a container image containing the dependencies necessary to build
4757
CLP-core in an Ubuntu Jammy x86 environment.
4858
* `centos-stream-9-binaries`: Builds the CLP-core binaries in the built CentOS Stream 9 container
4959
and runs core's unit tests.
60+
* `manylinux_2_28-x86_64-binaries`: Builds the CLP-core binaries in the built manylinux_2_28
61+
container and runs core's unit tests.
62+
* `musllinux_1_2-x86_64-binaries`: Builds the CLP-core binaries in the built musllinux_1_2 container
63+
and runs core's unit tests.
5064
* `ubuntu-jammy-binaries`: Builds the CLP-core binaries in the built Ubuntu Jammy container and runs
5165
core's unit tests.
5266
* `ubuntu-jammy-binaries-image`: Builds an Ubuntu Jammy container image containing CLP-core's

0 commit comments

Comments
 (0)