diff --git a/.github/workflows/clp-core-build.yaml b/.github/workflows/clp-core-build.yaml index 6a04c11798..4f29cec4f3 100644 --- a/.github/workflows/clp-core-build.yaml +++ b/.github/workflows/clp-core-build.yaml @@ -45,6 +45,8 @@ jobs: runs-on: "ubuntu-24.04" outputs: centos_stream_9_image_changed: "${{steps.filter.outputs.centos_stream_9_image}}" + manylinux_2_28_x86_64_image_changed: "${{steps.filter.outputs.manylinux_2_28_x86_64_image}}" + musllinux_1_2_x86_64_image_changed: "${{steps.filter.outputs.musllinux_1_2_x86_64_image}}" ubuntu_jammy_image_changed: "${{steps.filter.outputs.ubuntu_jammy_image}}" clp_changed: "${{steps.filter.outputs.clp}}" steps: @@ -76,6 +78,18 @@ jobs: - "components/core/tools/scripts/lib_install/*.sh" - "components/core/tools/docker-images/clp-env-base-centos-stream-9/**" - "components/core/tools/scripts/lib_install/centos-stream-9/**" + manylinux_2_28_x86_64_image: + - ".github/actions/**" + - ".github/workflows/clp-core-build.yaml" + - "components/core/tools/scripts/lib_install/*.sh" + - "components/core/tools/docker-images/clp-env-base-manylinux_2_28-x86_64/**" + - "components/core/tools/scripts/lib_install/manylinux_2_28/**" + musllinux_1_2_x86_64_image: + - ".github/actions/**" + - ".github/workflows/clp-core-build.yaml" + - "components/core/tools/scripts/lib_install/*.sh" + - "components/core/tools/docker-images/clp-env-base-musllinux_1_2-x86_64/**" + - "components/core/tools/scripts/lib_install/musllinux_1_2/**" ubuntu_jammy_image: - ".github/actions/**" - ".github/workflows/clp-core-build.yaml" @@ -121,6 +135,58 @@ jobs: ${{github.event_name != 'pull_request' && github.ref == 'refs/heads/main'}} token: "${{secrets.GITHUB_TOKEN}}" + manylinux_2_28-x86_64-deps-image: + name: "manylinux_2_28-x86_64-deps-image" + if: "needs.filter-relevant-changes.outputs.manylinux_2_28_x86_64_image_changed == 'true'" + needs: "filter-relevant-changes" + runs-on: "ubuntu-24.04" + steps: + - uses: "actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683" + with: + submodules: "recursive" + + - name: "Work around actions/runner-images/issues/6775" + run: "chown $(id -u):$(id -g) -R ." + shell: "bash" + + - uses: "./.github/actions/clp-core-build-containers" + env: + OS_NAME: "manylinux_2_28" + with: + image_name: "${{env.DEPS_IMAGE_NAME_PREFIX}}${{env.OS_NAME}}" + docker_context: "components/core" + docker_file: "components/core/tools/docker-images/clp-env-base-${{env.OS_NAME}}-x86_64\ + /Dockerfile" + push_deps_image: >- + ${{github.event_name != 'pull_request' && github.ref == 'refs/heads/main'}} + token: "${{secrets.GITHUB_TOKEN}}" + + musllinux_1_2-x86_64-deps-image: + name: "musllinux_1_2-x86_64-deps-image" + if: "needs.filter-relevant-changes.outputs.musllinux_1_2_x86_64_image_changed == 'true'" + needs: "filter-relevant-changes" + runs-on: "ubuntu-24.04" + steps: + - uses: "actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683" + with: + submodules: "recursive" + + - name: "Work around actions/runner-images/issues/6775" + run: "chown $(id -u):$(id -g) -R ." + shell: "bash" + + - uses: "./.github/actions/clp-core-build-containers" + env: + OS_NAME: "musllinux_1_2" + with: + image_name: "${{env.DEPS_IMAGE_NAME_PREFIX}}${{env.OS_NAME}}" + docker_context: "components/core" + docker_file: "components/core/tools/docker-images/clp-env-base-${{env.OS_NAME}}-x86_64\ + /Dockerfile" + push_deps_image: >- + ${{github.event_name != 'pull_request' && github.ref == 'refs/heads/main'}} + token: "${{secrets.GITHUB_TOKEN}}" + ubuntu-jammy-deps-image: name: "ubuntu-jammy-deps-image" if: "needs.filter-relevant-changes.outputs.ubuntu_jammy_image_changed == 'true'" @@ -186,6 +252,86 @@ jobs: --build-dir /mnt/repo/components/core/build --num-jobs $(getconf _NPROCESSORS_ONLN) + manylinux_2_28-x86_64-binaries: + # Run if the ancestor jobs succeeded OR they were skipped and clp was changed. + if: >- + success() + || (!cancelled() && !failure() && needs.filter-relevant-changes.outputs.clp_changed == 'true') + needs: + - "manylinux_2_28-x86_64-deps-image" + - "filter-relevant-changes" + strategy: + matrix: + use_shared_libs: [true, false] + name: >- + manylinux_2_28-x86_64-${{matrix.use_shared_libs == true && 'dynamic' || 'static'}}-linked-bins + continue-on-error: true + runs-on: "ubuntu-24.04" + steps: + - uses: "actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683" + with: + submodules: "recursive" + + - name: "Work around actions/runner-images/issues/6775" + run: "chown $(id -u):$(id -g) -R ." + shell: "bash" + + - uses: "./.github/actions/run-on-image" + env: + OS_NAME: "manylinux_2_28" + with: + image_name: "${{env.DEPS_IMAGE_NAME_PREFIX}}${{env.OS_NAME}}" + use_published_image: >- + ${{needs.filter-relevant-changes.outputs.manylinux_2_28_x86_64_image_changed == 'false' + || (github.event_name != 'pull_request' && github.ref == 'refs/heads/main')}} + run_command: >- + CLP_CORE_MAX_PARALLELISM_PER_BUILD_TASK=$(getconf _NPROCESSORS_ONLN) task deps:core + && python3 /mnt/repo/components/core/tools/scripts/utils/build-and-run-unit-tests.py + ${{matrix.use_shared_libs == true && '--use-shared-libs' || ''}} + --source-dir /mnt/repo/components/core + --build-dir /mnt/repo/components/core/build + --num-jobs $(getconf _NPROCESSORS_ONLN) + + musllinux_1_2-x86_64-binaries: + # Run if the ancestor jobs succeeded OR they were skipped and clp was changed. + if: >- + success() + || (!cancelled() && !failure() && needs.filter-relevant-changes.outputs.clp_changed == 'true') + needs: + - "musllinux_1_2-x86_64-deps-image" + - "filter-relevant-changes" + strategy: + matrix: + use_shared_libs: [true, false] + name: >- + musllinux_1_2-x86_64-${{matrix.use_shared_libs == true && 'dynamic' || 'static'}}-linked-bins + continue-on-error: true + runs-on: "ubuntu-24.04" + steps: + - uses: "actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683" + with: + submodules: "recursive" + + - name: "Work around actions/runner-images/issues/6775" + run: "chown $(id -u):$(id -g) -R ." + shell: "bash" + + - uses: "./.github/actions/run-on-image" + env: + OS_NAME: "musllinux_1_2" + with: + image_name: "${{env.DEPS_IMAGE_NAME_PREFIX}}${{env.OS_NAME}}" + use_published_image: >- + ${{needs.filter-relevant-changes.outputs.musllinux_1_2_x86_64_image_changed == 'false' + || (github.event_name != 'pull_request' && github.ref == 'refs/heads/main')}} + run_command: >- + CLP_CORE_MAX_PARALLELISM_PER_BUILD_TASK=$(getconf _NPROCESSORS_ONLN) task deps:core + && python3 /mnt/repo/components/core/tools/scripts/utils/build-and-run-unit-tests.py + ${{matrix.use_shared_libs == true && '--use-shared-libs' || ''}} + --source-dir /mnt/repo/components/core + --build-dir /mnt/repo/components/core/build + --num-jobs $(getconf _NPROCESSORS_ONLN) + ubuntu-jammy-binaries: # Run if the ancestor jobs succeeded OR they were skipped and clp was changed. if: >- diff --git a/docs/src/dev-docs/tooling-containers.md b/docs/src/dev-docs/tooling-containers.md index fcef664133..36ee7664aa 100644 --- a/docs/src/dev-docs/tooling-containers.md +++ b/docs/src/dev-docs/tooling-containers.md @@ -29,6 +29,13 @@ distros using glibc 2.28+, including: ### clp-core-dependencies-x86-manylinux_2_28 +* [GitHub Packages page][core-deps-manylinux_2_28-x86_64] +* Pull command: + + ```bash + docker pull ghcr.io/y-scope/clp/clp-core-dependencies-x86-manylinux_2_28:main + ``` + * Path: ```text @@ -55,6 +62,13 @@ other distros using musl 1.2, including: ### clp-core-dependencies-x86-musllinux_1_2 +* [GitHub Packages page][core-deps-musllinux_1_2-x86_64] +* Pull command: + + ```bash + docker pull ghcr.io/y-scope/clp/clp-core-dependencies-x86-musllinux_1_2:main + ``` + * Path: ```text @@ -134,6 +148,8 @@ environment. ``` [core-deps-centos-stream-9]: https://github.com/y-scope/clp/pkgs/container/clp%2Fclp-core-dependencies-x86-centos-stream-9 +[core-deps-manylinux_2_28-x86_64]: https://github.com/y-scope/clp/pkgs/container/clp%2Fclp-core-dependencies-x86-manylinux_2_28 +[core-deps-musllinux_1_2-x86_64]: https://github.com/y-scope/clp/pkgs/container/clp%2Fclp-core-dependencies-x86-musllinux_1_2 [core-deps-ubuntu-jammy]: https://github.com/y-scope/clp/pkgs/container/clp%2Fclp-core-dependencies-x86-ubuntu-jammy [core-ubuntu-jammy]: https://github.com/y-scope/clp/pkgs/container/clp%2Fclp-core-x86-ubuntu-jammy [exe-ubuntu-jammy]: https://github.com/y-scope/clp/pkgs/container/clp%2Fclp-execution-x86-ubuntu-jammy diff --git a/docs/src/dev-docs/tooling-gh-workflows.md b/docs/src/dev-docs/tooling-gh-workflows.md index bc38f75257..7ac57344c0 100644 --- a/docs/src/dev-docs/tooling-gh-workflows.md +++ b/docs/src/dev-docs/tooling-gh-workflows.md @@ -27,12 +27,18 @@ shown below. } } }%% -flowchart TD +flowchart LR filter-relevant-changes --> centos-stream-9-deps-image + filter-relevant-changes --> manylinux_2_28-x86_64-deps-image + filter-relevant-changes --> musllinux_1_2-x86_64-deps-image filter-relevant-changes --> ubuntu-jammy-deps-image filter-relevant-changes --> centos-stream-9-binaries + filter-relevant-changes --> manylinux_2_28-x86_64-binaries + filter-relevant-changes --> musllinux_1_2-x86_64-binaries filter-relevant-changes --> ubuntu-jammy-binaries centos-stream-9-deps-image --> centos-stream-9-binaries + manylinux_2_28-x86_64-deps-image --> manylinux_2_28-x86_64-binaries + musllinux_1_2-x86_64-deps-image --> musllinux_1_2-x86_64-binaries ubuntu-jammy-deps-image --> ubuntu-jammy-binaries ubuntu-jammy-binaries --> ubuntu-jammy-binaries-image ::: @@ -43,10 +49,18 @@ Arrows between jobs indicate a dependency. The jobs are as follows: the following jobs should run. * `centos-stream-9-deps-image`: Builds a container image containing the dependencies necessary to build CLP-core in a CentOS Stream 9 x86 environment. +* `manylinux_2_28-x86_64-deps-image`: Builds a container image containing the dependencies necessary + to build CLP-core in a manylinux_2_28 x86 environment. +* `musllinux_1_2-x86_64-deps-image`: Builds a container image containing the dependencies necessary + to build CLP-core in a musllinux_1_2 x86 environment. * `ubuntu-jammy-deps-image`: Builds a container image containing the dependencies necessary to build CLP-core in an Ubuntu Jammy x86 environment. * `centos-stream-9-binaries`: Builds the CLP-core binaries in the built CentOS Stream 9 container and runs core's unit tests. +* `manylinux_2_28-x86_64-binaries`: Builds the CLP-core binaries in the built manylinux_2_28 + container and runs core's unit tests. +* `musllinux_1_2-x86_64-binaries`: Builds the CLP-core binaries in the built musllinux_1_2 container + and runs core's unit tests. * `ubuntu-jammy-binaries`: Builds the CLP-core binaries in the built Ubuntu Jammy container and runs core's unit tests. * `ubuntu-jammy-binaries-image`: Builds an Ubuntu Jammy container image containing CLP-core's