From 5abebcf61ff06713c318e4f7c342d62568cfd255 Mon Sep 17 00:00:00 2001 From: ISSOtm Date: Wed, 18 Mar 2026 03:02:05 +0100 Subject: [PATCH] Specify build type implicitly Again, shortening the CMake command line. Unfortunately, this doesn't apply to `--install`. --- .github/workflows/create-release-artifacts.yml | 6 ++++-- .github/workflows/testing.yml | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/create-release-artifacts.yml b/.github/workflows/create-release-artifacts.yml index 79e2c57a..fe249503 100644 --- a/.github/workflows/create-release-artifacts.yml +++ b/.github/workflows/create-release-artifacts.yml @@ -11,6 +11,8 @@ env: # https://docs.github.com/en/actions/reference/runners/github-hosted-runners#standard-github-hosted-runners-for-public-repositories CMAKE_BUILD_PARALLEL_LEVEL: 4 # `cmake --build` now implies `--parallel 4`. CMAKE_INSTALL_PARALLEL_LEVEL: 4 # `cmake --install` now implies `--parallel 4`. + CMAKE_BUILD_TYPE: Release # `cmake -S` now implies `-DCMAKE_BUILD_TYPE=Release`. + CMAKE_CONFIG_TYPE: Release # `cmake --build` now implies `--config Release`. jobs: windows: @@ -41,8 +43,8 @@ jobs: # We instruct CMake to download and build third-party projects outside of our source tree, # otherwise they can trigger `-Werror=dev` (from the `develop` preset). run: | - cmake -S . -B build -A ${{ matrix.platform }} -DCMAKE_BUILD_TYPE=Release -DFETCHCONTENT_BASE_DIR="$TEMP/cmake-deps" -DBISON_EXECUTABLE=bison/win_bison.exe - cmake --build build --config Release + cmake -S . -B build -A ${{ matrix.platform }} -DFETCHCONTENT_BASE_DIR="$TEMP/cmake-deps" -DBISON_EXECUTABLE=bison/win_bison.exe + cmake --build build cmake --install build --config Release --prefix install_dir --verbose - name: Package binaries run: | diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 89d23a3e..3cd9e0ee 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -10,6 +10,7 @@ env: # https://docs.github.com/en/actions/reference/runners/github-hosted-runners#standard-github-hosted-runners-for-public-repositories CMAKE_BUILD_PARALLEL_LEVEL: 4 # `cmake --build` now implies `--parallel 4`. CMAKE_INSTALL_PARALLEL_LEVEL: 4 # `cmake --install` now implies `--parallel 4`. + CMAKE_CONFIG_TYPE: Debug # `cmake --build` now implies `--config Debug`. jobs: unix: @@ -166,7 +167,7 @@ jobs: # otherwise they can trigger `-Werror=dev` (from the `develop` preset). run: | # ASan seems to be broken on Windows, so we disable it. cmake -S . -B build -A ${{ matrix.platform }} --preset develop -DFETCHCONTENT_BASE_DIR="$TEMP/cmake-deps" -DBISON_EXECUTABLE=bison/win_bison.exe -DSANITIZERS=OFF - cmake --build build --config Debug + cmake --build build cmake --install build --config Debug --prefix install_dir --verbose - name: Package binaries shell: bash