From 36e3a8c00c8d0c72775eab0bb7b107b6a351ecc4 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Fri, 26 Jun 2020 20:25:56 +0200 Subject: [PATCH 1/3] add upstream patch to fix issue with xerbla_array --- recipe/meta.yaml | 3 + recipe/patches/xerbla.patch | 154 ++++++++++++++++++++++++++++++++++++ 2 files changed, 157 insertions(+) create mode 100644 recipe/patches/xerbla.patch diff --git a/recipe/meta.yaml b/recipe/meta.yaml index df13ab1..fe99459 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -8,6 +8,9 @@ package: source: url: https://github.com/flame/blis/archive/{{ version }}.tar.gz sha256: 7e345d666799e15bba570bd125f97042f17bf752a61dcf314486a6cd096d5f68 + patches: + # upstreamed already (commit 787adad73b); can be dropped on next release + - patches/xerbla.patch build: number: 0 diff --git a/recipe/patches/xerbla.patch b/recipe/patches/xerbla.patch new file mode 100644 index 0000000..7a39a37 --- /dev/null +++ b/recipe/patches/xerbla.patch @@ -0,0 +1,154 @@ +From 787adad73bd5eb65c12c39d732723a1ac0448748 Mon Sep 17 00:00:00 2001 +From: "Field G. Van Zee" +Date: Fri, 8 May 2020 16:18:20 -0500 +Subject: [PATCH] Defined netlib equivalent of xerbla_array(). + +Details: +- Added a function definition for xerbla_array_(), which largely mirrors + its netlib implementation. Thanks to Isuru Fernando for suggesting the + addition of this function. +--- + frame/compat/bli_blas.h | 1 + + frame/compat/f2c/bla_xerbla_array.c | 74 +++++++++++++++++++++++++++++ + frame/compat/f2c/bla_xerbla_array.h | 39 +++++++++++++++ + 3 files changed, 114 insertions(+) + create mode 100644 frame/compat/f2c/bla_xerbla_array.c + create mode 100644 frame/compat/f2c/bla_xerbla_array.h + +diff --git a/frame/compat/bli_blas.h b/frame/compat/bli_blas.h +index e1a7321a4..24015074b 100644 +--- a/frame/compat/bli_blas.h ++++ b/frame/compat/bli_blas.h +@@ -99,6 +99,7 @@ + + #include "bla_lsame.h" + #include "bla_xerbla.h" ++#include "bla_xerbla_array.h" + + + // -- Level-0 BLAS prototypes -- +diff --git a/frame/compat/f2c/bla_xerbla_array.c b/frame/compat/f2c/bla_xerbla_array.c +new file mode 100644 +index 000000000..722bb2914 +--- /dev/null ++++ b/frame/compat/f2c/bla_xerbla_array.c +@@ -0,0 +1,74 @@ ++/* ++ ++ BLIS ++ An object-based framework for developing high-performance BLAS-like ++ libraries. ++ ++ Copyright (C) 2014, The University of Texas at Austin ++ ++ Redistribution and use in source and binary forms, with or without ++ modification, are permitted provided that the following conditions are ++ met: ++ - Redistributions of source code must retain the above copyright ++ notice, this list of conditions and the following disclaimer. ++ - Redistributions in binary form must reproduce the above copyright ++ notice, this list of conditions and the following disclaimer in the ++ documentation and/or other materials provided with the distribution. ++ - Neither the name(s) of the copyright holder(s) nor the names of its ++ contributors may be used to endorse or promote products derived ++ from this software without specific prior written permission. ++ ++ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ++ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ++ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ++ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT ++ HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ++ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ++ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ++ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ++ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ++ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ++ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ ++*/ ++ ++#include "blis.h" ++ ++#ifdef BLIS_ENABLE_BLAS ++ ++#define MAX_NUM_CHARS 32 ++ ++int PASTEF770(xerbla_array)(const bla_character *srname_array, const bla_integer srname_len, const bla_integer *info) ++{ ++ int i; ++#if 1 ++ // 01234567890123456789012345678901 ++ char srname[ MAX_NUM_CHARS + 1 ] = " "; ++#else ++ char srname[ MAX_NUM_CHARS + 1 ]; ++ ++ // Initialize srname to contain blank characters. ++ for ( i = 0; i < MAX_NUM_CHARS; ++i ) srname[i] = ' '; ++#endif ++ ++ // Compute the number of chars to copy as the minimum of the length of ++ // srname_array and MAX_NUM_CHARS. ++ const int n_copy = bli_min( srname_len, MAX_NUM_CHARS ); ++ ++ // Copy over each element of srname_array. ++ for ( i = 0; i < n_copy; ++i ) ++ { ++ srname[i] = srname_array[i]; ++ } ++ ++ // NULL terminate. ++ srname[i] = '\0'; ++ ++ // Call xerbla_(). ++ PASTEF770(xerbla)( srname, info, ( ftnlen )srname_len ); ++ ++ return 0; ++} ++ ++#endif ++ +diff --git a/frame/compat/f2c/bla_xerbla_array.h b/frame/compat/f2c/bla_xerbla_array.h +new file mode 100644 +index 000000000..6a4b4e059 +--- /dev/null ++++ b/frame/compat/f2c/bla_xerbla_array.h +@@ -0,0 +1,39 @@ ++/* ++ ++ BLIS ++ An object-based framework for developing high-performance BLAS-like ++ libraries. ++ ++ Copyright (C) 2014, The University of Texas at Austin ++ ++ Redistribution and use in source and binary forms, with or without ++ modification, are permitted provided that the following conditions are ++ met: ++ - Redistributions of source code must retain the above copyright ++ notice, this list of conditions and the following disclaimer. ++ - Redistributions in binary form must reproduce the above copyright ++ notice, this list of conditions and the following disclaimer in the ++ documentation and/or other materials provided with the distribution. ++ - Neither the name(s) of the copyright holder(s) nor the names of its ++ contributors may be used to endorse or promote products derived ++ from this software without specific prior written permission. ++ ++ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ++ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ++ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ++ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT ++ HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ++ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ++ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ++ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ++ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ++ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ++ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ ++*/ ++ ++#ifdef BLIS_ENABLE_BLAS ++ ++BLIS_EXPORT_BLAS int PASTEF770(xerbla_array)(const bla_character *srname, const bla_integer srname_len, const bla_integer *info); ++ ++#endif From 781cbad14c7d393737e5fa218726cc08414f26ad Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Fri, 26 Jun 2020 20:26:15 +0200 Subject: [PATCH 2/3] clean up outdated patches --- recipe/305.patch | 121 ----------------------------------------------- recipe/306.patch | 69 --------------------------- 2 files changed, 190 deletions(-) delete mode 100644 recipe/305.patch delete mode 100644 recipe/306.patch diff --git a/recipe/305.patch b/recipe/305.patch deleted file mode 100644 index ced41a2..0000000 --- a/recipe/305.patch +++ /dev/null @@ -1,121 +0,0 @@ -From 3e428b624dd7b50e060bd5ee2198e4c48ca5227e Mon Sep 17 00:00:00 2001 -From: Isuru Fernando -Date: Sun, 24 Mar 2019 18:29:14 -0500 -Subject: [PATCH] Fix clang version detection - -clang -dumpversion gives 4.2.1 for all clang versions as clang was -originally compatible with gcc 4.2.1 - -Apple clang version and clang version are two different things -and the real clang version cannot be deduced from apple clang version -programatically. Rely on wikipedia to map apple clang to clang version - -Also fixes assembly detection with clang - -clang 3.8 can't build knl as it doesn't recognize zmm0 ---- - configure | 56 ++++++++++++++++++++++++++++++++++--------------------- - 1 file changed, 35 insertions(+), 21 deletions(-) - -diff --git a/configure b/configure -index d8a1ccb9..7c76427d 100755 ---- a/configure -+++ b/configure -@@ -1311,8 +1311,7 @@ get_compiler_version() - # to OS X's egrep only returning the first match. - cc_vendor=$(echo "${vendor_string}" | egrep -o 'icc|gcc|clang|emcc|pnacl|IBM' | { read first rest ; echo $first ; }) - if [ "${cc_vendor}" = "icc" -o \ -- "${cc_vendor}" = "gcc" -o \ -- "${cc_vendor}" = "clang" ]; then -+ "${cc_vendor}" = "gcc" ]; then - cc_version=$(${cc} -dumpversion) - else - cc_version=$(echo "${vendor_string}" | egrep -o '[0-9]+\.[0-9]+\.?[0-9]*' | { read first rest ; echo ${first} ; }) -@@ -1360,7 +1359,7 @@ check_compiler() - # Specific: - # - # skx: icc 15.0.1+, gcc 6.0+, clang 3.9+ -- # knl: icc 14.0.1+, gcc 5.0+, clang 3.5+ -+ # knl: icc 14.0.1+, gcc 5.0+, clang 3.9+ - # haswell: any - # sandybridge: any - # penryn: any -@@ -1435,27 +1434,42 @@ check_compiler() - - # clang - if [ "x${cc_vendor}" = "xclang" ]; then -- -- if [ ${cc_major} -lt 3 ]; then -- echoerr_unsupportedcc -- fi -- if [ ${cc_major} -eq 3 ]; then -- if [ ${cc_minor} -lt 3 ]; then -+ if [ "$(echo ${vendor_string} | grep -o Apple)" = "Apple" ]; then -+ if [ ${cc_major} -lt 5 ]; then - echoerr_unsupportedcc - fi -- if [ ${cc_minor} -lt 5 ]; then -+ # See https://en.wikipedia.org/wiki/Xcode#Toolchain_versions -+ if [ ${cc_major} -eq 5 ]; then -+ # Apple clang 5.0 is clang 3.4svn - blacklistcc_add "excavator" - blacklistcc_add "zen" -- blacklistcc_add "knl" - fi -- if [ ${cc_minor} -lt 9 ]; then -+ if [ ${cc_major} -lt 7 ]; then -+ blacklistcc_add "knl" - blacklistcc_add "skx" - fi -- fi -- if [ ${cc_major} -lt 4 ]; then -- # See comment above regarding zen support. -- #blacklistcc_add "zen" -- : # explicit no-op since bash can't handle empty loop bodies. -+ else -+ if [ ${cc_major} -lt 3 ]; then -+ echoerr_unsupportedcc -+ fi -+ if [ ${cc_major} -eq 3 ]; then -+ if [ ${cc_minor} -lt 3 ]; then -+ echoerr_unsupportedcc -+ fi -+ if [ ${cc_minor} -lt 5 ]; then -+ blacklistcc_add "excavator" -+ blacklistcc_add "zen" -+ fi -+ if [ ${cc_minor} -lt 9 ]; then -+ blacklistcc_add "knl" -+ blacklistcc_add "skx" -+ fi -+ fi -+ if [ ${cc_major} -lt 4 ]; then -+ # See comment above regarding zen support. -+ #blacklistcc_add "zen" -+ : # explicit no-op since bash can't handle empty loop bodies. -+ fi - fi - fi - } -@@ -1513,8 +1527,8 @@ check_assembler() - # - - # The assembler on OS X won't recognize AVX-512 without help. -- if [ "$(uname -s)" == "Darwin" ]; then -- cflags="-Wa,-march=knl" -+ if [ "${cc_vendor}" == "clang" ]; then -+ cflags="-march=knl" - fi - - asm_fp=$(find ${asm_dir} -name "avx512f.s") -@@ -1530,8 +1544,8 @@ check_assembler() - # - - # The assembler on OS X won't recognize AVX-512 without help. -- if [ "$(uname -s)" == "Darwin" ]; then -- cflags="-Wa,-march=skylake-avx512" -+ if [ "${cc_vendor}" == "clang" ]; then -+ cflags="-march=skylake-avx512" - fi - - asm_fp=$(find ${asm_dir} -name "avx512dq.s") diff --git a/recipe/306.patch b/recipe/306.patch deleted file mode 100644 index 4961f11..0000000 --- a/recipe/306.patch +++ /dev/null @@ -1,69 +0,0 @@ -From f7676ce12d6ebe8ba8787bb0e0ec48914848e8b1 Mon Sep 17 00:00:00 2001 -From: Isuru Fernando -Date: Mon, 25 Mar 2019 13:34:36 -0500 -Subject: [PATCH] Test with shared on windows - -Export macros can't support both shared and static at the same time. -When blis is built with both shared and static, headers assume that -shared is used at link time and dllimports the symbols with __imp_ -prefix. - -To use the headers with static libraries a user can give --DBLIS_EXPORT= to import the symbol without the __imp_ prefix ---- - common.mk | 5 +++++ - frame/include/bli_config_macro_defs.h | 20 +++++++++++--------- - 2 files changed, 16 insertions(+), 9 deletions(-) - -diff --git a/common.mk b/common.mk -index ef0acfb5..5513098a 100644 ---- a/common.mk -+++ b/common.mk -@@ -530,6 +530,11 @@ ifeq ($(IS_WIN),no) - LDFLAGS += -Wl,-rpath,$(BASE_LIB_PATH) - endif - endif -+# On windows, use the shared library even if static is created. -+ifeq ($(IS_WIN),yes) -+LIBBLIS_L := $(LIBBLIS_SO) -+LIBBLIS_LINK := $(LIBBLIS_SO_PATH) -+endif - endif - - -diff --git a/frame/include/bli_config_macro_defs.h b/frame/include/bli_config_macro_defs.h -index 3be54e1f..af7079da 100644 ---- a/frame/include/bli_config_macro_defs.h -+++ b/frame/include/bli_config_macro_defs.h -@@ -190,20 +190,22 @@ - // with that setting overridden only for function prototypes or variable - // declarations that are annotated with BLIS_EXPORT_BLIS. - --#if !defined(BLIS_ENABLE_SHARED) -+#ifndef BLIS_EXPORT -+ #if !defined(BLIS_ENABLE_SHARED) - #define BLIS_EXPORT --#else -+ #else - #if defined(_WIN32) || defined(__CYGWIN__) -- #ifdef BLIS_IS_BUILDING_LIBRARY -- #define BLIS_EXPORT __declspec(dllexport) -- #else -- #define BLIS_EXPORT __declspec(dllimport) -- #endif -+ #ifdef BLIS_IS_BUILDING_LIBRARY -+ #define BLIS_EXPORT __declspec(dllexport) -+ #else -+ #define BLIS_EXPORT __declspec(dllimport) -+ #endif - #elif defined(__GNUC__) && __GNUC__ >= 4 -- #define BLIS_EXPORT __attribute__ ((visibility ("default"))) -+ #define BLIS_EXPORT __attribute__ ((visibility ("default"))) - #else -- #define BLIS_EXPORT -+ #define BLIS_EXPORT - #endif -+ #endif - #endif - - #define BLIS_EXPORT_BLIS BLIS_EXPORT From d4aeb2886120dce7cfb23af5a2f9438b2f8e579c Mon Sep 17 00:00:00 2001 From: conda-forge-linter Date: Fri, 26 Jun 2020 18:29:50 +0000 Subject: [PATCH 3/3] MNT: Re-rendered with conda-build 3.19.2, conda-smithy 3.7.3, and conda-forge-pinning 2020.06.24.16.31.11 --- .azure-pipelines/azure-pipelines-linux.yml | 11 ++-- .azure-pipelines/azure-pipelines-osx.yml | 64 +++------------------- .azure-pipelines/azure-pipelines-win.yml | 40 ++++++++------ .ci_support/win_target_platformwin-64.yaml | 4 +- .gitattributes | 2 +- .scripts/build_steps.sh | 5 +- .scripts/run_docker_build.sh | 8 ++- .scripts/run_osx_build.sh | 56 +++++++++++++++++++ 8 files changed, 105 insertions(+), 85 deletions(-) create mode 100755 .scripts/run_osx_build.sh diff --git a/.azure-pipelines/azure-pipelines-linux.yml b/.azure-pipelines/azure-pipelines-linux.yml index 7bf1881..0bd6641 100755 --- a/.azure-pipelines/azure-pipelines-linux.yml +++ b/.azure-pipelines/azure-pipelines-linux.yml @@ -6,14 +6,15 @@ jobs: - job: linux pool: vmImage: ubuntu-16.04 - timeoutInMinutes: 360 strategy: - maxParallel: 8 matrix: linux_target_platformlinux-64: CONFIG: linux_target_platformlinux-64 - UPLOAD_PACKAGES: True + UPLOAD_PACKAGES: 'True' DOCKER_IMAGE: condaforge/linux-anvil-comp7 + maxParallel: 8 + timeoutInMinutes: 360 + steps: # configure qemu binfmt-misc running. This allows us to run docker containers # embedded qemu-static @@ -29,4 +30,6 @@ jobs: .scripts/run_docker_build.sh displayName: Run docker build env: - BINSTAR_TOKEN: $(BINSTAR_TOKEN) \ No newline at end of file + BINSTAR_TOKEN: $(BINSTAR_TOKEN) + FEEDSTOCK_TOKEN: $(FEEDSTOCK_TOKEN) + STAGING_BINSTAR_TOKEN: $(STAGING_BINSTAR_TOKEN) \ No newline at end of file diff --git a/.azure-pipelines/azure-pipelines-osx.yml b/.azure-pipelines/azure-pipelines-osx.yml index 8281aa4..4ba65b7 100755 --- a/.azure-pipelines/azure-pipelines-osx.yml +++ b/.azure-pipelines/azure-pipelines-osx.yml @@ -6,71 +6,23 @@ jobs: - job: osx pool: vmImage: macOS-10.14 - timeoutInMinutes: 360 strategy: - maxParallel: 8 matrix: osx_target_platformosx-64: CONFIG: osx_target_platformosx-64 - UPLOAD_PACKAGES: True + UPLOAD_PACKAGES: 'True' + maxParallel: 8 + timeoutInMinutes: 360 steps: # TODO: Fast finish on azure pipelines? - script: | - echo "Fast Finish" - - - - script: | - echo "Removing homebrew from Azure to avoid conflicts." - curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall > ~/uninstall_homebrew - chmod +x ~/uninstall_homebrew - ~/uninstall_homebrew -fq - rm ~/uninstall_homebrew - displayName: Remove homebrew - - - bash: | - echo "##vso[task.prependpath]$CONDA/bin" - sudo chown -R $USER $CONDA - displayName: Add conda to PATH - - - script: | - source activate base - conda install -n base -c conda-forge --quiet --yes conda-forge-ci-setup=2 conda-build - displayName: 'Add conda-forge-ci-setup=2' - - - script: | - source activate base - echo "Configuring conda." - - setup_conda_rc ./ "./recipe" ./.ci_support/${CONFIG}.yaml export CI=azure - source run_conda_forge_build_setup - conda update --yes --quiet --override-channels -c conda-forge -c defaults --all - env: { - OSX_FORCE_SDK_DOWNLOAD: "1" - } - displayName: Configure conda and conda-build - - - script: | - source activate base - mangle_compiler ./ "./recipe" ./.ci_support/${CONFIG}.yaml - displayName: Mangle compiler - - - script: | - source activate base - make_build_number ./ "./recipe" ./.ci_support/${CONFIG}.yaml - displayName: Generate build number clobber file - - - script: | - source activate base - conda build "./recipe" -m ./.ci_support/${CONFIG}.yaml --clobber-file ./.ci_support/clobber_${CONFIG}.yaml - displayName: Build recipe - - - script: | - source activate base + export OSX_FORCE_SDK_DOWNLOAD="1" export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME - upload_package ./ "./recipe" ./.ci_support/${CONFIG}.yaml - displayName: Upload package + ./.scripts/run_osx_build.sh + displayName: Run OSX build env: BINSTAR_TOKEN: $(BINSTAR_TOKEN) - condition: and(succeeded(), not(eq(variables['UPLOAD_PACKAGES'], 'False'))) \ No newline at end of file + FEEDSTOCK_TOKEN: $(FEEDSTOCK_TOKEN) + STAGING_BINSTAR_TOKEN: $(STAGING_BINSTAR_TOKEN) \ No newline at end of file diff --git a/.azure-pipelines/azure-pipelines-win.yml b/.azure-pipelines/azure-pipelines-win.yml index f53dc72..b8e58fe 100755 --- a/.azure-pipelines/azure-pipelines-win.yml +++ b/.azure-pipelines/azure-pipelines-win.yml @@ -6,20 +6,17 @@ jobs: - job: win pool: vmImage: vs2017-win2016 - timeoutInMinutes: 360 strategy: - maxParallel: 4 matrix: win_target_platformwin-64: CONFIG: win_target_platformwin-64 - CONDA_BLD_PATH: D:\\bld\\ - UPLOAD_PACKAGES: True - steps: - # TODO: Fast finish on azure pipelines? - - script: | - ECHO ON - + UPLOAD_PACKAGES: 'True' + maxParallel: 4 + timeoutInMinutes: 360 + variables: + CONDA_BLD_PATH: D:\\bld\\ + steps: - script: | choco install vcpython27 -fdv -y --debug condition: contains(variables['CONFIG'], 'vs2008') @@ -56,30 +53,31 @@ jobs: - task: CondaEnvironment@1 inputs: - packageSpecs: 'python=3.6 conda-build conda conda-forge::conda-forge-ci-setup=2' # Optional + packageSpecs: 'python=3.6 conda-build conda conda-forge::conda-forge-ci-setup=3 pip' # Optional installOptions: "-c conda-forge" updateConda: true displayName: Install conda-build and activate environment - script: set PYTHONUNBUFFERED=1 + displayName: Set PYTHONUNBUFFERED # Configure the VM - - script: setup_conda_rc .\ ".\recipe" .\.ci_support\%CONFIG%.yaml + - script: | + call activate base + setup_conda_rc .\ ".\recipe" .\.ci_support\%CONFIG%.yaml + displayName: conda-forge CI setup # Configure the VM. - script: | set "CI=azure" + call activate base run_conda_forge_build_setup displayName: conda-forge build setup - - script: | - rmdir C:\strawberry /s /q - continueOnError: true - displayName: remove strawberryperl - # Special cased version setting some more things! - script: | + call activate base conda.exe build "recipe" -m .ci_support\%CONFIG%.yaml displayName: Build recipe (vs2008) env: @@ -88,16 +86,24 @@ jobs: condition: contains(variables['CONFIG'], 'vs2008') - script: | + call activate base conda.exe build "recipe" -m .ci_support\%CONFIG%.yaml displayName: Build recipe env: PYTHONUNBUFFERED: 1 condition: not(contains(variables['CONFIG'], 'vs2008')) + - script: | + call activate base + validate_recipe_outputs "blis-feedstock" + displayName: Validate Recipe Outputs - script: | set "GIT_BRANCH=%BUILD_SOURCEBRANCHNAME%" - upload_package .\ ".\recipe" .ci_support\%CONFIG%.yaml + call activate base + upload_package --validate --feedstock-name="blis-feedstock" .\ ".\recipe" .ci_support\%CONFIG%.yaml displayName: Upload package env: BINSTAR_TOKEN: $(BINSTAR_TOKEN) + FEEDSTOCK_TOKEN: $(FEEDSTOCK_TOKEN) + STAGING_BINSTAR_TOKEN: $(STAGING_BINSTAR_TOKEN) condition: and(succeeded(), not(eq(variables['UPLOAD_PACKAGES'], 'False'))) \ No newline at end of file diff --git a/.ci_support/win_target_platformwin-64.yaml b/.ci_support/win_target_platformwin-64.yaml index af7364b..7348312 100644 --- a/.ci_support/win_target_platformwin-64.yaml +++ b/.ci_support/win_target_platformwin-64.yaml @@ -1,5 +1,5 @@ c_compiler: -- vs2015 +- vs2017 channel_sources: - conda-forge,defaults channel_targets: @@ -9,8 +9,6 @@ perl: pin_run_as_build: perl: max_pin: x.x.x - vc: - max_pin: x target_platform: - win-64 vc: diff --git a/.gitattributes b/.gitattributes index ac943c1..9060b27 100644 --- a/.gitattributes +++ b/.gitattributes @@ -17,7 +17,7 @@ bld.bat text eol=crlf .gitattributes linguist-generated=true .gitignore linguist-generated=true .travis.yml linguist-generated=true -.scripts linguist-generated=true +.scripts/* linguist-generated=true LICENSE.txt linguist-generated=true README.md linguist-generated=true azure-pipelines.yml linguist-generated=true diff --git a/.scripts/build_steps.sh b/.scripts/build_steps.sh index 8a4af44..e8d145b 100755 --- a/.scripts/build_steps.sh +++ b/.scripts/build_steps.sh @@ -19,7 +19,7 @@ conda-build: CONDARC -conda install --yes --quiet conda-forge-ci-setup=2 conda-build -c conda-forge +conda install --yes --quiet conda-forge-ci-setup=3 conda-build pip -c conda-forge # set up the condarc setup_conda_rc "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" @@ -31,9 +31,10 @@ make_build_number "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" conda build "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \ --clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml" +validate_recipe_outputs "blis-feedstock" if [[ "${UPLOAD_PACKAGES}" != "False" ]]; then - upload_package "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" + upload_package --validate --feedstock-name="blis-feedstock" "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" fi touch "${FEEDSTOCK_ROOT}/build_artifacts/conda-forge-build-done-${CONFIG}" \ No newline at end of file diff --git a/.scripts/run_docker_build.sh b/.scripts/run_docker_build.sh index 066a857..360fc69 100755 --- a/.scripts/run_docker_build.sh +++ b/.scripts/run_docker_build.sh @@ -52,13 +52,15 @@ mkdir -p "$ARTIFACTS" DONE_CANARY="$ARTIFACTS/conda-forge-build-done-${CONFIG}" rm -f "$DONE_CANARY" +# Allow people to specify extra default arguments to `docker run` (e.g. `--rm`) +DOCKER_RUN_ARGS="${CONDA_FORGE_DOCKER_RUN_ARGS}" if [ -z "${CI}" ]; then - DOCKER_RUN_ARGS="-it " + DOCKER_RUN_ARGS="-it ${DOCKER_RUN_ARGS}" fi export UPLOAD_PACKAGES="${UPLOAD_PACKAGES:-True}" docker run ${DOCKER_RUN_ARGS} \ - -v "${RECIPE_ROOT}":/home/conda/recipe_root:ro,z \ + -v "${RECIPE_ROOT}":/home/conda/recipe_root:rw,z \ -v "${FEEDSTOCK_ROOT}":/home/conda/feedstock_root:rw,z \ -e CONFIG \ -e BINSTAR_TOKEN \ @@ -67,6 +69,8 @@ docker run ${DOCKER_RUN_ARGS} \ -e GIT_BRANCH \ -e UPLOAD_ON_BRANCH \ -e CI \ + -e FEEDSTOCK_TOKEN \ + -e STAGING_BINSTAR_TOKEN \ $DOCKER_IMAGE \ bash \ /home/conda/feedstock_root/${PROVIDER_DIR}/build_steps.sh diff --git a/.scripts/run_osx_build.sh b/.scripts/run_osx_build.sh new file mode 100755 index 0000000..d0dd652 --- /dev/null +++ b/.scripts/run_osx_build.sh @@ -0,0 +1,56 @@ +#!/usr/bin/env bash + +set -x + +echo -e "\n\nInstalling a fresh version of Miniforge." +if [[ ${CI} == "travis" ]]; then + echo -en 'travis_fold:start:install_miniforge\\r' +fi +MINIFORGE_URL="https://github.com/conda-forge/miniforge/releases/latest/download" +MINIFORGE_FILE="Miniforge3-MacOSX-x86_64.sh" +curl -L -O "${MINIFORGE_URL}/${MINIFORGE_FILE}" +bash $MINIFORGE_FILE -b +if [[ ${CI} == "travis" ]]; then + echo -en 'travis_fold:end:install_miniforge\\r' +fi + +echo -e "\n\nConfiguring conda." +if [[ ${CI} == "travis" ]]; then + echo -en 'travis_fold:start:configure_conda\\r' +fi + +source ${HOME}/miniforge3/etc/profile.d/conda.sh +conda activate base + +echo -e "\n\nInstalling conda-forge-ci-setup=3 and conda-build." +conda install -n base --quiet --yes conda-forge-ci-setup=3 conda-build pip + + + +echo -e "\n\nSetting up the condarc and mangling the compiler." +setup_conda_rc ./ ./recipe ./.ci_support/${CONFIG}.yaml +mangle_compiler ./ ./recipe .ci_support/${CONFIG}.yaml + +echo -e "\n\nMangling homebrew in the CI to avoid conflicts." +/usr/bin/sudo mangle_homebrew +/usr/bin/sudo -k + +echo -e "\n\nRunning the build setup script." +source run_conda_forge_build_setup + + +if [[ ${CI} == "travis" ]]; then + echo -en 'travis_fold:end:configure_conda\\r' +fi + +set -e + +echo -e "\n\nMaking the build clobber file and running the build." +make_build_number ./ ./recipe ./.ci_support/${CONFIG}.yaml +conda build ./recipe -m ./.ci_support/${CONFIG}.yaml --clobber-file ./.ci_support/clobber_${CONFIG}.yaml +validate_recipe_outputs "blis-feedstock" + +if [[ "${UPLOAD_PACKAGES}" != "False" ]]; then + echo -e "\n\nUploading the packages." + upload_package --validate --feedstock-name="blis-feedstock" ./ ./recipe ./.ci_support/${CONFIG}.yaml +fi \ No newline at end of file