Skip to content

Simplify Debug/Release options #1280

New issue

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

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

Already on GitHub? # to your account

Merged
merged 1 commit into from
May 21, 2025

Conversation

JackPGreen
Copy link
Contributor

@JackPGreen JackPGreen commented May 17, 2025

The change in #1279 made it obvious that adding configuration for Debug builds (e.g. "add an extra compilation argument") was very tedious as it needs to be declared in each workflow and then passed all the way down to the actual scripts that build the code.

Instead, it'd be much cleaner if the jobs only declare a release type, and the build scripts react to that with the appropriate actions (e.g. adding some extra debug or whatever).

Changes:

  • migrate the implementation of the DEBUG builds into the build- scripts
    • e.g. WARN_AS_ERROR can be assumed when DEBUG is enabled, rather than being duplicated in each job configuration
    • remove the architecture to pass these redundant params down
  • pass BUILD_TYPE into the build- scripts as an environment variable, as already used for other parameters and for the Windows equivalent (BUILD_CONFIGURATION)

This PR is the refactor-half of #1279, split out separately to make that PR smaller.

@JackPGreen JackPGreen self-assigned this May 17, 2025
The change in hazelcast#1279 made it obvious that adding configuration for `Debug` builds (e.g. "add an extra compilation argument") was very tedious as it needs to be declared in _each_ workflow and then passed all the way down to the actual scripts that build the code.

Instead, it'd be much cleaner if the jobs _only_ declare a release type, and the build scripts react to that with the appropriate actions (e.g. adding some extra debug or whatever).

Changes:
- migrate the _implementation_ of the `DEBUG` builds into the `build-` scripts
   - e.g. `WARN_AS_ERROR` can be assumed when `DEBUG` is enabled, rather than being duplicated in each job configuration
   - remove the architecture to pass these redundant params down
- pass `BUILD_TYPE` into the `build-` scripts as an environment variable, as used for other parameters
-  rename `BUILD_CONFIGURATION` to `BUILD_TYPE` in Windows scripts for consistency
- enable `WARN_AS_ERROR` on Windows for consistency

