ci: don't automatically enable -Werror on CI environments

This catches downstream consumers of neovim off guard when using neovim in an
esoteric environment not tested in our own CI.

Closes https://github.com/neovim/neovim/issues/22932
This commit is contained in:
dundargoc 2023-04-07 22:31:04 +02:00 committed by GitHub
parent 2d78e656b7
commit d4398f4021
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 12 additions and 16 deletions

View File

@ -14,7 +14,7 @@ freebsd_task:
build_deps_script:
- gmake deps
build_script:
- gmake nvim
- gmake CMAKE_EXTRA_FLAGS="-DCI_BUILD=ON" nvim
workaround_script:
# Run tests as user "cirrus" instead of root. This is required for the
# permission-related tests to work correctly.

View File

@ -25,7 +25,7 @@ MACOSX_DEPLOYMENT_TARGET="$(sw_vers -productVersion | cut -f1 -d.)"
export MACOSX_DEPLOYMENT_TARGET
cmake -S cmake.deps -B .deps -G Ninja -D CMAKE_BUILD_TYPE=${NVIM_BUILD_TYPE} -D CMAKE_OSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} -D CMAKE_OSX_ARCHITECTURES=arm64\;x86_64
cmake --build .deps
cmake -B build -G Ninja -D CMAKE_BUILD_TYPE=${NVIM_BUILD_TYPE} -D CMAKE_OSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} -D CMAKE_OSX_ARCHITECTURES=arm64\;x86_64 -D CI_BUILD=OFF
cmake -B build -G Ninja -D CMAKE_BUILD_TYPE=${NVIM_BUILD_TYPE} -D CMAKE_OSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} -D CMAKE_OSX_ARCHITECTURES=arm64\;x86_64
cmake --build build
cmake --install build --prefix build/release/nvim-macos
cd build

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

View File

@ -26,7 +26,7 @@ APP_DIR="$APP.AppDir"
########################################################################
# Build and install nvim into the AppImage
make CMAKE_BUILD_TYPE=RelWithDebInfo CMAKE_EXTRA_FLAGS="-DCI_BUILD=OFF -DCMAKE_INSTALL_PREFIX=${APP_DIR}/usr -DCMAKE_INSTALL_MANDIR=man"
make CMAKE_BUILD_TYPE=RelWithDebInfo CMAKE_EXTRA_FLAGS="-DCMAKE_INSTALL_PREFIX=${APP_DIR}/usr -DCMAKE_INSTALL_MANDIR=man"
make install
########################################################################

View File

@ -146,11 +146,7 @@ if(HAS_DIAG_COLOR_FLAG)
endif()
endif()
if($ENV{CI})
option(CI_BUILD "CI, extra flags will be set" ON)
else()
option(CI_BUILD "CI, extra flags will be set" OFF)
endif()
option(CI_BUILD "CI, extra flags will be set" OFF)
if(CI_BUILD)
message(STATUS "CI build enabled")
if(MSVC)