-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[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
Conversation
We want to test libc in all build configurations: Debug, Release and MinSizeRel which correspond to -O0, -O3 and -Os optimization flags.
@llvm/pr-subscribers-github-workflow @llvm/pr-subscribers-libc Author: Petr Hosek (petrhosek) ChangesWe 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:
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
|
There was a problem hiding this 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!
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.
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 |
Sounds good to me, Thanks! |
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.
…m#126315) We want to test libc in all build configurations: Debug, Release and MinSizeRel which correspond to -O0, -O3 and -Os optimization flags.
…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.
…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.
…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.
We want to test libc in all build configurations: Debug, Release and MinSizeRel which correspond to -O0, -O3 and -Os optimization flags.