diff --git a/.azure-pipelines/azure-pipelines-linux.yml b/.azure-pipelines/azure-pipelines-linux.yml index abcbeb9..875d996 100755 --- a/.azure-pipelines/azure-pipelines-linux.yml +++ b/.azure-pipelines/azure-pipelines-linux.yml @@ -13,6 +13,7 @@ jobs: UPLOAD_PACKAGES: 'True' DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 timeoutInMinutes: 360 + variables: {} steps: # configure qemu binfmt-misc running. This allows us to run docker containers diff --git a/.azure-pipelines/azure-pipelines-osx.yml b/.azure-pipelines/azure-pipelines-osx.yml index f3ff063..7708e23 100755 --- a/.azure-pipelines/azure-pipelines-osx.yml +++ b/.azure-pipelines/azure-pipelines-osx.yml @@ -5,7 +5,7 @@ jobs: - job: osx pool: - vmImage: macOS-11 + vmImage: macOS-12 strategy: matrix: osx_64_: @@ -15,6 +15,7 @@ jobs: CONFIG: osx_arm64_ UPLOAD_PACKAGES: 'True' timeoutInMinutes: 360 + variables: {} steps: # TODO: Fast finish on azure pipelines? diff --git a/.ci_support/linux_64_.yaml b/.ci_support/linux_64_.yaml index 163bd4c..1dd4eae 100644 --- a/.ci_support/linux_64_.yaml +++ b/.ci_support/linux_64_.yaml @@ -2,6 +2,10 @@ c_compiler: - gcc c_compiler_version: - '12' +c_stdlib: +- sysroot +c_stdlib_version: +- '2.12' cdt_name: - cos6 channel_sources: @@ -14,3 +18,6 @@ msgpack_c: - '6' target_platform: - linux-64 +zip_keys: +- - c_stdlib_version + - cdt_name diff --git a/.ci_support/osx_64_.yaml b/.ci_support/osx_64_.yaml index 089a134..59ff498 100644 --- a/.ci_support/osx_64_.yaml +++ b/.ci_support/osx_64_.yaml @@ -1,9 +1,15 @@ MACOSX_DEPLOYMENT_TARGET: -- '10.9' +- '10.13' +MACOSX_SDK_VERSION: +- '10.13' c_compiler: - clang c_compiler_version: - '16' +c_stdlib: +- macosx_deployment_target +c_stdlib_version: +- '10.13' channel_sources: - conda-forge channel_targets: diff --git a/.ci_support/osx_arm64_.yaml b/.ci_support/osx_arm64_.yaml index 39f6db3..0a1028e 100644 --- a/.ci_support/osx_arm64_.yaml +++ b/.ci_support/osx_arm64_.yaml @@ -1,9 +1,15 @@ MACOSX_DEPLOYMENT_TARGET: - '11.0' +MACOSX_SDK_VERSION: +- '11.0' c_compiler: - clang c_compiler_version: - '16' +c_stdlib: +- macosx_deployment_target +c_stdlib_version: +- '11.0' channel_sources: - conda-forge channel_targets: diff --git a/.gitattributes b/.gitattributes index 7f32763..18f114a 100644 --- a/.gitattributes +++ b/.gitattributes @@ -20,8 +20,8 @@ bld.bat text eol=crlf .travis.yml linguist-generated=true .scripts/* linguist-generated=true .woodpecker.yml linguist-generated=true -LICENSE.txt linguist-generated=true -README.md linguist-generated=true +/LICENSE.txt linguist-generated=true +/README.md linguist-generated=true azure-pipelines.yml linguist-generated=true build-locally.py linguist-generated=true shippable.yml linguist-generated=true diff --git a/.gitignore b/.gitignore index c002910..179afe5 100644 --- a/.gitignore +++ b/.gitignore @@ -3,11 +3,22 @@ # Everything else is managed by the conda-smithy rerender process. # Please do not modify +# Ignore all files and folders in root * !/conda-forge.yml -!/*/ +# Don't ignore any files/folders if the parent folder is 'un-ignored' +# This also avoids warnings when adding an already-checked file with an ignored parent. +!/**/ +# Don't ignore any files/folders recursively in the following folders !/recipe/** !/.ci_support/** +# Since we ignore files/folders recursively, any folders inside +# build_artifacts gets ignored which trips some build systems. +# To avoid that we 'un-ignore' all files/folders recursively +# and only ignore the root build_artifacts folder. +!/build_artifacts/** +/build_artifacts + *.pyc diff --git a/.scripts/build_steps.sh b/.scripts/build_steps.sh index eba1dfd..a5836e8 100755 --- a/.scripts/build_steps.sh +++ b/.scripts/build_steps.sh @@ -34,9 +34,9 @@ CONDARC export CONDA_LIBMAMBA_SOLVER_NO_CHANNELS_FROM_INSTALLED=1 mamba install --update-specs --yes --quiet --channel conda-forge --strict-channel-priority \ - pip mamba conda-build boa conda-forge-ci-setup=4 + pip mamba conda-build conda-forge-ci-setup=4 "conda-build>=24.1" mamba update --update-specs --yes --quiet --channel conda-forge --strict-channel-priority \ - pip mamba conda-build boa conda-forge-ci-setup=4 + pip mamba conda-build conda-forge-ci-setup=4 "conda-build>=24.1" # set up the condarc setup_conda_rc "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" @@ -57,12 +57,6 @@ if [[ -f "${FEEDSTOCK_ROOT}/LICENSE.txt" ]]; then cp "${FEEDSTOCK_ROOT}/LICENSE.txt" "${RECIPE_ROOT}/recipe-scripts-license.txt" fi -if [[ "${sha:-}" == "" ]]; then - pushd ${FEEDSTOCK_ROOT} - sha=$(git rev-parse HEAD) - popd -fi - if [[ "${BUILD_WITH_CONDA_DEBUG:-0}" == 1 ]]; then if [[ "x${BUILD_OUTPUT_ID:-}" != "x" ]]; then EXTRA_CB_OPTIONS="${EXTRA_CB_OPTIONS:-} --output-id ${BUILD_OUTPUT_ID}" @@ -74,10 +68,17 @@ if [[ "${BUILD_WITH_CONDA_DEBUG:-0}" == 1 ]]; then # Drop into an interactive shell /bin/bash else - conda mambabuild "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \ + conda-build "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \ --suppress-variables ${EXTRA_CB_OPTIONS:-} \ --clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml" \ --extra-meta flow_run_id="${flow_run_id:-}" remote_url="${remote_url:-}" sha="${sha:-}" + + ( startgroup "Inspecting artifacts" ) 2> /dev/null + + # inspect_artifacts was only added in conda-forge-ci-setup 4.6.0 + command -v inspect_artifacts >/dev/null 2>&1 && inspect_artifacts || echo "inspect_artifacts needs conda-forge-ci-setup >=4.6.0" + + ( endgroup "Inspecting artifacts" ) 2> /dev/null ( startgroup "Validating outputs" ) 2> /dev/null validate_recipe_outputs "${FEEDSTOCK_NAME}" diff --git a/.scripts/run_docker_build.sh b/.scripts/run_docker_build.sh index b70ef01..00f377a 100755 --- a/.scripts/run_docker_build.sh +++ b/.scripts/run_docker_build.sh @@ -21,6 +21,12 @@ if [ -z ${FEEDSTOCK_NAME} ]; then export FEEDSTOCK_NAME=$(basename ${FEEDSTOCK_ROOT}) fi +if [[ "${sha:-}" == "" ]]; then + pushd "${FEEDSTOCK_ROOT}" + sha=$(git rev-parse HEAD) + popd +fi + docker info # In order for the conda-build process in the container to write to the mounted diff --git a/.scripts/run_osx_build.sh b/.scripts/run_osx_build.sh index 9259eb9..ba0c879 100755 --- a/.scripts/run_osx_build.sh +++ b/.scripts/run_osx_build.sh @@ -26,9 +26,9 @@ export CONDA_SOLVER="libmamba" export CONDA_LIBMAMBA_SOLVER_NO_CHANNELS_FROM_INSTALLED=1 mamba install --update-specs --quiet --yes --channel conda-forge --strict-channel-priority \ - pip mamba conda-build boa conda-forge-ci-setup=4 + pip mamba conda-build conda-forge-ci-setup=4 "conda-build>=24.1" mamba update --update-specs --yes --quiet --channel conda-forge --strict-channel-priority \ - pip mamba conda-build boa conda-forge-ci-setup=4 + pip mamba conda-build conda-forge-ci-setup=4 "conda-build>=24.1" @@ -81,10 +81,17 @@ else EXTRA_CB_OPTIONS="${EXTRA_CB_OPTIONS:-} --no-test" fi - conda mambabuild ./recipe -m ./.ci_support/${CONFIG}.yaml \ + conda-build ./recipe -m ./.ci_support/${CONFIG}.yaml \ --suppress-variables ${EXTRA_CB_OPTIONS:-} \ --clobber-file ./.ci_support/clobber_${CONFIG}.yaml \ --extra-meta flow_run_id="$flow_run_id" remote_url="$remote_url" sha="$sha" + + ( startgroup "Inspecting artifacts" ) 2> /dev/null + + # inspect_artifacts was only added in conda-forge-ci-setup 4.6.0 + command -v inspect_artifacts >/dev/null 2>&1 && inspect_artifacts || echo "inspect_artifacts needs conda-forge-ci-setup >=4.6.0" + + ( endgroup "Inspecting artifacts" ) 2> /dev/null ( startgroup "Validating outputs" ) 2> /dev/null validate_recipe_outputs "${FEEDSTOCK_NAME}" diff --git a/build-locally.py b/build-locally.py index 3f4b7a7..e0d408d 100755 --- a/build-locally.py +++ b/build-locally.py @@ -64,8 +64,9 @@ def verify_config(ns): elif ns.config.startswith("osx"): if "OSX_SDK_DIR" not in os.environ: raise RuntimeError( - "Need OSX_SDK_DIR env variable set. Run 'export OSX_SDK_DIR=SDKs' " - "to download the SDK automatically to 'SDKs/MacOSX.sdk'. " + "Need OSX_SDK_DIR env variable set. Run 'export OSX_SDK_DIR=$PWD/SDKs' " + "to download the SDK automatically to '$PWD/SDKs/MacOSX.sdk'. " + "Note: OSX_SDK_DIR must be set to an absolute path. " "Setting this variable implies agreement to the licensing terms of the SDK by Apple." ) diff --git a/recipe/build.sh b/recipe/build.sh index 6ee6e18..d6e890c 100755 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -3,15 +3,48 @@ set -o xtrace -o nounset -o pipefail -o errexit if [[ ${CONDA_BUILD_CROSS_COMPILATION:-0} == 1 ]]; then - sed -i -e "s,\$,${BUILD_PREFIX}/bin/nvim,g" src/nvim/po/CMakeLists.txt test/CMakeLists.txt - sed -i -e "s,\${PROJECT_BINARY_DIR}/bin/nvim,${BUILD_PREFIX}/bin/nvim,g" runtime/CMakeLists.txt + BOOTSTRAP_CMAKE_ARGS=${CMAKE_ARGS//${PREFIX}/${BUILD_PREFIX}} + BOOTSTRAP_CMAKE_ARGS=${BOOTSTRAP_CMAKE_ARGS//${CONDA_TOOLCHAIN_HOST}/${CONDA_TOOLCHAIN_BUILD}} + + CROSS_LDFLAGS=${LDFLAGS} + CROSS_CC="${CC}" + CROSS_LD="${LD}" + + LDFLAGS=${LDFLAGS//${PREFIX}/${BUILD_PREFIX}} + CC=${CC//${CONDA_TOOLCHAIN_HOST}/${CONDA_TOOLCHAIN_BUILD}} + LD="${LD//${CONDA_TOOLCHAIN_HOST}/${CONDA_TOOLCHAIN_BUILD}}" + + cmake -S . -B build_host \ + -DCMAKE_BUILD_TYPE=Release \ + -DUSE_BUNDLED=OFF \ + -DICONV_LIBRARY="${BUILD_PREFIX}/lib/libiconv${SHLIB_EXT}" \ + -DLIBINTL_LIBRARY="${BUILD_PREFIX}/lib/libintl${SHLIB_EXT}" \ + -DLIBUV_LIBRARY="${BUILD_PREFIX}/lib/libuv${SHLIB_EXT}" \ + -DLIBVTERM_LIBRARY="${BUILD_PREFIX}/lib/libvterm${SHLIB_EXT}" \ + -DLPEG_LIBRARY="${BUILD_PREFIX}/lib/liblpeg${SHLIB_EXT}" \ + -DLUAJIT_LIBRARY="${BUILD_PREFIX}/lib/libluajit-5.1${SHLIB_EXT}" \ + -DLUV_LIBRARY="${BUILD_PREFIX}/lib/libluv${SHLIB_EXT}" \ + -DMSGPACK_LIBRARY="${BUILD_PREFIX}/lib/libmsgpack-c${SHLIB_EXT}" \ + -DTREESITTER_LIBRARY="${BUILD_PREFIX}/lib/libtree-sitter${SHLIB_EXT}" \ + -DUNIBILIUM_LIBRARY="${BUILD_PREFIX}/lib/libunibilium${SHLIB_EXT}" \ + ${BOOTSTRAP_CMAKE_ARGS} + cmake --build build_host + cmake --install build_host + + LDFLAGS="${CROSS_LDFLAGS}" + CC=${CROSS_CC} + LD=${CROSS_LD} + + export LUA_CPATH="${SRC_DIR}/build_host/lib/libnlua0.so" + + sed -i -e "s,\$,${BUILD_PREFIX}/bin/nvim,g" src/nvim/po/CMakeLists.txt test/CMakeLists.txt runtime/CMakeLists.txt fi cmake -S . -B build \ -DCMAKE_BUILD_TYPE=Release \ -DUSE_BUNDLED=OFF \ - -DLIBLUV_LIBRARY="${PREFIX}/lib/libluv${SHLIB_EXT}" \ -DLIBUV_LIBRARY="${PREFIX}/lib/libuv${SHLIB_EXT}" \ + -DLPEG_LIBRARY="${PREFIX}/lib/liblpeg${SHLIB_EXT}" \ ${CMAKE_ARGS} cmake --build build cmake --install build diff --git a/recipe/meta.yaml b/recipe/meta.yaml index fc956b1..636ee5f 100755 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,5 +1,5 @@ {% set name = "nvim" %} -{% set version = "0.9.5" %} +{% set version = "0.10.0" %} package: name: {{ name|lower }} @@ -7,7 +7,7 @@ package: source: url: https://github.com/neovim/neovim/archive/v{{ version }}.tar.gz - sha256: fe74369fc30a32ec7a086b1013acd0eacd674e7570eb1acc520a66180c9e9719 + sha256: 372ea2584b0ea2a5a765844d95206bda9e4a57eaa1a2412a9a0726bab750f828 build: number: 0 @@ -16,38 +16,46 @@ build: requirements: build: - {{ compiler('c') }} + - {{ stdlib("c") }} - cmake - - libmpack-lua - - lua-lpeg - - luajit-openresty - make - - nvim # [build_platform != target_platform] - pkg-config + - gettext # [build_platform != target_platform] + - libiconv # [osx] + - libmpack-lua # [build_platform != target_platform] + - libtree-sitter # [build_platform != target_platform] + - libuv # [build_platform != target_platform] + - libvterm # [build_platform != target_platform] + - lua-lpeg # [build_platform != target_platform] + - luajit-openresty # [build_platform != target_platform] + - luv # [build_platform != target_platform] + - msgpack-c # [build_platform != target_platform] + - unibilium # [build_platform != target_platform] host: - gettext - libiconv # [osx] - libmpack-lua - libtermkey + - libtree-sitter - libuv - libvterm - lua-lpeg - luajit-openresty - luv - msgpack-c - - libtree-sitter - unibilium run: - gettext - libiconv # [osx] - libmpack-lua - libtermkey + - libtree-sitter - libuv - libvterm - lua-lpeg - luajit-openresty - luv - msgpack-c - - libtree-sitter - unibilium test: