From 71cf6676b42dc514235baba7db46fe85cacb9f46 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Sun, 18 Aug 2024 14:10:35 +1100 Subject: [PATCH 1/5] read pipe in lapack_testing.py as binary --- recipe/meta.yaml | 2 + ...AS-and-LAPACKE-in-addition-to-LAPACK.patch | 2 +- .../0002-remove-extraneous-semicolon.patch | 2 +- recipe/patches/0003-read-pipe-as-binary.patch | 56 +++++++++++++++++++ 4 files changed, 60 insertions(+), 2 deletions(-) create mode 100644 recipe/patches/0003-read-pipe-as-binary.patch diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 4eeddfa..c790643 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -23,6 +23,8 @@ source: # backport https://github.com/Reference-LAPACK/lapack/pull/391 # to fix https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114304 - patches/0002-remove-extraneous-semicolon.patch + # avoid corruption of characters through implicit decode + - patches/0003-read-pipe-as-binary.patch - url: https://github.com/isuruf/vecLibFort/archive/99af8640e98c829b41c3235e3706760cd5696fe4.tar.gz sha256: 80de7c6e83d1d84d016b4cb299f2c15f5a82b9d36865dd5c16bf221fe9a303ad diff --git a/recipe/patches/0001-Test-BLAS-and-LAPACKE-in-addition-to-LAPACK.patch b/recipe/patches/0001-Test-BLAS-and-LAPACKE-in-addition-to-LAPACK.patch index 9b50eb2..25c36da 100644 --- a/recipe/patches/0001-Test-BLAS-and-LAPACKE-in-addition-to-LAPACK.patch +++ b/recipe/patches/0001-Test-BLAS-and-LAPACKE-in-addition-to-LAPACK.patch @@ -1,7 +1,7 @@ From 48c2ace8dcd69883470c67562d0e0b36ee1ddd90 Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Mon, 7 Jan 2019 00:23:59 -0600 -Subject: [PATCH 1/2] Test BLAS and LAPACKE in addition to LAPACK +Subject: [PATCH 1/3] Test BLAS and LAPACKE in addition to LAPACK --- CMakeLists.txt | 2 ++ diff --git a/recipe/patches/0002-remove-extraneous-semicolon.patch b/recipe/patches/0002-remove-extraneous-semicolon.patch index 219e20b..48e2dd5 100644 --- a/recipe/patches/0002-remove-extraneous-semicolon.patch +++ b/recipe/patches/0002-remove-extraneous-semicolon.patch @@ -1,7 +1,7 @@ From 024de713931ec886eacf032e64dd205b79588ad7 Mon Sep 17 00:00:00 2001 From: Iain Hibbert Date: Sun, 23 Feb 2020 21:39:25 +0000 -Subject: [PATCH 2/2] remove extraneous semicolon +Subject: [PATCH 2/3] remove extraneous semicolon this semicolon causes a test to fail with read error, using g95 --- diff --git a/recipe/patches/0003-read-pipe-as-binary.patch b/recipe/patches/0003-read-pipe-as-binary.patch new file mode 100644 index 0000000..2469c4f --- /dev/null +++ b/recipe/patches/0003-read-pipe-as-binary.patch @@ -0,0 +1,56 @@ +From abcff0c3b75bfb2d78749cf68f61b2c2013554bb Mon Sep 17 00:00:00 2001 +From: "H. Vetinari" +Date: Sun, 18 Aug 2024 14:03:42 +1100 +Subject: [PATCH 3/3] read pipe as binary + +--- + lapack_testing.py | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +diff --git a/lapack_testing.py b/lapack_testing.py +index 8b0af0de1..a6ce1ae72 100755 +--- a/lapack_testing.py ++++ b/lapack_testing.py +@@ -114,7 +114,7 @@ def run_summary_test( f, cmdline, short_summary): + r=1 + if short_summary: return [nb_test_run,nb_test_fail,nb_test_illegal,nb_test_info] + else: +- pipe = open(cmdline,'r') ++ pipe = open(cmdline,'rb') + r=0 + else: + cmdline = os.path.join(abs_bin_dir, cmdline) +@@ -125,7 +125,7 @@ def run_summary_test( f, cmdline, short_summary): + p.wait() + #pipe.close() + r=p.returncode +- pipe = open(outfile,'r') ++ pipe = open(outfile,'rb') + error_message=cmdline+" did not work" + + if r != 0 and not with_file: +@@ -140,18 +140,18 @@ def run_summary_test( f, cmdline, short_summary): + for line in pipe.readlines(): + f.write(str(line)) + words_in_line=line.split() +- if (line.find("run")!=-1): ++ if (line.find(b"run")!=-1): + # print line +- whereisrun=words_in_line.index("run)") ++ whereisrun=words_in_line.index(b"run)") + nb_test_run+=int(words_in_line[whereisrun-2]) +- if (line.find("out of")!=-1): ++ if (line.find(b"out of")!=-1): + if (short_summary==0): print(line, end=' ') +- whereisout= words_in_line.index("out") ++ whereisout= words_in_line.index(b"out") + nb_test_fail+=int(words_in_line[whereisout-1]) +- if ((line.find("illegal")!=-1) or (line.find("Illegal")!=-1)): ++ if ((line.find(b"illegal")!=-1) or (line.find(b"Illegal")!=-1)): + if (short_summary==0):print(line, end=' ') + nb_test_illegal+=1 +- if (line.find(" INFO")!=-1): ++ if (line.find(b" INFO")!=-1): + if (short_summary==0):print(line, end=' ') + nb_test_info+=1 + if (with_file==1): From 2b9a3a4814ae370a3b79c9d7b4f9860b43d1a8b2 Mon Sep 17 00:00:00 2001 From: Min RK Date: Mon, 9 Sep 2024 12:19:43 +0200 Subject: [PATCH 2/5] openblas 0.3.28 --- recipe/meta.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index c790643..b60ecb4 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -73,7 +73,7 @@ outputs: - {{ compiler('fortran') }} # [blas_impl == 'accelerate'] - {{ stdlib('c') }} # [blas_impl == 'accelerate'] host: - - libopenblas 0.3.27 # [blas_impl == 'openblas'] + - libopenblas 0.3.28 # [blas_impl == 'openblas'] # from https://github.com/conda-forge/intel_repack-feedstock/ - mkl 2024.1 # [blas_impl == 'mkl'] - blis 0.9.0 # [blas_impl == 'blis'] @@ -206,10 +206,10 @@ outputs: string: "{{ build_num }}_{{ build_string_platform }}_{{ blas_impl }}" requirements: host: - - openblas 0.3.27 # [blas_impl == "openblas"] + - openblas 0.3.28 # [blas_impl == "openblas"] - mkl-devel 2024.1 # [blas_impl == "mkl"] run: - - openblas 0.3.27 # [blas_impl == "openblas"] + - openblas 0.3.28 # [blas_impl == "openblas"] - mkl-devel 2024.1 # [blas_impl == "mkl"] - {{ pin_subpackage("liblapack", exact=True) }} # [blas_impl != 'blis'] - {{ pin_subpackage("liblapacke", exact=True) }} # [blas_impl != 'blis'] From 502f64ff052059d9ee9d0e417e1dd07ead5b8359 Mon Sep 17 00:00:00 2001 From: Ken Lauer <152229072+ken-lauer@users.noreply.github.com> Date: Mon, 23 Sep 2024 14:37:13 -0700 Subject: [PATCH 3/5] BLD: bump build number --- recipe/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index b60ecb4..12b59a8 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,6 +1,6 @@ {% set version = "3.9.0" %} # if build_num is reset to 0 (for new version), update increment for blas_minor below -{% set build_num = 24 %} +{% set build_num = 25 %} {% set version_major = version.split(".")[0] %} # blas_major denotes major infrastructural change to how blas is managed {% set blas_major = "2" %} From 13360d71362fb617b93090e059318b610416a272 Mon Sep 17 00:00:00 2001 From: Joseph Capriotti Date: Fri, 11 Oct 2024 14:50:35 -0600 Subject: [PATCH 4/5] Update for newer MKL version --- recipe/meta.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 12b59a8..09f43fe 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -75,7 +75,7 @@ outputs: host: - libopenblas 0.3.28 # [blas_impl == 'openblas'] # from https://github.com/conda-forge/intel_repack-feedstock/ - - mkl 2024.1 # [blas_impl == 'mkl'] + - mkl 2024.2 # [blas_impl == 'mkl'] - blis 0.9.0 # [blas_impl == 'blis'] run: - {{ pin_compatible("libopenblas", max_pin="x.x.x", exact=win) }} # [blas_impl == 'openblas'] @@ -207,10 +207,10 @@ outputs: requirements: host: - openblas 0.3.28 # [blas_impl == "openblas"] - - mkl-devel 2024.1 # [blas_impl == "mkl"] + - mkl-devel 2024.2 # [blas_impl == "mkl"] run: - openblas 0.3.28 # [blas_impl == "openblas"] - - mkl-devel 2024.1 # [blas_impl == "mkl"] + - mkl-devel 2024.2 # [blas_impl == "mkl"] - {{ pin_subpackage("liblapack", exact=True) }} # [blas_impl != 'blis'] - {{ pin_subpackage("liblapacke", exact=True) }} # [blas_impl != 'blis'] - liblapack {{ version }} *netlib # [blas_impl == 'blis'] From bdd14027df7471e09ccf10674ab60f77b83cfd53 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Wed, 23 Oct 2024 10:26:27 +1100 Subject: [PATCH 5/5] MNT: Re-rendered with conda-build 24.9.0, conda-smithy 3.43.0, and conda-forge-pinning 2024.10.22.08.35.23 --- .azure-pipelines/azure-pipelines-osx.yml | 2 +- .azure-pipelines/azure-pipelines-win.yml | 19 +------- ...las_implblisblas_impl_liblibblis.so.4.yaml | 2 + ...blas_implmklblas_impl_liblibmkl_rt.so.yaml | 2 + ...openblasblas_impl_liblibopenblas.so.0.yaml | 2 + .ci_support/linux_aarch64_.yaml | 2 + .ci_support/linux_ppc64le_.yaml | 2 + ...teblas_impl_liblibvecLibFort-ng.dylib.yaml | 2 + ..._implblisblas_impl_liblibblis.4.dylib.yaml | 2 + ...nblasblas_impl_liblibopenblas.0.dylib.yaml | 2 + ...teblas_impl_liblibvecLibFort-ng.dylib.yaml | 2 + ...nblasblas_impl_liblibopenblas.0.dylib.yaml | 2 + ...as_implblisblas_impl_liblibblis.4.dll.yaml | 2 + ...blas_implmklblas_impl_libmkl_rt.2.dll.yaml | 2 + ...implopenblasblas_impl_libopenblas.dll.yaml | 2 + .scripts/build_steps.sh | 16 ++++--- .scripts/run_osx_build.sh | 43 +++++++++++------- .scripts/run_win_build.bat | 44 ++++++++++++++----- azure-pipelines.yml | 33 ++++++++++++-- build-locally.py | 2 +- 20 files changed, 128 insertions(+), 57 deletions(-) diff --git a/.azure-pipelines/azure-pipelines-osx.yml b/.azure-pipelines/azure-pipelines-osx.yml index 52fa5b9..8cb8d01 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-12 + vmImage: macOS-13 strategy: matrix: osx_64_blas_implaccelerateblas_impl_liblibvecLibFort-ng.dylib: diff --git a/.azure-pipelines/azure-pipelines-win.yml b/.azure-pipelines/azure-pipelines-win.yml index 50cc2b6..953cdc0 100755 --- a/.azure-pipelines/azure-pipelines-win.yml +++ b/.azure-pipelines/azure-pipelines-win.yml @@ -20,31 +20,16 @@ jobs: timeoutInMinutes: 360 variables: CONDA_BLD_PATH: D:\\bld\\ + MINIFORGE_HOME: D:\Miniforge UPLOAD_TEMP: D:\\tmp steps: - - task: PythonScript@0 - displayName: 'Download Miniforge' - inputs: - scriptSource: inline - script: | - import urllib.request - url = 'https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Windows-x86_64.exe' - path = r"$(Build.ArtifactStagingDirectory)/Miniforge.exe" - urllib.request.urlretrieve(url, path) - - - script: | - start /wait "" %BUILD_ARTIFACTSTAGINGDIRECTORY%\Miniforge.exe /InstallationType=JustMe /RegisterPython=0 /S /D=C:\Miniforge - displayName: Install Miniforge - - - powershell: Write-Host "##vso[task.prependpath]C:\Miniforge\Scripts" - displayName: Add conda to PATH - - script: | call ".scripts\run_win_build.bat" displayName: Run Windows build env: + MINIFORGE_HOME: $(MINIFORGE_HOME) PYTHONUNBUFFERED: 1 CONFIG: $(CONFIG) CI: azure diff --git a/.ci_support/linux_64_blas_implblisblas_impl_liblibblis.so.4.yaml b/.ci_support/linux_64_blas_implblisblas_impl_liblibblis.so.4.yaml index 3ce3bb0..58046c1 100644 --- a/.ci_support/linux_64_blas_implblisblas_impl_liblibblis.so.4.yaml +++ b/.ci_support/linux_64_blas_implblisblas_impl_liblibblis.so.4.yaml @@ -1,3 +1,5 @@ +ace: +- 8.0.1 blas_default_impl: - openblas blas_impl: diff --git a/.ci_support/linux_64_blas_implmklblas_impl_liblibmkl_rt.so.yaml b/.ci_support/linux_64_blas_implmklblas_impl_liblibmkl_rt.so.yaml index 9de5693..fde3ee7 100644 --- a/.ci_support/linux_64_blas_implmklblas_impl_liblibmkl_rt.so.yaml +++ b/.ci_support/linux_64_blas_implmklblas_impl_liblibmkl_rt.so.yaml @@ -1,3 +1,5 @@ +ace: +- 8.0.1 blas_default_impl: - openblas blas_impl: diff --git a/.ci_support/linux_64_blas_implopenblasblas_impl_liblibopenblas.so.0.yaml b/.ci_support/linux_64_blas_implopenblasblas_impl_liblibopenblas.so.0.yaml index fbf7009..03d54ff 100644 --- a/.ci_support/linux_64_blas_implopenblasblas_impl_liblibopenblas.so.0.yaml +++ b/.ci_support/linux_64_blas_implopenblasblas_impl_liblibopenblas.so.0.yaml @@ -1,3 +1,5 @@ +ace: +- 8.0.1 blas_default_impl: - openblas blas_impl: diff --git a/.ci_support/linux_aarch64_.yaml b/.ci_support/linux_aarch64_.yaml index 10fad69..3c74afa 100644 --- a/.ci_support/linux_aarch64_.yaml +++ b/.ci_support/linux_aarch64_.yaml @@ -1,5 +1,7 @@ BUILD: - aarch64-conda_cos7-linux-gnu +ace: +- 8.0.1 blas_default_impl: - openblas blas_impl: diff --git a/.ci_support/linux_ppc64le_.yaml b/.ci_support/linux_ppc64le_.yaml index 9008358..d4d80d0 100644 --- a/.ci_support/linux_ppc64le_.yaml +++ b/.ci_support/linux_ppc64le_.yaml @@ -1,3 +1,5 @@ +ace: +- 8.0.1 blas_default_impl: - openblas blas_impl: diff --git a/.ci_support/osx_64_blas_implaccelerateblas_impl_liblibvecLibFort-ng.dylib.yaml b/.ci_support/osx_64_blas_implaccelerateblas_impl_liblibvecLibFort-ng.dylib.yaml index 131db02..12d6119 100644 --- a/.ci_support/osx_64_blas_implaccelerateblas_impl_liblibvecLibFort-ng.dylib.yaml +++ b/.ci_support/osx_64_blas_implaccelerateblas_impl_liblibvecLibFort-ng.dylib.yaml @@ -2,6 +2,8 @@ MACOSX_DEPLOYMENT_TARGET: - '10.13' MACOSX_SDK_VERSION: - '10.13' +ace: +- 8.0.1 blas_default_impl: - openblas blas_impl: diff --git a/.ci_support/osx_64_blas_implblisblas_impl_liblibblis.4.dylib.yaml b/.ci_support/osx_64_blas_implblisblas_impl_liblibblis.4.dylib.yaml index 27b77ae..e216379 100644 --- a/.ci_support/osx_64_blas_implblisblas_impl_liblibblis.4.dylib.yaml +++ b/.ci_support/osx_64_blas_implblisblas_impl_liblibblis.4.dylib.yaml @@ -2,6 +2,8 @@ MACOSX_DEPLOYMENT_TARGET: - '10.13' MACOSX_SDK_VERSION: - '10.13' +ace: +- 8.0.1 blas_default_impl: - openblas blas_impl: diff --git a/.ci_support/osx_64_blas_implopenblasblas_impl_liblibopenblas.0.dylib.yaml b/.ci_support/osx_64_blas_implopenblasblas_impl_liblibopenblas.0.dylib.yaml index 51082b1..35b7ef1 100644 --- a/.ci_support/osx_64_blas_implopenblasblas_impl_liblibopenblas.0.dylib.yaml +++ b/.ci_support/osx_64_blas_implopenblasblas_impl_liblibopenblas.0.dylib.yaml @@ -2,6 +2,8 @@ MACOSX_DEPLOYMENT_TARGET: - '10.13' MACOSX_SDK_VERSION: - '10.13' +ace: +- 8.0.1 blas_default_impl: - openblas blas_impl: diff --git a/.ci_support/osx_arm64_blas_implaccelerateblas_impl_liblibvecLibFort-ng.dylib.yaml b/.ci_support/osx_arm64_blas_implaccelerateblas_impl_liblibvecLibFort-ng.dylib.yaml index a872798..49b7236 100644 --- a/.ci_support/osx_arm64_blas_implaccelerateblas_impl_liblibvecLibFort-ng.dylib.yaml +++ b/.ci_support/osx_arm64_blas_implaccelerateblas_impl_liblibvecLibFort-ng.dylib.yaml @@ -2,6 +2,8 @@ MACOSX_DEPLOYMENT_TARGET: - '11.0' MACOSX_SDK_VERSION: - '11.0' +ace: +- 8.0.1 blas_default_impl: - openblas blas_impl: diff --git a/.ci_support/osx_arm64_blas_implopenblasblas_impl_liblibopenblas.0.dylib.yaml b/.ci_support/osx_arm64_blas_implopenblasblas_impl_liblibopenblas.0.dylib.yaml index a8891cc..b4370fc 100644 --- a/.ci_support/osx_arm64_blas_implopenblasblas_impl_liblibopenblas.0.dylib.yaml +++ b/.ci_support/osx_arm64_blas_implopenblasblas_impl_liblibopenblas.0.dylib.yaml @@ -2,6 +2,8 @@ MACOSX_DEPLOYMENT_TARGET: - '11.0' MACOSX_SDK_VERSION: - '11.0' +ace: +- 8.0.1 blas_default_impl: - openblas blas_impl: diff --git a/.ci_support/win_64_blas_implblisblas_impl_liblibblis.4.dll.yaml b/.ci_support/win_64_blas_implblisblas_impl_liblibblis.4.dll.yaml index ae47b76..a68e632 100644 --- a/.ci_support/win_64_blas_implblisblas_impl_liblibblis.4.dll.yaml +++ b/.ci_support/win_64_blas_implblisblas_impl_liblibblis.4.dll.yaml @@ -1,3 +1,5 @@ +ace: +- 8.0.1 blas_default_impl: - mkl blas_impl: diff --git a/.ci_support/win_64_blas_implmklblas_impl_libmkl_rt.2.dll.yaml b/.ci_support/win_64_blas_implmklblas_impl_libmkl_rt.2.dll.yaml index 39c9d2d..99d1db2 100644 --- a/.ci_support/win_64_blas_implmklblas_impl_libmkl_rt.2.dll.yaml +++ b/.ci_support/win_64_blas_implmklblas_impl_libmkl_rt.2.dll.yaml @@ -1,3 +1,5 @@ +ace: +- 8.0.1 blas_default_impl: - mkl blas_impl: diff --git a/.ci_support/win_64_blas_implopenblasblas_impl_libopenblas.dll.yaml b/.ci_support/win_64_blas_implopenblasblas_impl_libopenblas.dll.yaml index 1e72721..3b97bdd 100644 --- a/.ci_support/win_64_blas_implopenblasblas_impl_libopenblas.dll.yaml +++ b/.ci_support/win_64_blas_implopenblasblas_impl_libopenblas.dll.yaml @@ -1,3 +1,5 @@ +ace: +- 8.0.1 blas_default_impl: - mkl blas_impl: diff --git a/.scripts/build_steps.sh b/.scripts/build_steps.sh index ba4b251..827a29f 100755 --- a/.scripts/build_steps.sh +++ b/.scripts/build_steps.sh @@ -31,18 +31,20 @@ pkgs_dirs: solver: libmamba CONDARC +mv /opt/conda/conda-meta/history /opt/conda/conda-meta/history.$(date +%Y-%m-%d-%H-%M-%S) +echo > /opt/conda/conda-meta/history +micromamba install --root-prefix ~/.conda --prefix /opt/conda \ + --yes --override-channels --channel conda-forge --strict-channel-priority \ + pip python=3.12 conda-build conda-forge-ci-setup=4 "conda-build>=24.1" 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 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 conda-forge-ci-setup=4 "conda-build>=24.1" - # set up the condarc setup_conda_rc "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" source run_conda_forge_build_setup + + # make the build number clobber make_build_number "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" @@ -74,8 +76,8 @@ else --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" + # inspect_artifacts was only added in conda-forge-ci-setup 4.9.4 + command -v inspect_artifacts >/dev/null 2>&1 && inspect_artifacts --recipe-dir "${RECIPE_ROOT}" -m "${CONFIG_FILE}" || echo "inspect_artifacts needs conda-forge-ci-setup >=4.9.4" ( endgroup "Inspecting artifacts" ) 2> /dev/null ( startgroup "Validating outputs" ) 2> /dev/null diff --git a/.scripts/run_osx_build.sh b/.scripts/run_osx_build.sh index 420f051..7f948c4 100755 --- a/.scripts/run_osx_build.sh +++ b/.scripts/run_osx_build.sh @@ -7,28 +7,39 @@ source .scripts/logging_utils.sh set -xe MINIFORGE_HOME=${MINIFORGE_HOME:-${HOME}/miniforge3} +MINIFORGE_HOME=${MINIFORGE_HOME%/} # remove trailing slash -( startgroup "Installing a fresh version of Miniforge" ) 2> /dev/null - -MINIFORGE_URL="https://github.com/conda-forge/miniforge/releases/latest/download" -MINIFORGE_FILE="Miniforge3-MacOSX-$(uname -m).sh" -curl -L -O "${MINIFORGE_URL}/${MINIFORGE_FILE}" -rm -rf ${MINIFORGE_HOME} -bash $MINIFORGE_FILE -b -p ${MINIFORGE_HOME} - -( endgroup "Installing a fresh version of Miniforge" ) 2> /dev/null +( startgroup "Provisioning base env with micromamba" ) 2> /dev/null +MICROMAMBA_VERSION="1.5.10-0" +if [[ "$(uname -m)" == "arm64" ]]; then + osx_arch="osx-arm64" +else + osx_arch="osx-64" +fi +MICROMAMBA_URL="https://github.com/mamba-org/micromamba-releases/releases/download/${MICROMAMBA_VERSION}/micromamba-${osx_arch}" +MAMBA_ROOT_PREFIX="${MINIFORGE_HOME}-micromamba-$(date +%s)" +echo "Downloading micromamba ${MICROMAMBA_VERSION}" +micromamba_exe="$(mktemp -d)/micromamba" +curl -L -o "${micromamba_exe}" "${MICROMAMBA_URL}" +chmod +x "${micromamba_exe}" +echo "Creating environment" +"${micromamba_exe}" create --yes --root-prefix "${MAMBA_ROOT_PREFIX}" --prefix "${MINIFORGE_HOME}" \ + --channel conda-forge \ + pip python=3.12 conda-build conda-forge-ci-setup=4 "conda-build>=24.1" +echo "Moving pkgs cache from ${MAMBA_ROOT_PREFIX} to ${MINIFORGE_HOME}" +mv "${MAMBA_ROOT_PREFIX}/pkgs" "${MINIFORGE_HOME}" +echo "Cleaning up micromamba" +rm -rf "${MAMBA_ROOT_PREFIX}" "${micromamba_exe}" || true +( endgroup "Provisioning base env with micromamba" ) 2> /dev/null ( startgroup "Configuring conda" ) 2> /dev/null -source ${MINIFORGE_HOME}/etc/profile.d/conda.sh +source "${MINIFORGE_HOME}/etc/profile.d/conda.sh" conda activate base 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 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 conda-forge-ci-setup=4 "conda-build>=24.1" + @@ -88,8 +99,8 @@ else ( 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" + # inspect_artifacts was only added in conda-forge-ci-setup 4.9.4 + command -v inspect_artifacts >/dev/null 2>&1 && inspect_artifacts --recipe-dir ./recipe -m ./.ci_support/${CONFIG}.yaml || echo "inspect_artifacts needs conda-forge-ci-setup >=4.9.4" ( endgroup "Inspecting artifacts" ) 2> /dev/null ( startgroup "Validating outputs" ) 2> /dev/null diff --git a/.scripts/run_win_build.bat b/.scripts/run_win_build.bat index 65650bf..d3c0345 100755 --- a/.scripts/run_win_build.bat +++ b/.scripts/run_win_build.bat @@ -3,30 +3,52 @@ :: changes to this script, consider a proposal to conda-smithy so that other feedstocks can also :: benefit from the improvement. -:: Note: we assume a Miniforge installation is available - :: INPUTS (required environment variables) :: CONFIG: name of the .ci_support/*.yaml file for this job :: CI: azure, github_actions, or unset +:: MINIFORGE_HOME: where to install the base conda environment :: UPLOAD_PACKAGES: true or false :: UPLOAD_ON_BRANCH: true or false setlocal enableextensions enabledelayedexpansion +if "%MINIFORGE_HOME%"=="" set "MINIFORGE_HOME=%USERPROFILE%\Miniforge3" +:: Remove trailing backslash, if present +if "%MINIFORGE_HOME:~-1%"=="\" set "MINIFORGE_HOME=%MINIFORGE_HOME:~0,-1%" +call :start_group "Provisioning base env with micromamba" +set "MAMBA_ROOT_PREFIX=%MINIFORGE_HOME%-micromamba-%RANDOM%" +set "MICROMAMBA_VERSION=1.5.10-0" +set "MICROMAMBA_URL=https://github.com/mamba-org/micromamba-releases/releases/download/%MICROMAMBA_VERSION%/micromamba-win-64" +set "MICROMAMBA_TMPDIR=%TMP%\micromamba-%RANDOM%" +set "MICROMAMBA_EXE=%MICROMAMBA_TMPDIR%\micromamba.exe" + +echo Downloading micromamba %MICROMAMBA_VERSION% +if not exist "%MICROMAMBA_TMPDIR%" mkdir "%MICROMAMBA_TMPDIR%" +certutil -urlcache -split -f "%MICROMAMBA_URL%" "%MICROMAMBA_EXE%" +if !errorlevel! neq 0 exit /b !errorlevel! + +echo Creating environment +call "%MICROMAMBA_EXE%" create --yes --root-prefix "%MAMBA_ROOT_PREFIX%" --prefix "%MINIFORGE_HOME%" ^ + --channel conda-forge ^ + pip python=3.12 conda-build conda-forge-ci-setup=4 "conda-build>=24.1" +if !errorlevel! neq 0 exit /b !errorlevel! +echo Moving pkgs cache from %MAMBA_ROOT_PREFIX% to %MINIFORGE_HOME% +move /Y "%MAMBA_ROOT_PREFIX%\pkgs" "%MINIFORGE_HOME%" +if !errorlevel! neq 0 exit /b !errorlevel! +echo Removing %MAMBA_ROOT_PREFIX% +del /S /Q "%MAMBA_ROOT_PREFIX%" +del /S /Q "%MICROMAMBA_TMPDIR%" +call :end_group + call :start_group "Configuring conda" :: Activate the base conda environment -call activate base +call "%MINIFORGE_HOME%\Scripts\activate.bat" :: Configure the solver set "CONDA_SOLVER=libmamba" if !errorlevel! neq 0 exit /b !errorlevel! set "CONDA_LIBMAMBA_SOLVER_NO_CHANNELS_FROM_INSTALLED=1" -:: Provision the necessary dependencies to build the recipe later -echo Installing dependencies -mamba.exe install "python=3.10" pip mamba conda-build conda-forge-ci-setup=4 "conda-build>=24.1" -c conda-forge --strict-channel-priority --yes -if !errorlevel! neq 0 exit /b !errorlevel! - :: Set basic configuration echo Setting up configuration setup_conda_rc .\ ".\recipe" .\.ci_support\%CONFIG%.yaml @@ -48,7 +70,7 @@ if NOT [%HOST_PLATFORM%] == [%BUILD_PLATFORM%] ( ) if NOT [%flow_run_id%] == [] ( - set "EXTRA_CB_OPTIONS=%EXTRA_CB_OPTIONS% --extra-meta flow_run_id=%flow_run_id% remote_url=%remote_url% sha=%sha%" + set "EXTRA_CB_OPTIONS=%EXTRA_CB_OPTIONS% --extra-meta flow_run_id=%flow_run_id% remote_url=%remote_url% sha=%sha%" ) call :end_group @@ -59,8 +81,8 @@ conda-build.exe "recipe" -m .ci_support\%CONFIG%.yaml --suppress-variables %EXTR if !errorlevel! neq 0 exit /b !errorlevel! call :start_group "Inspecting artifacts" -:: inspect_artifacts was only added in conda-forge-ci-setup 4.6.0 -WHERE inspect_artifacts >nul 2>nul && inspect_artifacts || echo "inspect_artifacts needs conda-forge-ci-setup >=4.6.0" +:: inspect_artifacts was only added in conda-forge-ci-setup 4.9.4 +WHERE inspect_artifacts >nul 2>nul && inspect_artifacts --recipe-dir ".\recipe" -m .ci_support\%CONFIG%.yaml || echo "inspect_artifacts needs conda-forge-ci-setup >=4.9.4" call :end_group :: Prepare some environment variables for the upload step diff --git a/azure-pipelines.yml b/azure-pipelines.yml index e5306da..32da3d0 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -2,7 +2,32 @@ # update the conda-forge.yml and/or the recipe/meta.yaml. # -*- mode: yaml -*- -jobs: - - template: ./.azure-pipelines/azure-pipelines-linux.yml - - template: ./.azure-pipelines/azure-pipelines-osx.yml - - template: ./.azure-pipelines/azure-pipelines-win.yml \ No newline at end of file +stages: +- stage: Check + jobs: + - job: Skip + pool: + vmImage: 'ubuntu-22.04' + variables: + DECODE_PERCENTS: 'false' + RET: 'true' + steps: + - checkout: self + fetchDepth: '2' + - bash: | + git_log=`git log --max-count=1 --skip=1 --pretty=format:"%B" | tr "\n" " "` + echo "##vso[task.setvariable variable=log]$git_log" + displayName: Obtain commit message + - bash: echo "##vso[task.setvariable variable=RET]false" + condition: or(contains(variables.log, '[skip azp]'), contains(variables.log, '[azp skip]'), contains(variables.log, '[skip ci]'), contains(variables.log, '[ci skip]')) + displayName: Skip build? + - bash: echo "##vso[task.setvariable variable=start_main;isOutput=true]$RET" + name: result + displayName: Export result +- stage: Build + condition: and(succeeded(), eq(dependencies.Check.outputs['Skip.result.start_main'], 'true')) + dependsOn: Check + jobs: + - template: ./.azure-pipelines/azure-pipelines-linux.yml + - template: ./.azure-pipelines/azure-pipelines-osx.yml + - template: ./.azure-pipelines/azure-pipelines-win.yml \ No newline at end of file diff --git a/build-locally.py b/build-locally.py index 8ac9b84..6788aea 100755 --- a/build-locally.py +++ b/build-locally.py @@ -1,5 +1,5 @@ #!/bin/sh -"""exec' "python3" "$0" "$@" #""" # fmt: off # fmt: on +"""exec" "python3" "$0" "$@" #""" # fmt: off # fmt: on # # This file has been generated by conda-smithy in order to build the recipe # locally.