This PR also helps to make hazelcast#1279 smaller.
@JackPGreen JackPGreen force-pushed the release-type-refactor branch from 61c26e1 to 9d3810c Compare May 17, 2025 19:41
@JackPGreen JackPGreen marked this pull request as ready for review May 17, 2025 20:34
@JackPGreen JackPGreen requested a review from ihsandemir as a code owner May 17, 2025 20:34
@JackPGreen JackPGreen enabled auto-merge (squash) May 17, 2025 20:34
@JackPGreen JackPGreen merged commit 9c7a8ce into hazelcast:master May 21, 2025
45 checks passed
ihsandemir pushed a commit to ihsandemir/hazelcast-cpp-client that referenced this pull request May 23, 2025
The change in
hazelcast#1279 made it
obvious that adding configuration for `Debug` builds (e.g. "add an extra
compilation argument") was very tedious as it needs to be declared in
_each_ workflow and then passed all the way down to the actual scripts
that build the code.

Instead, it'd be much cleaner if the jobs _only_ declare a release type,
and the build scripts react to that with the appropriate actions (e.g.
adding some extra debug or whatever).

Changes:
- migrate the _implementation_ of the `DEBUG` builds into the `build-`
scripts
- e.g. `WARN_AS_ERROR` can be assumed when `DEBUG` is enabled, rather
than being duplicated in each job configuration
   - remove the architecture to pass these redundant params down
- pass `BUILD_TYPE` into the `build-` scripts as an environment
variable, as already used for other parameters and for the Windows
equivalent (`BUILD_CONFIGURATION`)

This PR is the refactor-half of
hazelcast#1279, split out
separately to make that PR smaller.
ihsandemir pushed a commit to ihsandemir/hazelcast-cpp-client that referenced this pull request May 23, 2025
The change in
hazelcast#1279 made it
obvious that adding configuration for `Debug` builds (e.g. "add an extra
compilation argument") was very tedious as it needs to be declared in
_each_ workflow and then passed all the way down to the actual scripts
that build the code.

Instead, it'd be much cleaner if the jobs _only_ declare a release type,
and the build scripts react to that with the appropriate actions (e.g.
adding some extra debug or whatever).

Changes:
- migrate the _implementation_ of the `DEBUG` builds into the `build-`
scripts
- e.g. `WARN_AS_ERROR` can be assumed when `DEBUG` is enabled, rather
than being duplicated in each job configuration
   - remove the architecture to pass these redundant params down
- pass `BUILD_TYPE` into the `build-` scripts as an environment
variable, as already used for other parameters and for the Windows
equivalent (`BUILD_CONFIGURATION`)

This PR is the refactor-half of
hazelcast#1279, split out
separately to make that PR smaller.
ihsandemir pushed a commit to ihsandemir/hazelcast-cpp-client that referenced this pull request May 23, 2025
The change in
hazelcast#1279 made it
obvious that adding configuration for `Debug` builds (e.g. "add an extra
compilation argument") was very tedious as it needs to be declared in
_each_ workflow and then passed all the way down to the actual scripts
that build the code.

Instead, it'd be much cleaner if the jobs _only_ declare a release type,
and the build scripts react to that with the appropriate actions (e.g.
adding some extra debug or whatever).

Changes:
- migrate the _implementation_ of the `DEBUG` builds into the `build-`
scripts
- e.g. `WARN_AS_ERROR` can be assumed when `DEBUG` is enabled, rather
than being duplicated in each job configuration
   - remove the architecture to pass these redundant params down
- pass `BUILD_TYPE` into the `build-` scripts as an environment
variable, as already used for other parameters and for the Windows
equivalent (`BUILD_CONFIGURATION`)

This PR is the refactor-half of
hazelcast#1279, split out
separately to make that PR smaller.
ihsandemir pushed a commit to ihsandemir/hazelcast-cpp-client that referenced this pull request May 23, 2025
The change in
hazelcast#1279 made it
obvious that adding configuration for `Debug` builds (e.g. "add an extra
compilation argument") was very tedious as it needs to be declared in
_each_ workflow and then passed all the way down to the actual scripts
that build the code.

Instead, it'd be much cleaner if the jobs _only_ declare a release type,
and the build scripts react to that with the appropriate actions (e.g.
adding some extra debug or whatever).

Changes:
- migrate the _implementation_ of the `DEBUG` builds into the `build-`
scripts
- e.g. `WARN_AS_ERROR` can be assumed when `DEBUG` is enabled, rather
than being duplicated in each job configuration
   - remove the architecture to pass these redundant params down
- pass `BUILD_TYPE` into the `build-` scripts as an environment
variable, as already used for other parameters and for the Windows
equivalent (`BUILD_CONFIGURATION`)

This PR is the refactor-half of
hazelcast#1279, split out
separately to make that PR smaller.
ihsandemir pushed a commit that referenced this pull request May 23, 2025
The change in
#1279 made it
obvious that adding configuration for `Debug` builds (e.g. "add an extra
compilation argument") was very tedious as it needs to be declared in
_each_ workflow and then passed all the way down to the actual scripts
that build the code.

Instead, it'd be much cleaner if the jobs _only_ declare a release type,
and the build scripts react to that with the appropriate actions (e.g.
adding some extra debug or whatever).

Changes:
- migrate the _implementation_ of the `DEBUG` builds into the `build-`
scripts
- e.g. `WARN_AS_ERROR` can be assumed when `DEBUG` is enabled, rather
than being duplicated in each job configuration
   - remove the architecture to pass these redundant params down
- pass `BUILD_TYPE` into the `build-` scripts as an environment
variable, as already used for other parameters and for the Windows
equivalent (`BUILD_CONFIGURATION`)

This PR is the refactor-half of
#1279, split out
separately to make that PR smaller.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants