Skip to content

[libc] Exercise all CMake build types in GitHub Action workflows #126315

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 7, 2025

Conversation

petrhosek
Copy link
Member

We want to test libc in all build configurations: Debug, Release and MinSizeRel which correspond to -O0, -O3 and -Os optimization flags.

We want to test libc in all build configurations: Debug, Release and
MinSizeRel which correspond to -O0, -O3 and -Os optimization flags.
@llvmbot
Copy link
Member

llvmbot commented Feb 7, 2025

@llvm/pr-subscribers-github-workflow

@llvm/pr-subscribers-libc

Author: Petr Hosek (petrhosek)

Changes

We want to test libc in all build configurations: Debug, Release and MinSizeRel which correspond to -O0, -O3 and -Os optimization flags.


Full diff: https://github.com/llvm/llvm-project/pull/126315.diff

2 Files Affected:

  • (modified) .github/workflows/libc-fullbuild-tests.yml (+2-1)
  • (modified) .github/workflows/libc-overlay-tests.yml (+2-1)
diff --git a/.github/workflows/libc-fullbuild-tests.yml b/.github/workflows/libc-fullbuild-tests.yml
index 2c88da653aae4a8..d93ac841162404b 100644
--- a/.github/workflows/libc-fullbuild-tests.yml
+++ b/.github/workflows/libc-fullbuild-tests.yml
@@ -15,6 +15,7 @@ jobs:
     strategy:
       fail-fast: false
       matrix:
+        build_type: [Debug, Release, MinSizeRel]
         include:
           - os: ubuntu-24.04
             ccache-variant: sccache
@@ -68,7 +69,7 @@ jobs:
         cmake -B ${{ steps.strings.outputs.build-output-dir }}
         -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
         -DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
-        -DCMAKE_BUILD_TYPE=MinSizeRel
+        -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
         -DCMAKE_C_COMPILER_LAUNCHER=${{ matrix.ccache-variant }}
         -DCMAKE_CXX_COMPILER_LAUNCHER=${{ matrix.ccache-variant }}
         -DCMAKE_INSTALL_PREFIX=${{ steps.strings.outputs.build-install-dir }}
diff --git a/.github/workflows/libc-overlay-tests.yml b/.github/workflows/libc-overlay-tests.yml
index 0a0916084b18c15..de4b58c008ee48e 100644
--- a/.github/workflows/libc-overlay-tests.yml
+++ b/.github/workflows/libc-overlay-tests.yml
@@ -16,6 +16,7 @@ jobs:
       # Set fail-fast to false to ensure that feedback is delivered for all matrix combinations.
       fail-fast: false
       matrix:
+        build_type: [Debug, Release, MinSizeRel]
         include:
           # TODO: add linux gcc when it is fixed
           - os: ubuntu-24.04
@@ -95,7 +96,7 @@ jobs:
         cmake -B ${{ steps.strings.outputs.build-output-dir }}
         -DCMAKE_CXX_COMPILER=${{ matrix.compiler.cpp_compiler }}
         -DCMAKE_C_COMPILER=${{ matrix.compiler.c_compiler }}
-        -DCMAKE_BUILD_TYPE=MinSizeRel
+        -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
         -DCMAKE_C_COMPILER_LAUNCHER=${{ matrix.ccache-variant }}
         -DCMAKE_CXX_COMPILER_LAUNCHER=${{ matrix.ccache-variant }}
         -DCMAKE_POLICY_DEFAULT_CMP0141=NEW

Copy link
Member

@nickdesaulniers nickdesaulniers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the patch!

@petrhosek petrhosek merged commit 170cdad into llvm:main Feb 7, 2025
15 checks passed
petrhosek added a commit to petrhosek/llvm-project that referenced this pull request Feb 7, 2025
This was originally done for testing purposes, but after llvm#126315 we
now do testing through GitHub Actions and should be instead using
the optimization setting chosen by the user.
@boomanaiden154
Copy link
Contributor

This should be fine, but we do need to be careful that we don't exceed the Github actions queue and make actions related to other workflows wait. I don't think this will be an issue given the release tests are done on Buildkite (migrating to GHA soonish on self hosted runners) and that they're pretty short, just something we need to be mindful of.

(In terms of specifics, we can have up to 60 actions executing at the same time on the hosted Github runners).

@petrhosek
Copy link
Member Author

This should be fine, but we do need to be careful that we don't exceed the Github actions queue and make actions related to other workflows wait. I don't think this will be an issue given the release tests are done on Buildkite (migrating to GHA soonish on self hosted runners) and that they're pretty short, just something we need to be mindful of.

(In terms of specifics, we can have up to 60 actions executing at the same time on the hosted Github runners).

If this becomes an issue, we can change the configuration to only test Debug, Release and MinSizeRel in the full build mode, and for the overlay mode only use one of these configurations since the full build mode should be a superset of the overlay mode.

@boomanaiden154
Copy link
Contributor

Sounds good to me, Thanks!

petrhosek added a commit that referenced this pull request Feb 11, 2025
This was originally done for testing purposes, but after #126315 we now
do testing through GitHub Actions and should be instead using the
optimization setting chosen by the user.
krishna2803 added a commit to krishna2803/llvm-project that referenced this pull request Feb 11, 2025
Icohedron pushed a commit to Icohedron/llvm-project that referenced this pull request Feb 11, 2025
…m#126315)

We want to test libc in all build configurations: Debug, Release and
MinSizeRel which correspond to -O0, -O3 and -Os optimization flags.
Icohedron pushed a commit to Icohedron/llvm-project that referenced this pull request Feb 11, 2025
…126322)

This was originally done for testing purposes, but after llvm#126315 we now
do testing through GitHub Actions and should be instead using the
optimization setting chosen by the user.
joaosaffran pushed a commit to joaosaffran/llvm-project that referenced this pull request Feb 14, 2025
…126322)

This was originally done for testing purposes, but after llvm#126315 we now
do testing through GitHub Actions and should be instead using the
optimization setting chosen by the user.
sivan-shani pushed a commit to sivan-shani/llvm-project that referenced this pull request Feb 24, 2025
…126322)

This was originally done for testing purposes, but after llvm#126315 we now
do testing through GitHub Actions and should be instead using the
optimization setting chosen by the user.
@petrhosek petrhosek deleted the libc-workflow-build-type branch February 24, 2025 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants