From 29debc07c4ea0bb2691f0a8c1fe5ab558592edcf Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Tue, 6 Feb 2024 19:12:38 +0400 Subject: [PATCH] Let specify arbitrary build configuration via Docker Default to RelWithDebInfo for both optimizations and debug information --- .github/workflows/linux.yml | 2 +- Telegram/build/docker/centos_env/build.sh | 7 +------ docs/building-linux.md | 2 +- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 6ac646b3c6..fe6d3752c8 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -85,7 +85,7 @@ jobs: docker run --rm \ -v $PWD:/usr/src/tdesktop \ - -e DEBUG=1 \ + -e CONFIG=Debug \ tdesktop:centos_env \ /usr/src/tdesktop/Telegram/build/docker/centos_env/build.sh \ -D CMAKE_C_FLAGS_DEBUG="" \ diff --git a/Telegram/build/docker/centos_env/build.sh b/Telegram/build/docker/centos_env/build.sh index 6aee294a44..0bf1aae043 100755 --- a/Telegram/build/docker/centos_env/build.sh +++ b/Telegram/build/docker/centos_env/build.sh @@ -3,9 +3,4 @@ set -e cd Telegram ./configure.sh "$@" - -if [ -n "$DEBUG" ]; then - cmake --build ../out --config Debug --parallel -else - cmake --build ../out --config Release --parallel -fi +cmake --build ../out --config "${CONFIG:-RelWithDebInfo}" --parallel diff --git a/docs/building-linux.md b/docs/building-linux.md index 6be5a32b4c..4fa4503b5a 100644 --- a/docs/building-linux.md +++ b/docs/building-linux.md @@ -30,7 +30,7 @@ Or, to create a debug build, run (also using [your **api_id** and **api_hash**]( docker run --rm -it \ -v $PWD:/usr/src/tdesktop \ - -e DEBUG=1 \ + -e CONFIG=Debug \ tdesktop:centos_env \ /usr/src/tdesktop/Telegram/build/docker/centos_env/build.sh \ -D TDESKTOP_API_ID=YOUR_API_ID \