ci: don't automatically enable -Werror if in CI environment

This catches downstream consumers of neovim off-guard when trying to use
neovim in an esoteric environment not tested in our own CI.

Closes https://github.com/neovim/neovim/issues/22932

(cherry picked from commit 0256b67e89)
This commit is contained in:
dundargoc
2023-04-07 20:44:00 +02:00
committed by github-actions[bot]
parent 7a3dbde15c
commit 19bc7456b8
7 changed files with 12 additions and 16 deletions

View File

@@ -67,7 +67,7 @@ jobs:
run: make deps
- name: Build
run: make CMAKE_FLAGS="-D CMAKE_INSTALL_PREFIX:PATH=$INSTALL_PREFIX"
run: make CMAKE_FLAGS="-D CI_BUILD=ON -D CMAKE_INSTALL_PREFIX:PATH=$INSTALL_PREFIX"
- name: Install
run: make install

View File

@@ -33,7 +33,7 @@ jobs:
- name: Build release
id: build
run: |
CC=gcc-10 make CMAKE_BUILD_TYPE=${NVIM_BUILD_TYPE} CMAKE_EXTRA_FLAGS="-DCI_BUILD=OFF -DCMAKE_INSTALL_PREFIX:PATH="
CC=gcc-10 make CMAKE_BUILD_TYPE=${NVIM_BUILD_TYPE} CMAKE_EXTRA_FLAGS="-DCMAKE_INSTALL_PREFIX:PATH="
printf 'version<<END\n' >> $GITHUB_OUTPUT
./build/bin/nvim --version | head -n 3 >> $GITHUB_OUTPUT
printf 'END\n' >> $GITHUB_OUTPUT
@@ -126,7 +126,7 @@ jobs:
cmake --build .deps
- name: build package
run: |
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE='RelWithDebInfo' -D CI_BUILD=OFF
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE='RelWithDebInfo'
cmake --build build --target package
- uses: actions/upload-artifact@v3
with:

View File

@@ -76,7 +76,7 @@ jobs:
- if: success() || failure() && steps.abort_job.outputs.status == 'success'
name: configure
run: cmake -B build -G Ninja -D CI_BUILD=OFF
run: cmake -B build -G Ninja
- if: "!cancelled()"
name: Determine if run should be aborted
@@ -197,7 +197,7 @@ jobs:
- name: Build
run: |
cmake -B build -G Ninja -D CMAKE_INSTALL_PREFIX:PATH=$INSTALL_PREFIX ${{ matrix.flags }}
cmake -B build -G Ninja -D CMAKE_INSTALL_PREFIX:PATH=$INSTALL_PREFIX ${{ matrix.flags }} -D CI_BUILD=ON
cmake --build build
- if: "!cancelled()"
@@ -276,7 +276,7 @@ jobs:
cmake --build .deps
- name: Configure
run: cmake -B build -G "Ninja Multi-Config" -D CMAKE_C_COMPILER=gcc
run: cmake -B build -G "Ninja Multi-Config" -D CMAKE_C_COMPILER=gcc -D CI_BUILD=ON
- name: Release
run: cmake --build build --config Release
@@ -313,7 +313,7 @@ jobs:
- name: Build
run: |
cmake -B build -G Ninja -D CMAKE_BUILD_TYPE='RelWithDebInfo'
cmake -B build -G Ninja -D CMAKE_BUILD_TYPE='RelWithDebInfo' -D CI_BUILD=ON
cmake --build build
- name: Install test deps
@@ -405,5 +405,5 @@ jobs:
- name: Build
run: |
cmake -B build -G Ninja
cmake -B build -G Ninja -D CI_BUILD=ON
cmake --build build