mirror of
https://github.com/neovim/neovim.git
synced 2024-12-23 12:45:17 -07:00
build: various fixes
- Consistently use the variable CMAKE_BUILD_TYPE to select build type. - Remove broken `doc_html` target. - Remove swap files created by oldtest when cleaning. - Only rerun `lintdoc` if any documentation files has changed.
This commit is contained in:
parent
cc197d04fc
commit
4c91194611
4
.github/scripts/build_universal_macos.sh
vendored
4
.github/scripts/build_universal_macos.sh
vendored
@ -3,13 +3,13 @@
|
|||||||
MACOSX_DEPLOYMENT_TARGET="$(sw_vers -productVersion | cut -f1 -d.)"
|
MACOSX_DEPLOYMENT_TARGET="$(sw_vers -productVersion | cut -f1 -d.)"
|
||||||
export MACOSX_DEPLOYMENT_TARGET
|
export MACOSX_DEPLOYMENT_TARGET
|
||||||
cmake -S cmake.deps -B .deps -G Ninja \
|
cmake -S cmake.deps -B .deps -G Ninja \
|
||||||
-D CMAKE_BUILD_TYPE=${NVIM_BUILD_TYPE} \
|
-D CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} \
|
||||||
-D CMAKE_OSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} \
|
-D CMAKE_OSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} \
|
||||||
-D CMAKE_OSX_ARCHITECTURES=arm64\;x86_64 \
|
-D CMAKE_OSX_ARCHITECTURES=arm64\;x86_64 \
|
||||||
-D CMAKE_FIND_FRAMEWORK=NEVER
|
-D CMAKE_FIND_FRAMEWORK=NEVER
|
||||||
cmake --build .deps
|
cmake --build .deps
|
||||||
cmake -B build -G Ninja \
|
cmake -B build -G Ninja \
|
||||||
-D CMAKE_BUILD_TYPE=${NVIM_BUILD_TYPE} \
|
-D CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} \
|
||||||
-D CMAKE_OSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} \
|
-D CMAKE_OSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} \
|
||||||
-D CMAKE_OSX_ARCHITECTURES=arm64\;x86_64 \
|
-D CMAKE_OSX_ARCHITECTURES=arm64\;x86_64 \
|
||||||
-D ENABLE_LIBINTL=OFF \
|
-D ENABLE_LIBINTL=OFF \
|
||||||
|
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@ -26,7 +26,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: ./.github/actions/setup
|
- uses: ./.github/actions/setup
|
||||||
- run: printf 'NVIM_BUILD_TYPE=Release\n' >> $GITHUB_ENV
|
- run: printf 'CMAKE_BUILD_TYPE=Release\n' >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Build universal binary
|
- name: Build universal binary
|
||||||
run: ./.github/scripts/build_universal_macos.sh
|
run: ./.github/scripts/build_universal_macos.sh
|
||||||
|
8
.github/workflows/release.yml
vendored
8
.github/workflows/release.yml
vendored
@ -29,11 +29,11 @@ jobs:
|
|||||||
- run: ./.github/scripts/install_deps.sh
|
- run: ./.github/scripts/install_deps.sh
|
||||||
- if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name != 'nightly')
|
- if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name != 'nightly')
|
||||||
run: |
|
run: |
|
||||||
echo 'NVIM_BUILD_TYPE=Release' >> $GITHUB_ENV
|
echo 'CMAKE_BUILD_TYPE=Release' >> $GITHUB_ENV
|
||||||
echo 'APPIMAGE_TAG=latest' >> $GITHUB_ENV
|
echo 'APPIMAGE_TAG=latest' >> $GITHUB_ENV
|
||||||
- if: github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name == 'nightly')
|
- if: github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name == 'nightly')
|
||||||
run: |
|
run: |
|
||||||
echo 'NVIM_BUILD_TYPE=RelWithDebInfo' >> $GITHUB_ENV
|
echo 'CMAKE_BUILD_TYPE=RelWithDebInfo' >> $GITHUB_ENV
|
||||||
echo 'APPIMAGE_TAG=nightly' >> $GITHUB_ENV
|
echo 'APPIMAGE_TAG=nightly' >> $GITHUB_ENV
|
||||||
- name: appimage
|
- name: appimage
|
||||||
run: ./scripts/genappimage.sh ${APPIMAGE_TAG}
|
run: ./scripts/genappimage.sh ${APPIMAGE_TAG}
|
||||||
@ -69,9 +69,9 @@ jobs:
|
|||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: ./.github/scripts/install_deps.sh
|
run: ./.github/scripts/install_deps.sh
|
||||||
- if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name != 'nightly')
|
- if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name != 'nightly')
|
||||||
run: printf 'NVIM_BUILD_TYPE=Release\n' >> $GITHUB_ENV
|
run: printf 'CMAKE_BUILD_TYPE=Release\n' >> $GITHUB_ENV
|
||||||
- if: github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name == 'nightly')
|
- if: github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name == 'nightly')
|
||||||
run: printf 'NVIM_BUILD_TYPE=RelWithDebInfo\n' >> $GITHUB_ENV
|
run: printf 'CMAKE_BUILD_TYPE=RelWithDebInfo\n' >> $GITHUB_ENV
|
||||||
- name: Build universal binary
|
- name: Build universal binary
|
||||||
run: ./.github/scripts/build_universal_macos.sh
|
run: ./.github/scripts/build_universal_macos.sh
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v4
|
||||||
|
@ -39,6 +39,8 @@ include(Util)
|
|||||||
set(FUNCS_DATA ${PROJECT_BINARY_DIR}/funcs_data.mpack)
|
set(FUNCS_DATA ${PROJECT_BINARY_DIR}/funcs_data.mpack)
|
||||||
set(TOUCHES_DIR ${PROJECT_BINARY_DIR}/touches)
|
set(TOUCHES_DIR ${PROJECT_BINARY_DIR}/touches)
|
||||||
|
|
||||||
|
file(GLOB DOCFILES CONFIGURE_DEPENDS ${PROJECT_SOURCE_DIR}/runtime/doc/*.txt)
|
||||||
|
|
||||||
set_directory_properties(PROPERTIES
|
set_directory_properties(PROPERTIES
|
||||||
EP_PREFIX "${DEPS_BUILD_DIR}")
|
EP_PREFIX "${DEPS_BUILD_DIR}")
|
||||||
|
|
||||||
|
@ -55,8 +55,6 @@ foreach(PACKAGE ${PACKAGES})
|
|||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
file(GLOB DOCFILES CONFIGURE_DEPENDS ${PROJECT_SOURCE_DIR}/runtime/doc/*.txt)
|
|
||||||
|
|
||||||
set(BUILDDOCFILES)
|
set(BUILDDOCFILES)
|
||||||
foreach(DF ${DOCFILES})
|
foreach(DF ${DOCFILES})
|
||||||
get_filename_component(F ${DF} NAME)
|
get_filename_component(F ${DF} NAME)
|
||||||
@ -75,15 +73,6 @@ add_custom_command(OUTPUT ${GENERATED_HELP_TAGS}
|
|||||||
WORKING_DIRECTORY "${GENERATED_RUNTIME_DIR}"
|
WORKING_DIRECTORY "${GENERATED_RUNTIME_DIR}"
|
||||||
)
|
)
|
||||||
|
|
||||||
# TODO: This doesn't work. wait for "nvim -l" to land?
|
|
||||||
add_custom_target(doc_html
|
|
||||||
COMMAND $<TARGET_FILE:nvim_bin>
|
|
||||||
-V1 -es --clean -c "lua require('scripts.gen_help_html').gen('./build/runtime/doc', './build/doc_html', nil, 'todo_commit_id')" -c "0cq"
|
|
||||||
DEPENDS
|
|
||||||
${GENERATED_HELP_TAGS}
|
|
||||||
WORKING_DIRECTORY "${GENERATED_RUNTIME_DIR}/doc"
|
|
||||||
)
|
|
||||||
|
|
||||||
add_custom_target(
|
add_custom_target(
|
||||||
nvim_runtime
|
nvim_runtime
|
||||||
DEPENDS
|
DEPENDS
|
||||||
|
@ -26,7 +26,7 @@ APP_DIR="$APP.AppDir"
|
|||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
# Build and install nvim into the AppImage
|
# Build and install nvim into the AppImage
|
||||||
make CMAKE_BUILD_TYPE="${NVIM_BUILD_TYPE}"
|
make CMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}"
|
||||||
cmake --install build --prefix="$APP_BUILD_DIR/${APP_DIR}/usr"
|
cmake --install build --prefix="$APP_BUILD_DIR/${APP_DIR}/usr"
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
|
@ -954,9 +954,14 @@ add_custom_target(doc-vim DEPENDS ${VIMDOC_FILES})
|
|||||||
add_custom_target(doc)
|
add_custom_target(doc)
|
||||||
add_dependencies(doc doc-vim doc-eval)
|
add_dependencies(doc doc-vim doc-eval)
|
||||||
|
|
||||||
add_custom_target(lintdoc
|
set(lintdoc_touch ${TOUCHES_DIR}/lintdoc)
|
||||||
|
add_custom_command(
|
||||||
|
OUTPUT ${lintdoc_touch}
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E touch ${lintdoc_touch}
|
||||||
COMMAND ${CMAKE_COMMAND} -E env "VIMRUNTIME=${NVIM_RUNTIME_DIR}"
|
COMMAND ${CMAKE_COMMAND} -E env "VIMRUNTIME=${NVIM_RUNTIME_DIR}"
|
||||||
$<TARGET_FILE:nvim_bin> --clean -l scripts/lintdoc.lua
|
$<TARGET_FILE:nvim_bin> --clean -l scripts/lintdoc.lua
|
||||||
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
|
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
|
||||||
|
DEPENDS ${DOCFILES}
|
||||||
USES_TERMINAL)
|
USES_TERMINAL)
|
||||||
|
add_custom_target(lintdoc DEPENDS ${lintdoc_touch})
|
||||||
add_dependencies(lintdoc nvim)
|
add_dependencies(lintdoc nvim)
|
||||||
|
@ -121,7 +121,8 @@ CLEAN_FILES := *.out \
|
|||||||
.*.swo \
|
.*.swo \
|
||||||
.gdbinit \
|
.gdbinit \
|
||||||
$(TMPDIR) \
|
$(TMPDIR) \
|
||||||
del
|
del \
|
||||||
|
$(ROOT)/runtime/doc/.*.swp
|
||||||
clean:
|
clean:
|
||||||
$(RM) -rf $(CLEAN_FILES)
|
$(RM) -rf $(CLEAN_FILES)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user