From 3e197922949fda030de42fc663e3a08d65f757d4 Mon Sep 17 00:00:00 2001 From: Klaus Zimmermann Date: Mon, 27 Mar 2023 16:34:15 +0200 Subject: [PATCH 01/12] Enable plugin install --- recipe/build.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/recipe/build.sh b/recipe/build.sh index e1772a20..a358e33f 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -65,6 +65,7 @@ cmake ${CMAKE_ARGS} \ -DENABLE_HDF4=ON \ -DENABLE_NETCDF_4=ON \ -DBUILD_SHARED_LIBS=ON \ + -DENABLE_PLUGIN_INSTALL=ON \ -DENABLE_TESTS=ON \ -DBUILD_UTILITIES=ON \ -DENABLE_DOXYGEN=OFF \ From 97d5db17581430ebd02dfdddaaa62d8fa4335020 Mon Sep 17 00:00:00 2001 From: Klaus Zimmermann Date: Mon, 27 Mar 2023 16:34:45 +0200 Subject: [PATCH 02/12] 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 b4addc10..a60513fb 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,5 +1,5 @@ {% set version = "4.9.2" %} -{% set build = 2 %} +{% set build = 3 %} # recipe-lint fails if mpi is undefined {% set mpi = mpi or 'nompi' %} From e9d6927704641898a42eb5ebd10ee95e9df164b4 Mon Sep 17 00:00:00 2001 From: Klaus Zimmermann Date: Mon, 27 Mar 2023 16:46:56 +0200 Subject: [PATCH 03/12] Store artifacts for debugging --- conda-forge.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/conda-forge.yml b/conda-forge.yml index 092b9fdf..e99f8cf7 100644 --- a/conda-forge.yml +++ b/conda-forge.yml @@ -12,3 +12,5 @@ provider: linux_aarch64: default linux_ppc64le: default test_on_native_only: true +azure: + store_build_artifacts: true From f79531c538196c501c8af4c9dbb4640f206564e9 Mon Sep 17 00:00:00 2001 From: Klaus Zimmermann Date: Mon, 27 Mar 2023 16:48:43 +0200 Subject: [PATCH 04/12] Set HDF5_PLUGIN_PATH --- .azure-pipelines/azure-pipelines-linux.yml | 77 --------------- .azure-pipelines/azure-pipelines-osx.yml | 48 ---------- .azure-pipelines/azure-pipelines-win.yml | 86 ----------------- .ci_support/linux_64_mpimpich.yaml | 45 --------- .ci_support/linux_64_mpinompi.yaml | 45 --------- .ci_support/linux_64_mpiopenmpi.yaml | 45 --------- .ci_support/linux_aarch64_mpimpich.yaml | 49 ---------- .ci_support/linux_aarch64_mpinompi.yaml | 49 ---------- .ci_support/linux_aarch64_mpiopenmpi.yaml | 49 ---------- .ci_support/linux_ppc64le_mpimpich.yaml | 45 --------- .ci_support/linux_ppc64le_mpinompi.yaml | 45 --------- .ci_support/linux_ppc64le_mpiopenmpi.yaml | 45 --------- .ci_support/osx_64_mpimpich.yaml | 45 --------- .ci_support/osx_64_mpinompi.yaml | 45 --------- .ci_support/osx_64_mpiopenmpi.yaml | 45 --------- .ci_support/osx_arm64_mpimpich.yaml | 45 --------- .ci_support/osx_arm64_mpinompi.yaml | 45 --------- .ci_support/osx_arm64_mpiopenmpi.yaml | 45 --------- .ci_support/win_64_.yaml | 36 ------- .scripts/build_steps.sh | 90 ------------------ .scripts/run_docker_build.sh | 105 --------------------- .scripts/run_osx_build.sh | 94 ------------------ recipe/build.sh | 2 + 23 files changed, 2 insertions(+), 1223 deletions(-) delete mode 100755 .azure-pipelines/azure-pipelines-linux.yml delete mode 100755 .azure-pipelines/azure-pipelines-osx.yml delete mode 100755 .azure-pipelines/azure-pipelines-win.yml delete mode 100644 .ci_support/linux_64_mpimpich.yaml delete mode 100644 .ci_support/linux_64_mpinompi.yaml delete mode 100644 .ci_support/linux_64_mpiopenmpi.yaml delete mode 100644 .ci_support/linux_aarch64_mpimpich.yaml delete mode 100644 .ci_support/linux_aarch64_mpinompi.yaml delete mode 100644 .ci_support/linux_aarch64_mpiopenmpi.yaml delete mode 100644 .ci_support/linux_ppc64le_mpimpich.yaml delete mode 100644 .ci_support/linux_ppc64le_mpinompi.yaml delete mode 100644 .ci_support/linux_ppc64le_mpiopenmpi.yaml delete mode 100644 .ci_support/osx_64_mpimpich.yaml delete mode 100644 .ci_support/osx_64_mpinompi.yaml delete mode 100644 .ci_support/osx_64_mpiopenmpi.yaml delete mode 100644 .ci_support/osx_arm64_mpimpich.yaml delete mode 100644 .ci_support/osx_arm64_mpinompi.yaml delete mode 100644 .ci_support/osx_arm64_mpiopenmpi.yaml delete mode 100644 .ci_support/win_64_.yaml delete mode 100755 .scripts/build_steps.sh delete mode 100755 .scripts/run_docker_build.sh delete mode 100755 .scripts/run_osx_build.sh diff --git a/.azure-pipelines/azure-pipelines-linux.yml b/.azure-pipelines/azure-pipelines-linux.yml deleted file mode 100755 index eea1bef7..00000000 --- a/.azure-pipelines/azure-pipelines-linux.yml +++ /dev/null @@ -1,77 +0,0 @@ -# This file was generated automatically from conda-smithy. To update this configuration, -# update the conda-forge.yml and/or the recipe/meta.yaml. -# -*- mode: yaml -*- - -jobs: -- job: linux - pool: - vmImage: ubuntu-latest - strategy: - matrix: - linux_64_mpimpich: - CONFIG: linux_64_mpimpich - UPLOAD_PACKAGES: 'True' - DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 - linux_64_mpinompi: - CONFIG: linux_64_mpinompi - UPLOAD_PACKAGES: 'True' - DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 - linux_64_mpiopenmpi: - CONFIG: linux_64_mpiopenmpi - UPLOAD_PACKAGES: 'True' - DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 - linux_aarch64_mpimpich: - CONFIG: linux_aarch64_mpimpich - UPLOAD_PACKAGES: 'True' - DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 - linux_aarch64_mpinompi: - CONFIG: linux_aarch64_mpinompi - UPLOAD_PACKAGES: 'True' - DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 - linux_aarch64_mpiopenmpi: - CONFIG: linux_aarch64_mpiopenmpi - UPLOAD_PACKAGES: 'True' - DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 - linux_ppc64le_mpimpich: - CONFIG: linux_ppc64le_mpimpich - UPLOAD_PACKAGES: 'True' - DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 - linux_ppc64le_mpinompi: - CONFIG: linux_ppc64le_mpinompi - UPLOAD_PACKAGES: 'True' - DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 - linux_ppc64le_mpiopenmpi: - CONFIG: linux_ppc64le_mpiopenmpi - UPLOAD_PACKAGES: 'True' - DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 - timeoutInMinutes: 360 - - steps: - - script: | - rm -rf /opt/ghc - df -h - displayName: Manage disk space - - # configure qemu binfmt-misc running. This allows us to run docker containers - # embedded qemu-static - - script: | - docker run --rm --privileged multiarch/qemu-user-static:register --reset --credential yes - ls /proc/sys/fs/binfmt_misc/ - condition: not(startsWith(variables['CONFIG'], 'linux_64')) - displayName: Configure binfmt_misc - - - script: | - export CI=azure - export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME - export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) - if [[ "${BUILD_REASON:-}" == "PullRequest" ]]; then - export IS_PR_BUILD="True" - else - export IS_PR_BUILD="False" - fi - .scripts/run_docker_build.sh - displayName: Run docker build - env: - 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 deleted file mode 100755 index 0f55bb1a..00000000 --- a/.azure-pipelines/azure-pipelines-osx.yml +++ /dev/null @@ -1,48 +0,0 @@ -# This file was generated automatically from conda-smithy. To update this configuration, -# update the conda-forge.yml and/or the recipe/meta.yaml. -# -*- mode: yaml -*- - -jobs: -- job: osx - pool: - vmImage: macOS-11 - strategy: - matrix: - osx_64_mpimpich: - CONFIG: osx_64_mpimpich - UPLOAD_PACKAGES: 'True' - osx_64_mpinompi: - CONFIG: osx_64_mpinompi - UPLOAD_PACKAGES: 'True' - osx_64_mpiopenmpi: - CONFIG: osx_64_mpiopenmpi - UPLOAD_PACKAGES: 'True' - osx_arm64_mpimpich: - CONFIG: osx_arm64_mpimpich - UPLOAD_PACKAGES: 'True' - osx_arm64_mpinompi: - CONFIG: osx_arm64_mpinompi - UPLOAD_PACKAGES: 'True' - osx_arm64_mpiopenmpi: - CONFIG: osx_arm64_mpiopenmpi - UPLOAD_PACKAGES: 'True' - timeoutInMinutes: 360 - - steps: - # TODO: Fast finish on azure pipelines? - - script: | - export CI=azure - export OSX_FORCE_SDK_DOWNLOAD="1" - export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME - export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) - if [[ "${BUILD_REASON:-}" == "PullRequest" ]]; then - export IS_PR_BUILD="True" - else - export IS_PR_BUILD="False" - fi - ./.scripts/run_osx_build.sh - displayName: Run OSX build - env: - 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-win.yml b/.azure-pipelines/azure-pipelines-win.yml deleted file mode 100755 index 8a96a72e..00000000 --- a/.azure-pipelines/azure-pipelines-win.yml +++ /dev/null @@ -1,86 +0,0 @@ -# This file was generated automatically from conda-smithy. To update this configuration, -# update the conda-forge.yml and/or the recipe/meta.yaml. -# -*- mode: yaml -*- - -jobs: -- job: win - pool: - vmImage: windows-2022 - strategy: - matrix: - win_64_: - CONFIG: win_64_ - UPLOAD_PACKAGES: 'True' - timeoutInMinutes: 360 - variables: - CONDA_BLD_PATH: D:\\bld\\ - 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/Mambaforge-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 activate base - mamba.exe install "python=3.10" conda-build conda pip boa conda-forge-ci-setup=3 -c conda-forge --strict-channel-priority --yes - displayName: Install conda-build - - - script: set PYTHONUNBUFFERED=1 - displayName: Set PYTHONUNBUFFERED - - # Configure the VM - - 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: | - call activate base - if EXIST LICENSE.txt ( - copy LICENSE.txt "recipe\\recipe-scripts-license.txt" - ) - conda.exe mambabuild "recipe" -m .ci_support\%CONFIG%.yaml --suppress-variables - displayName: Build recipe - env: - PYTHONUNBUFFERED: 1 - - script: | - set "FEEDSTOCK_NAME=%BUILD_REPOSITORY_NAME:*/=%" - call activate base - validate_recipe_outputs "%FEEDSTOCK_NAME%" - displayName: Validate Recipe Outputs - - - script: | - set "GIT_BRANCH=%BUILD_SOURCEBRANCHNAME%" - set "FEEDSTOCK_NAME=%BUILD_REPOSITORY_NAME:*/=%" - set "TEMP=$(UPLOAD_TEMP)" - if not exist "%TEMP%\" md "%TEMP%" - set "TMP=%TEMP%" - call activate base - upload_package --validate --feedstock-name="%FEEDSTOCK_NAME%" .\ ".\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')), not(eq(variables['Build.Reason'], 'PullRequest'))) \ No newline at end of file diff --git a/.ci_support/linux_64_mpimpich.yaml b/.ci_support/linux_64_mpimpich.yaml deleted file mode 100644 index 3a0c1c3e..00000000 --- a/.ci_support/linux_64_mpimpich.yaml +++ /dev/null @@ -1,45 +0,0 @@ -bzip2: -- '1' -c_compiler: -- gcc -c_compiler_version: -- '11' -cdt_name: -- cos6 -channel_sources: -- conda-forge -channel_targets: -- conda-forge main -curl: -- '7' -cxx_compiler: -- gxx -cxx_compiler_version: -- '11' -docker_image: -- quay.io/condaforge/linux-anvil-cos7-x86_64 -hdf4: -- 4.2.15 -hdf5: -- 1.14.0 -libjpeg_turbo: -- 2.1.5 -libxml2: -- '2.10' -libzip: -- '1' -mpi: -- mpich -mpich: -- '4' -openmpi: -- '4' -target_platform: -- linux-64 -zip_keys: -- - c_compiler_version - - cxx_compiler_version -zlib: -- '1.2' -zstd: -- '1.5' diff --git a/.ci_support/linux_64_mpinompi.yaml b/.ci_support/linux_64_mpinompi.yaml deleted file mode 100644 index 59fd14de..00000000 --- a/.ci_support/linux_64_mpinompi.yaml +++ /dev/null @@ -1,45 +0,0 @@ -bzip2: -- '1' -c_compiler: -- gcc -c_compiler_version: -- '11' -cdt_name: -- cos6 -channel_sources: -- conda-forge -channel_targets: -- conda-forge main -curl: -- '7' -cxx_compiler: -- gxx -cxx_compiler_version: -- '11' -docker_image: -- quay.io/condaforge/linux-anvil-cos7-x86_64 -hdf4: -- 4.2.15 -hdf5: -- 1.14.0 -libjpeg_turbo: -- 2.1.5 -libxml2: -- '2.10' -libzip: -- '1' -mpi: -- nompi -mpich: -- '4' -openmpi: -- '4' -target_platform: -- linux-64 -zip_keys: -- - c_compiler_version - - cxx_compiler_version -zlib: -- '1.2' -zstd: -- '1.5' diff --git a/.ci_support/linux_64_mpiopenmpi.yaml b/.ci_support/linux_64_mpiopenmpi.yaml deleted file mode 100644 index c27d04b1..00000000 --- a/.ci_support/linux_64_mpiopenmpi.yaml +++ /dev/null @@ -1,45 +0,0 @@ -bzip2: -- '1' -c_compiler: -- gcc -c_compiler_version: -- '11' -cdt_name: -- cos6 -channel_sources: -- conda-forge -channel_targets: -- conda-forge main -curl: -- '7' -cxx_compiler: -- gxx -cxx_compiler_version: -- '11' -docker_image: -- quay.io/condaforge/linux-anvil-cos7-x86_64 -hdf4: -- 4.2.15 -hdf5: -- 1.14.0 -libjpeg_turbo: -- 2.1.5 -libxml2: -- '2.10' -libzip: -- '1' -mpi: -- openmpi -mpich: -- '4' -openmpi: -- '4' -target_platform: -- linux-64 -zip_keys: -- - c_compiler_version - - cxx_compiler_version -zlib: -- '1.2' -zstd: -- '1.5' diff --git a/.ci_support/linux_aarch64_mpimpich.yaml b/.ci_support/linux_aarch64_mpimpich.yaml deleted file mode 100644 index dbfe1d2a..00000000 --- a/.ci_support/linux_aarch64_mpimpich.yaml +++ /dev/null @@ -1,49 +0,0 @@ -BUILD: -- aarch64-conda_cos7-linux-gnu -bzip2: -- '1' -c_compiler: -- gcc -c_compiler_version: -- '11' -cdt_arch: -- aarch64 -cdt_name: -- cos7 -channel_sources: -- conda-forge -channel_targets: -- conda-forge main -curl: -- '7' -cxx_compiler: -- gxx -cxx_compiler_version: -- '11' -docker_image: -- quay.io/condaforge/linux-anvil-cos7-x86_64 -hdf4: -- 4.2.15 -hdf5: -- 1.14.0 -libjpeg_turbo: -- 2.1.5 -libxml2: -- '2.10' -libzip: -- '1' -mpi: -- mpich -mpich: -- '4' -openmpi: -- '4' -target_platform: -- linux-aarch64 -zip_keys: -- - c_compiler_version - - cxx_compiler_version -zlib: -- '1.2' -zstd: -- '1.5' diff --git a/.ci_support/linux_aarch64_mpinompi.yaml b/.ci_support/linux_aarch64_mpinompi.yaml deleted file mode 100644 index 9d41ef8b..00000000 --- a/.ci_support/linux_aarch64_mpinompi.yaml +++ /dev/null @@ -1,49 +0,0 @@ -BUILD: -- aarch64-conda_cos7-linux-gnu -bzip2: -- '1' -c_compiler: -- gcc -c_compiler_version: -- '11' -cdt_arch: -- aarch64 -cdt_name: -- cos7 -channel_sources: -- conda-forge -channel_targets: -- conda-forge main -curl: -- '7' -cxx_compiler: -- gxx -cxx_compiler_version: -- '11' -docker_image: -- quay.io/condaforge/linux-anvil-cos7-x86_64 -hdf4: -- 4.2.15 -hdf5: -- 1.14.0 -libjpeg_turbo: -- 2.1.5 -libxml2: -- '2.10' -libzip: -- '1' -mpi: -- nompi -mpich: -- '4' -openmpi: -- '4' -target_platform: -- linux-aarch64 -zip_keys: -- - c_compiler_version - - cxx_compiler_version -zlib: -- '1.2' -zstd: -- '1.5' diff --git a/.ci_support/linux_aarch64_mpiopenmpi.yaml b/.ci_support/linux_aarch64_mpiopenmpi.yaml deleted file mode 100644 index a2e1db5b..00000000 --- a/.ci_support/linux_aarch64_mpiopenmpi.yaml +++ /dev/null @@ -1,49 +0,0 @@ -BUILD: -- aarch64-conda_cos7-linux-gnu -bzip2: -- '1' -c_compiler: -- gcc -c_compiler_version: -- '11' -cdt_arch: -- aarch64 -cdt_name: -- cos7 -channel_sources: -- conda-forge -channel_targets: -- conda-forge main -curl: -- '7' -cxx_compiler: -- gxx -cxx_compiler_version: -- '11' -docker_image: -- quay.io/condaforge/linux-anvil-cos7-x86_64 -hdf4: -- 4.2.15 -hdf5: -- 1.14.0 -libjpeg_turbo: -- 2.1.5 -libxml2: -- '2.10' -libzip: -- '1' -mpi: -- openmpi -mpich: -- '4' -openmpi: -- '4' -target_platform: -- linux-aarch64 -zip_keys: -- - c_compiler_version - - cxx_compiler_version -zlib: -- '1.2' -zstd: -- '1.5' diff --git a/.ci_support/linux_ppc64le_mpimpich.yaml b/.ci_support/linux_ppc64le_mpimpich.yaml deleted file mode 100644 index f1427048..00000000 --- a/.ci_support/linux_ppc64le_mpimpich.yaml +++ /dev/null @@ -1,45 +0,0 @@ -bzip2: -- '1' -c_compiler: -- gcc -c_compiler_version: -- '11' -cdt_name: -- cos7 -channel_sources: -- conda-forge -channel_targets: -- conda-forge main -curl: -- '7' -cxx_compiler: -- gxx -cxx_compiler_version: -- '11' -docker_image: -- quay.io/condaforge/linux-anvil-cos7-x86_64 -hdf4: -- 4.2.15 -hdf5: -- 1.14.0 -libjpeg_turbo: -- 2.1.5 -libxml2: -- '2.10' -libzip: -- '1' -mpi: -- mpich -mpich: -- '4' -openmpi: -- '4' -target_platform: -- linux-ppc64le -zip_keys: -- - c_compiler_version - - cxx_compiler_version -zlib: -- '1.2' -zstd: -- '1.5' diff --git a/.ci_support/linux_ppc64le_mpinompi.yaml b/.ci_support/linux_ppc64le_mpinompi.yaml deleted file mode 100644 index c70a3567..00000000 --- a/.ci_support/linux_ppc64le_mpinompi.yaml +++ /dev/null @@ -1,45 +0,0 @@ -bzip2: -- '1' -c_compiler: -- gcc -c_compiler_version: -- '11' -cdt_name: -- cos7 -channel_sources: -- conda-forge -channel_targets: -- conda-forge main -curl: -- '7' -cxx_compiler: -- gxx -cxx_compiler_version: -- '11' -docker_image: -- quay.io/condaforge/linux-anvil-cos7-x86_64 -hdf4: -- 4.2.15 -hdf5: -- 1.14.0 -libjpeg_turbo: -- 2.1.5 -libxml2: -- '2.10' -libzip: -- '1' -mpi: -- nompi -mpich: -- '4' -openmpi: -- '4' -target_platform: -- linux-ppc64le -zip_keys: -- - c_compiler_version - - cxx_compiler_version -zlib: -- '1.2' -zstd: -- '1.5' diff --git a/.ci_support/linux_ppc64le_mpiopenmpi.yaml b/.ci_support/linux_ppc64le_mpiopenmpi.yaml deleted file mode 100644 index 369dda6a..00000000 --- a/.ci_support/linux_ppc64le_mpiopenmpi.yaml +++ /dev/null @@ -1,45 +0,0 @@ -bzip2: -- '1' -c_compiler: -- gcc -c_compiler_version: -- '11' -cdt_name: -- cos7 -channel_sources: -- conda-forge -channel_targets: -- conda-forge main -curl: -- '7' -cxx_compiler: -- gxx -cxx_compiler_version: -- '11' -docker_image: -- quay.io/condaforge/linux-anvil-cos7-x86_64 -hdf4: -- 4.2.15 -hdf5: -- 1.14.0 -libjpeg_turbo: -- 2.1.5 -libxml2: -- '2.10' -libzip: -- '1' -mpi: -- openmpi -mpich: -- '4' -openmpi: -- '4' -target_platform: -- linux-ppc64le -zip_keys: -- - c_compiler_version - - cxx_compiler_version -zlib: -- '1.2' -zstd: -- '1.5' diff --git a/.ci_support/osx_64_mpimpich.yaml b/.ci_support/osx_64_mpimpich.yaml deleted file mode 100644 index eb6172b5..00000000 --- a/.ci_support/osx_64_mpimpich.yaml +++ /dev/null @@ -1,45 +0,0 @@ -MACOSX_DEPLOYMENT_TARGET: -- '10.9' -bzip2: -- '1' -c_compiler: -- clang -c_compiler_version: -- '14' -channel_sources: -- conda-forge -channel_targets: -- conda-forge main -curl: -- '7' -cxx_compiler: -- clangxx -cxx_compiler_version: -- '14' -hdf4: -- 4.2.15 -hdf5: -- 1.14.0 -libjpeg_turbo: -- 2.1.5 -libxml2: -- '2.10' -libzip: -- '1' -macos_machine: -- x86_64-apple-darwin13.4.0 -mpi: -- mpich -mpich: -- '4' -openmpi: -- '4' -target_platform: -- osx-64 -zip_keys: -- - c_compiler_version - - cxx_compiler_version -zlib: -- '1.2' -zstd: -- '1.5' diff --git a/.ci_support/osx_64_mpinompi.yaml b/.ci_support/osx_64_mpinompi.yaml deleted file mode 100644 index 33b72b98..00000000 --- a/.ci_support/osx_64_mpinompi.yaml +++ /dev/null @@ -1,45 +0,0 @@ -MACOSX_DEPLOYMENT_TARGET: -- '10.9' -bzip2: -- '1' -c_compiler: -- clang -c_compiler_version: -- '14' -channel_sources: -- conda-forge -channel_targets: -- conda-forge main -curl: -- '7' -cxx_compiler: -- clangxx -cxx_compiler_version: -- '14' -hdf4: -- 4.2.15 -hdf5: -- 1.14.0 -libjpeg_turbo: -- 2.1.5 -libxml2: -- '2.10' -libzip: -- '1' -macos_machine: -- x86_64-apple-darwin13.4.0 -mpi: -- nompi -mpich: -- '4' -openmpi: -- '4' -target_platform: -- osx-64 -zip_keys: -- - c_compiler_version - - cxx_compiler_version -zlib: -- '1.2' -zstd: -- '1.5' diff --git a/.ci_support/osx_64_mpiopenmpi.yaml b/.ci_support/osx_64_mpiopenmpi.yaml deleted file mode 100644 index 5b130c86..00000000 --- a/.ci_support/osx_64_mpiopenmpi.yaml +++ /dev/null @@ -1,45 +0,0 @@ -MACOSX_DEPLOYMENT_TARGET: -- '10.9' -bzip2: -- '1' -c_compiler: -- clang -c_compiler_version: -- '14' -channel_sources: -- conda-forge -channel_targets: -- conda-forge main -curl: -- '7' -cxx_compiler: -- clangxx -cxx_compiler_version: -- '14' -hdf4: -- 4.2.15 -hdf5: -- 1.14.0 -libjpeg_turbo: -- 2.1.5 -libxml2: -- '2.10' -libzip: -- '1' -macos_machine: -- x86_64-apple-darwin13.4.0 -mpi: -- openmpi -mpich: -- '4' -openmpi: -- '4' -target_platform: -- osx-64 -zip_keys: -- - c_compiler_version - - cxx_compiler_version -zlib: -- '1.2' -zstd: -- '1.5' diff --git a/.ci_support/osx_arm64_mpimpich.yaml b/.ci_support/osx_arm64_mpimpich.yaml deleted file mode 100644 index 531d573c..00000000 --- a/.ci_support/osx_arm64_mpimpich.yaml +++ /dev/null @@ -1,45 +0,0 @@ -MACOSX_DEPLOYMENT_TARGET: -- '11.0' -bzip2: -- '1' -c_compiler: -- clang -c_compiler_version: -- '14' -channel_sources: -- conda-forge -channel_targets: -- conda-forge main -curl: -- '7' -cxx_compiler: -- clangxx -cxx_compiler_version: -- '14' -hdf4: -- 4.2.15 -hdf5: -- 1.14.0 -libjpeg_turbo: -- 2.1.5 -libxml2: -- '2.10' -libzip: -- '1' -macos_machine: -- arm64-apple-darwin20.0.0 -mpi: -- mpich -mpich: -- '4' -openmpi: -- '4' -target_platform: -- osx-arm64 -zip_keys: -- - c_compiler_version - - cxx_compiler_version -zlib: -- '1.2' -zstd: -- '1.5' diff --git a/.ci_support/osx_arm64_mpinompi.yaml b/.ci_support/osx_arm64_mpinompi.yaml deleted file mode 100644 index 855af9ee..00000000 --- a/.ci_support/osx_arm64_mpinompi.yaml +++ /dev/null @@ -1,45 +0,0 @@ -MACOSX_DEPLOYMENT_TARGET: -- '11.0' -bzip2: -- '1' -c_compiler: -- clang -c_compiler_version: -- '14' -channel_sources: -- conda-forge -channel_targets: -- conda-forge main -curl: -- '7' -cxx_compiler: -- clangxx -cxx_compiler_version: -- '14' -hdf4: -- 4.2.15 -hdf5: -- 1.14.0 -libjpeg_turbo: -- 2.1.5 -libxml2: -- '2.10' -libzip: -- '1' -macos_machine: -- arm64-apple-darwin20.0.0 -mpi: -- nompi -mpich: -- '4' -openmpi: -- '4' -target_platform: -- osx-arm64 -zip_keys: -- - c_compiler_version - - cxx_compiler_version -zlib: -- '1.2' -zstd: -- '1.5' diff --git a/.ci_support/osx_arm64_mpiopenmpi.yaml b/.ci_support/osx_arm64_mpiopenmpi.yaml deleted file mode 100644 index c9279699..00000000 --- a/.ci_support/osx_arm64_mpiopenmpi.yaml +++ /dev/null @@ -1,45 +0,0 @@ -MACOSX_DEPLOYMENT_TARGET: -- '11.0' -bzip2: -- '1' -c_compiler: -- clang -c_compiler_version: -- '14' -channel_sources: -- conda-forge -channel_targets: -- conda-forge main -curl: -- '7' -cxx_compiler: -- clangxx -cxx_compiler_version: -- '14' -hdf4: -- 4.2.15 -hdf5: -- 1.14.0 -libjpeg_turbo: -- 2.1.5 -libxml2: -- '2.10' -libzip: -- '1' -macos_machine: -- arm64-apple-darwin20.0.0 -mpi: -- openmpi -mpich: -- '4' -openmpi: -- '4' -target_platform: -- osx-arm64 -zip_keys: -- - c_compiler_version - - cxx_compiler_version -zlib: -- '1.2' -zstd: -- '1.5' diff --git a/.ci_support/win_64_.yaml b/.ci_support/win_64_.yaml deleted file mode 100644 index 898b9815..00000000 --- a/.ci_support/win_64_.yaml +++ /dev/null @@ -1,36 +0,0 @@ -bzip2: -- '1' -c_compiler: -- vs2019 -channel_sources: -- conda-forge -channel_targets: -- conda-forge main -curl: -- '7' -cxx_compiler: -- vs2019 -hdf4: -- 4.2.15 -hdf5: -- 1.14.0 -libjpeg_turbo: -- 2.1.5 -libxml2: -- '2.10' -libzip: -- '1' -mpi: -- nompi -mpich: -- '4' -openmpi: -- '4' -target_platform: -- win-64 -vc: -- '14' -zlib: -- '1.2' -zstd: -- '1.5' diff --git a/.scripts/build_steps.sh b/.scripts/build_steps.sh deleted file mode 100755 index a6b09f6b..00000000 --- a/.scripts/build_steps.sh +++ /dev/null @@ -1,90 +0,0 @@ -#!/usr/bin/env bash - -# PLEASE NOTE: This script has been automatically generated by conda-smithy. Any changes here -# will be lost next time ``conda smithy rerender`` is run. If you would like to make permanent -# changes to this script, consider a proposal to conda-smithy so that other feedstocks can also -# benefit from the improvement. - -# -*- mode: jinja-shell -*- - -set -xeuo pipefail -export FEEDSTOCK_ROOT="${FEEDSTOCK_ROOT:-/home/conda/feedstock_root}" -source ${FEEDSTOCK_ROOT}/.scripts/logging_utils.sh - - -( endgroup "Start Docker" ) 2> /dev/null - -( startgroup "Configuring conda" ) 2> /dev/null - -export PYTHONUNBUFFERED=1 -export RECIPE_ROOT="${RECIPE_ROOT:-/home/conda/recipe_root}" -export CI_SUPPORT="${FEEDSTOCK_ROOT}/.ci_support" -export CONFIG_FILE="${CI_SUPPORT}/${CONFIG}.yaml" - -cat >~/.condarc < /dev/null - -if [[ -f "${FEEDSTOCK_ROOT}/LICENSE.txt" ]]; then - cp "${FEEDSTOCK_ROOT}/LICENSE.txt" "${RECIPE_ROOT}/recipe-scripts-license.txt" -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}" - fi - conda debug "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \ - ${EXTRA_CB_OPTIONS:-} \ - --clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml" - - # Drop into an interactive shell - /bin/bash -else - conda mambabuild "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \ - --suppress-variables ${EXTRA_CB_OPTIONS:-} \ - --clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml" - ( startgroup "Validating outputs" ) 2> /dev/null - - validate_recipe_outputs "${FEEDSTOCK_NAME}" - - ( endgroup "Validating outputs" ) 2> /dev/null - - ( startgroup "Uploading packages" ) 2> /dev/null - - if [[ "${UPLOAD_PACKAGES}" != "False" ]] && [[ "${IS_PR_BUILD}" == "False" ]]; then - upload_package --validate --feedstock-name="${FEEDSTOCK_NAME}" "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" - fi - - ( endgroup "Uploading packages" ) 2> /dev/null -fi - -( startgroup "Final checks" ) 2> /dev/null - -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 deleted file mode 100755 index 92362398..00000000 --- a/.scripts/run_docker_build.sh +++ /dev/null @@ -1,105 +0,0 @@ -#!/usr/bin/env bash - -# PLEASE NOTE: This script has been automatically generated by conda-smithy. Any changes here -# will be lost next time ``conda smithy rerender`` is run. If you would like to make permanent -# changes to this script, consider a proposal to conda-smithy so that other feedstocks can also -# benefit from the improvement. - -source .scripts/logging_utils.sh - -( startgroup "Configure Docker" ) 2> /dev/null - -set -xeo pipefail - -THISDIR="$( cd "$( dirname "$0" )" >/dev/null && pwd )" -PROVIDER_DIR="$(basename $THISDIR)" - -FEEDSTOCK_ROOT="$( cd "$( dirname "$0" )/.." >/dev/null && pwd )" -RECIPE_ROOT="${FEEDSTOCK_ROOT}/recipe" - -if [ -z ${FEEDSTOCK_NAME} ]; then - export FEEDSTOCK_NAME=$(basename ${FEEDSTOCK_ROOT}) -fi - -docker info - -# In order for the conda-build process in the container to write to the mounted -# volumes, we need to run with the same id as the host machine, which is -# normally the owner of the mounted volumes, or at least has write permission -export HOST_USER_ID=$(id -u) -# Check if docker-machine is being used (normally on OSX) and get the uid from -# the VM -if hash docker-machine 2> /dev/null && docker-machine active > /dev/null; then - export HOST_USER_ID=$(docker-machine ssh $(docker-machine active) id -u) -fi - -ARTIFACTS="$FEEDSTOCK_ROOT/build_artifacts" - -if [ -z "$CONFIG" ]; then - set +x - FILES=`ls .ci_support/linux_*` - CONFIGS="" - for file in $FILES; do - CONFIGS="${CONFIGS}'${file:12:-5}' or "; - done - echo "Need to set CONFIG env variable. Value can be one of ${CONFIGS:0:-4}" - exit 1 -fi - -if [ -z "${DOCKER_IMAGE}" ]; then - SHYAML_INSTALLED="$(shyaml -h || echo NO)" - if [ "${SHYAML_INSTALLED}" == "NO" ]; then - echo "WARNING: DOCKER_IMAGE variable not set and shyaml not installed. Trying to parse with coreutils" - DOCKER_IMAGE=$(cat .ci_support/${CONFIG}.yaml | grep '^docker_image:$' -A 1 | tail -n 1 | cut -b 3-) - if [ "${DOCKER_IMAGE}" = "" ]; then - echo "No docker_image entry found in ${CONFIG}. Falling back to quay.io/condaforge/linux-anvil-comp7" - DOCKER_IMAGE="quay.io/condaforge/linux-anvil-comp7" - fi - else - DOCKER_IMAGE="$(cat "${FEEDSTOCK_ROOT}/.ci_support/${CONFIG}.yaml" | shyaml get-value docker_image.0 quay.io/condaforge/linux-anvil-comp7 )" - fi -fi - -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}" -fi - -( endgroup "Configure Docker" ) 2> /dev/null - -( startgroup "Start Docker" ) 2> /dev/null - -export UPLOAD_PACKAGES="${UPLOAD_PACKAGES:-True}" -export IS_PR_BUILD="${IS_PR_BUILD:-False}" -docker pull "${DOCKER_IMAGE}" -docker run ${DOCKER_RUN_ARGS} \ - -v "${RECIPE_ROOT}":/home/conda/recipe_root:rw,z,delegated \ - -v "${FEEDSTOCK_ROOT}":/home/conda/feedstock_root:rw,z,delegated \ - -e CONFIG \ - -e HOST_USER_ID \ - -e UPLOAD_PACKAGES \ - -e IS_PR_BUILD \ - -e GIT_BRANCH \ - -e UPLOAD_ON_BRANCH \ - -e CI \ - -e FEEDSTOCK_NAME \ - -e CPU_COUNT \ - -e BUILD_WITH_CONDA_DEBUG \ - -e BUILD_OUTPUT_ID \ - -e BINSTAR_TOKEN \ - -e FEEDSTOCK_TOKEN \ - -e STAGING_BINSTAR_TOKEN \ - "${DOCKER_IMAGE}" \ - bash \ - "/home/conda/feedstock_root/${PROVIDER_DIR}/build_steps.sh" - -# verify that the end of the script was reached -test -f "$DONE_CANARY" - -# This closes the last group opened in `build_steps.sh` -( endgroup "Final checks" ) 2> /dev/null \ No newline at end of file diff --git a/.scripts/run_osx_build.sh b/.scripts/run_osx_build.sh deleted file mode 100755 index bb00584b..00000000 --- a/.scripts/run_osx_build.sh +++ /dev/null @@ -1,94 +0,0 @@ -#!/usr/bin/env bash - -# -*- mode: jinja-shell -*- - -source .scripts/logging_utils.sh - -set -xe - -MINIFORGE_HOME=${MINIFORGE_HOME:-${HOME}/miniforge3} - -( startgroup "Installing a fresh version of Miniforge" ) 2> /dev/null - -MINIFORGE_URL="https://github.com/conda-forge/miniforge/releases/latest/download" -MINIFORGE_FILE="Mambaforge-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 "Configuring conda" ) 2> /dev/null - -source ${MINIFORGE_HOME}/etc/profile.d/conda.sh -conda activate base - -mamba install --update-specs --quiet --yes --channel conda-forge \ - conda-build pip boa conda-forge-ci-setup=3 -mamba update --update-specs --yes --quiet --channel conda-forge \ - conda-build pip boa conda-forge-ci-setup=3 - - - -echo -e "\n\nSetting up the condarc and mangling the compiler." -setup_conda_rc ./ ./recipe ./.ci_support/${CONFIG}.yaml - -if [[ "${CI:-}" != "" ]]; then - mangle_compiler ./ ./recipe .ci_support/${CONFIG}.yaml -fi - -if [[ "${CI:-}" != "" ]]; then - echo -e "\n\nMangling homebrew in the CI to avoid conflicts." - /usr/bin/sudo mangle_homebrew - /usr/bin/sudo -k -else - echo -e "\n\nNot mangling homebrew as we are not running in CI" -fi - -echo -e "\n\nRunning the build setup script." -source run_conda_forge_build_setup - - - -( endgroup "Configuring conda" ) 2> /dev/null - -echo -e "\n\nMaking the build clobber file" -make_build_number ./ ./recipe ./.ci_support/${CONFIG}.yaml - -if [[ "${HOST_PLATFORM}" != "${BUILD_PLATFORM}" ]]; then - EXTRA_CB_OPTIONS="${EXTRA_CB_OPTIONS:-} --no-test" -fi - - -if [[ -f LICENSE.txt ]]; then - cp LICENSE.txt "recipe/recipe-scripts-license.txt" -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}" - fi - conda debug ./recipe -m ./.ci_support/${CONFIG}.yaml \ - ${EXTRA_CB_OPTIONS:-} \ - --clobber-file ./.ci_support/clobber_${CONFIG}.yaml - - # Drop into an interactive shell - /bin/bash -else - conda mambabuild ./recipe -m ./.ci_support/${CONFIG}.yaml \ - --suppress-variables ${EXTRA_CB_OPTIONS:-} \ - --clobber-file ./.ci_support/clobber_${CONFIG}.yaml - ( startgroup "Validating outputs" ) 2> /dev/null - - validate_recipe_outputs "${FEEDSTOCK_NAME}" - - ( endgroup "Validating outputs" ) 2> /dev/null - - ( startgroup "Uploading packages" ) 2> /dev/null - - if [[ "${UPLOAD_PACKAGES}" != "False" ]] && [[ "${IS_PR_BUILD}" == "False" ]]; then - upload_package --validate --feedstock-name="${FEEDSTOCK_NAME}" ./ ./recipe ./.ci_support/${CONFIG}.yaml - fi - - ( endgroup "Uploading packages" ) 2> /dev/null -fi \ No newline at end of file diff --git a/recipe/build.sh b/recipe/build.sh index a358e33f..06daeb5b 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -54,6 +54,8 @@ fi # https://github.com/Unidata/netcdf-c/issues/2188#issuecomment-1015927961 # -DENABLE_DAP_REMOTE_TESTS=OFF +export HDF5_PLUGIN_PATH=$(echo "H5_DEFAULT_PLUGINDIR" | $CPP -P -include $PREFIX/include/H5pubconf.h -) + mkdir build-shared cd build-shared # Build shared. From ebfd226eb9c3fc2819eea9bdcb321fb945c35945 Mon Sep 17 00:00:00 2001 From: Klaus Zimmermann Date: Mon, 27 Mar 2023 16:49:23 +0200 Subject: [PATCH 05/12] MNT: Re-rendered with conda-build 3.23.3, conda-smithy 3.23.1, and conda-forge-pinning 2023.03.27.13.29.23 --- .azure-pipelines/azure-pipelines-linux.yml | 115 +++++++++++++++++++++ .azure-pipelines/azure-pipelines-osx.yml | 83 +++++++++++++++ .azure-pipelines/azure-pipelines-win.yml | 114 ++++++++++++++++++++ .ci_support/linux_64_mpimpich.yaml | 45 ++++++++ .ci_support/linux_64_mpinompi.yaml | 45 ++++++++ .ci_support/linux_64_mpiopenmpi.yaml | 45 ++++++++ .ci_support/linux_aarch64_mpimpich.yaml | 49 +++++++++ .ci_support/linux_aarch64_mpinompi.yaml | 49 +++++++++ .ci_support/linux_aarch64_mpiopenmpi.yaml | 49 +++++++++ .ci_support/linux_ppc64le_mpimpich.yaml | 45 ++++++++ .ci_support/linux_ppc64le_mpinompi.yaml | 45 ++++++++ .ci_support/linux_ppc64le_mpiopenmpi.yaml | 45 ++++++++ .ci_support/osx_64_mpimpich.yaml | 45 ++++++++ .ci_support/osx_64_mpinompi.yaml | 45 ++++++++ .ci_support/osx_64_mpiopenmpi.yaml | 45 ++++++++ .ci_support/osx_arm64_mpimpich.yaml | 45 ++++++++ .ci_support/osx_arm64_mpinompi.yaml | 45 ++++++++ .ci_support/osx_arm64_mpiopenmpi.yaml | 45 ++++++++ .ci_support/win_64_.yaml | 36 +++++++ .scripts/build_steps.sh | 90 ++++++++++++++++ .scripts/create_conda_build_artifacts.bat | 80 ++++++++++++++ .scripts/create_conda_build_artifacts.sh | 113 ++++++++++++++++++++ .scripts/run_docker_build.sh | 105 +++++++++++++++++++ .scripts/run_osx_build.sh | 94 +++++++++++++++++ 24 files changed, 1517 insertions(+) create mode 100755 .azure-pipelines/azure-pipelines-linux.yml create mode 100755 .azure-pipelines/azure-pipelines-osx.yml create mode 100755 .azure-pipelines/azure-pipelines-win.yml create mode 100644 .ci_support/linux_64_mpimpich.yaml create mode 100644 .ci_support/linux_64_mpinompi.yaml create mode 100644 .ci_support/linux_64_mpiopenmpi.yaml create mode 100644 .ci_support/linux_aarch64_mpimpich.yaml create mode 100644 .ci_support/linux_aarch64_mpinompi.yaml create mode 100644 .ci_support/linux_aarch64_mpiopenmpi.yaml create mode 100644 .ci_support/linux_ppc64le_mpimpich.yaml create mode 100644 .ci_support/linux_ppc64le_mpinompi.yaml create mode 100644 .ci_support/linux_ppc64le_mpiopenmpi.yaml create mode 100644 .ci_support/osx_64_mpimpich.yaml create mode 100644 .ci_support/osx_64_mpinompi.yaml create mode 100644 .ci_support/osx_64_mpiopenmpi.yaml create mode 100644 .ci_support/osx_arm64_mpimpich.yaml create mode 100644 .ci_support/osx_arm64_mpinompi.yaml create mode 100644 .ci_support/osx_arm64_mpiopenmpi.yaml create mode 100644 .ci_support/win_64_.yaml create mode 100755 .scripts/build_steps.sh create mode 100755 .scripts/create_conda_build_artifacts.bat create mode 100755 .scripts/create_conda_build_artifacts.sh create mode 100755 .scripts/run_docker_build.sh create mode 100755 .scripts/run_osx_build.sh diff --git a/.azure-pipelines/azure-pipelines-linux.yml b/.azure-pipelines/azure-pipelines-linux.yml new file mode 100755 index 00000000..029a45e1 --- /dev/null +++ b/.azure-pipelines/azure-pipelines-linux.yml @@ -0,0 +1,115 @@ +# This file was generated automatically from conda-smithy. To update this configuration, +# update the conda-forge.yml and/or the recipe/meta.yaml. +# -*- mode: yaml -*- + +jobs: +- job: linux + pool: + vmImage: ubuntu-latest + strategy: + matrix: + linux_64_mpimpich: + CONFIG: linux_64_mpimpich + UPLOAD_PACKAGES: 'True' + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 + SHORT_CONFIG: linux_64_mpimpich + linux_64_mpinompi: + CONFIG: linux_64_mpinompi + UPLOAD_PACKAGES: 'True' + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 + SHORT_CONFIG: linux_64_mpinompi + linux_64_mpiopenmpi: + CONFIG: linux_64_mpiopenmpi + UPLOAD_PACKAGES: 'True' + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 + SHORT_CONFIG: linux_64_mpiopenmpi + linux_aarch64_mpimpich: + CONFIG: linux_aarch64_mpimpich + UPLOAD_PACKAGES: 'True' + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 + SHORT_CONFIG: linux_aarch64_mpimpich + linux_aarch64_mpinompi: + CONFIG: linux_aarch64_mpinompi + UPLOAD_PACKAGES: 'True' + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 + SHORT_CONFIG: linux_aarch64_mpinompi + linux_aarch64_mpiopenmpi: + CONFIG: linux_aarch64_mpiopenmpi + UPLOAD_PACKAGES: 'True' + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 + SHORT_CONFIG: linux_aarch64_mpiopenmpi + linux_ppc64le_mpimpich: + CONFIG: linux_ppc64le_mpimpich + UPLOAD_PACKAGES: 'True' + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 + SHORT_CONFIG: linux_ppc64le_mpimpich + linux_ppc64le_mpinompi: + CONFIG: linux_ppc64le_mpinompi + UPLOAD_PACKAGES: 'True' + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 + SHORT_CONFIG: linux_ppc64le_mpinompi + linux_ppc64le_mpiopenmpi: + CONFIG: linux_ppc64le_mpiopenmpi + UPLOAD_PACKAGES: 'True' + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 + SHORT_CONFIG: linux_ppc64le_mpiopenmpi + timeoutInMinutes: 360 + + steps: + - script: | + rm -rf /opt/ghc + df -h + displayName: Manage disk space + + # configure qemu binfmt-misc running. This allows us to run docker containers + # embedded qemu-static + - script: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset --credential yes + ls /proc/sys/fs/binfmt_misc/ + condition: not(startsWith(variables['CONFIG'], 'linux_64')) + displayName: Configure binfmt_misc + + - script: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + if [[ "${BUILD_REASON:-}" == "PullRequest" ]]; then + export IS_PR_BUILD="True" + else + export IS_PR_BUILD="False" + fi + .scripts/run_docker_build.sh + displayName: Run docker build + env: + BINSTAR_TOKEN: $(BINSTAR_TOKEN) + FEEDSTOCK_TOKEN: $(FEEDSTOCK_TOKEN) + STAGING_BINSTAR_TOKEN: $(STAGING_BINSTAR_TOKEN) + - script: | + export CI=azure + export CI_RUN_ID=$(build.BuildNumber).$(system.JobAttempt) + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + export CONDA_BLD_DIR=build_artifacts + export ARTIFACT_STAGING_DIR="$(Build.ArtifactStagingDirectory)" + # Archive everything in CONDA_BLD_DIR except environments + export BLD_ARTIFACT_PREFIX=conda_artifacts + if [[ "$AGENT_JOBSTATUS" == "Failed" ]]; then + # Archive the CONDA_BLD_DIR environments only when the job fails + export ENV_ARTIFACT_PREFIX=conda_envs + fi + ./.scripts/create_conda_build_artifacts.sh + displayName: Prepare conda build artifacts + condition: succeededOrFailed() + + - task: PublishPipelineArtifact@1 + displayName: Store conda build artifacts + condition: not(eq(variables.BLD_ARTIFACT_PATH, '')) + inputs: + targetPath: $(BLD_ARTIFACT_PATH) + artifactName: $(BLD_ARTIFACT_NAME) + + - task: PublishPipelineArtifact@1 + displayName: Store conda build environment artifacts + condition: not(eq(variables.ENV_ARTIFACT_PATH, '')) + inputs: + targetPath: $(ENV_ARTIFACT_PATH) + artifactName: $(ENV_ARTIFACT_NAME) \ No newline at end of file diff --git a/.azure-pipelines/azure-pipelines-osx.yml b/.azure-pipelines/azure-pipelines-osx.yml new file mode 100755 index 00000000..6c6dade4 --- /dev/null +++ b/.azure-pipelines/azure-pipelines-osx.yml @@ -0,0 +1,83 @@ +# This file was generated automatically from conda-smithy. To update this configuration, +# update the conda-forge.yml and/or the recipe/meta.yaml. +# -*- mode: yaml -*- + +jobs: +- job: osx + pool: + vmImage: macOS-11 + strategy: + matrix: + osx_64_mpimpich: + CONFIG: osx_64_mpimpich + UPLOAD_PACKAGES: 'True' + SHORT_CONFIG: osx_64_mpimpich + osx_64_mpinompi: + CONFIG: osx_64_mpinompi + UPLOAD_PACKAGES: 'True' + SHORT_CONFIG: osx_64_mpinompi + osx_64_mpiopenmpi: + CONFIG: osx_64_mpiopenmpi + UPLOAD_PACKAGES: 'True' + SHORT_CONFIG: osx_64_mpiopenmpi + osx_arm64_mpimpich: + CONFIG: osx_arm64_mpimpich + UPLOAD_PACKAGES: 'True' + SHORT_CONFIG: osx_arm64_mpimpich + osx_arm64_mpinompi: + CONFIG: osx_arm64_mpinompi + UPLOAD_PACKAGES: 'True' + SHORT_CONFIG: osx_arm64_mpinompi + osx_arm64_mpiopenmpi: + CONFIG: osx_arm64_mpiopenmpi + UPLOAD_PACKAGES: 'True' + SHORT_CONFIG: osx_arm64_mpiopenmpi + timeoutInMinutes: 360 + + steps: + # TODO: Fast finish on azure pipelines? + - script: | + export CI=azure + export OSX_FORCE_SDK_DOWNLOAD="1" + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + if [[ "${BUILD_REASON:-}" == "PullRequest" ]]; then + export IS_PR_BUILD="True" + else + export IS_PR_BUILD="False" + fi + ./.scripts/run_osx_build.sh + displayName: Run OSX build + env: + BINSTAR_TOKEN: $(BINSTAR_TOKEN) + FEEDSTOCK_TOKEN: $(FEEDSTOCK_TOKEN) + STAGING_BINSTAR_TOKEN: $(STAGING_BINSTAR_TOKEN) + - script: | + export CI=azure + export CI_RUN_ID=$(build.BuildNumber).$(system.JobAttempt) + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + export CONDA_BLD_DIR=/Users/runner/miniforge3/conda-bld + export ARTIFACT_STAGING_DIR="$(Build.ArtifactStagingDirectory)" + # Archive everything in CONDA_BLD_DIR except environments + export BLD_ARTIFACT_PREFIX=conda_artifacts + if [[ "$AGENT_JOBSTATUS" == "Failed" ]]; then + # Archive the CONDA_BLD_DIR environments only when the job fails + export ENV_ARTIFACT_PREFIX=conda_envs + fi + ./.scripts/create_conda_build_artifacts.sh + displayName: Prepare conda build artifacts + condition: succeededOrFailed() + + - task: PublishPipelineArtifact@1 + displayName: Store conda build artifacts + condition: not(eq(variables.BLD_ARTIFACT_PATH, '')) + inputs: + targetPath: $(BLD_ARTIFACT_PATH) + artifactName: $(BLD_ARTIFACT_NAME) + + - task: PublishPipelineArtifact@1 + displayName: Store conda build environment artifacts + condition: not(eq(variables.ENV_ARTIFACT_PATH, '')) + inputs: + targetPath: $(ENV_ARTIFACT_PATH) + artifactName: $(ENV_ARTIFACT_NAME) \ No newline at end of file diff --git a/.azure-pipelines/azure-pipelines-win.yml b/.azure-pipelines/azure-pipelines-win.yml new file mode 100755 index 00000000..44f93bca --- /dev/null +++ b/.azure-pipelines/azure-pipelines-win.yml @@ -0,0 +1,114 @@ +# This file was generated automatically from conda-smithy. To update this configuration, +# update the conda-forge.yml and/or the recipe/meta.yaml. +# -*- mode: yaml -*- + +jobs: +- job: win + pool: + vmImage: windows-2022 + strategy: + matrix: + win_64_: + CONFIG: win_64_ + UPLOAD_PACKAGES: 'True' + SHORT_CONFIG: win_64_ + timeoutInMinutes: 360 + variables: + CONDA_BLD_PATH: D:\\bld\\ + 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/Mambaforge-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 activate base + mamba.exe install "python=3.10" conda-build conda pip boa conda-forge-ci-setup=3 -c conda-forge --strict-channel-priority --yes + displayName: Install conda-build + + - script: set PYTHONUNBUFFERED=1 + displayName: Set PYTHONUNBUFFERED + + # Configure the VM + - 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: | + call activate base + if EXIST LICENSE.txt ( + copy LICENSE.txt "recipe\\recipe-scripts-license.txt" + ) + conda.exe mambabuild "recipe" -m .ci_support\%CONFIG%.yaml --suppress-variables + displayName: Build recipe + env: + PYTHONUNBUFFERED: 1 + - script: | + set CI=azure + set CI_RUN_ID=$(build.BuildNumber).$(system.JobAttempt) + set FEEDSTOCK_NAME=$(build.Repository.Name) + set ARTIFACT_STAGING_DIR=$(Build.ArtifactStagingDirectory) + set CONDA_BLD_DIR=$(CONDA_BLD_PATH) + set BLD_ARTIFACT_PREFIX=conda_artifacts + if "%AGENT_JOBSTATUS%" == "Failed" ( + set ENV_ARTIFACT_PREFIX=conda_envs + ) + call ".scripts\create_conda_build_artifacts.bat" + displayName: Prepare conda build artifacts + condition: succeededOrFailed() + + - task: PublishPipelineArtifact@1 + displayName: Store conda build artifacts + condition: not(eq(variables.BLD_ARTIFACT_PATH, '')) + inputs: + targetPath: $(BLD_ARTIFACT_PATH) + artifactName: $(BLD_ARTIFACT_NAME) + + - task: PublishPipelineArtifact@1 + displayName: Store conda build environment artifacts + condition: not(eq(variables.ENV_ARTIFACT_PATH, '')) + inputs: + targetPath: $(ENV_ARTIFACT_PATH) + artifactName: $(ENV_ARTIFACT_NAME) + - script: | + set "FEEDSTOCK_NAME=%BUILD_REPOSITORY_NAME:*/=%" + call activate base + validate_recipe_outputs "%FEEDSTOCK_NAME%" + displayName: Validate Recipe Outputs + + - script: | + set "GIT_BRANCH=%BUILD_SOURCEBRANCHNAME%" + set "FEEDSTOCK_NAME=%BUILD_REPOSITORY_NAME:*/=%" + set "TEMP=$(UPLOAD_TEMP)" + if not exist "%TEMP%\" md "%TEMP%" + set "TMP=%TEMP%" + call activate base + upload_package --validate --feedstock-name="%FEEDSTOCK_NAME%" .\ ".\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')), not(eq(variables['Build.Reason'], 'PullRequest'))) \ No newline at end of file diff --git a/.ci_support/linux_64_mpimpich.yaml b/.ci_support/linux_64_mpimpich.yaml new file mode 100644 index 00000000..3a0c1c3e --- /dev/null +++ b/.ci_support/linux_64_mpimpich.yaml @@ -0,0 +1,45 @@ +bzip2: +- '1' +c_compiler: +- gcc +c_compiler_version: +- '11' +cdt_name: +- cos6 +channel_sources: +- conda-forge +channel_targets: +- conda-forge main +curl: +- '7' +cxx_compiler: +- gxx +cxx_compiler_version: +- '11' +docker_image: +- quay.io/condaforge/linux-anvil-cos7-x86_64 +hdf4: +- 4.2.15 +hdf5: +- 1.14.0 +libjpeg_turbo: +- 2.1.5 +libxml2: +- '2.10' +libzip: +- '1' +mpi: +- mpich +mpich: +- '4' +openmpi: +- '4' +target_platform: +- linux-64 +zip_keys: +- - c_compiler_version + - cxx_compiler_version +zlib: +- '1.2' +zstd: +- '1.5' diff --git a/.ci_support/linux_64_mpinompi.yaml b/.ci_support/linux_64_mpinompi.yaml new file mode 100644 index 00000000..59fd14de --- /dev/null +++ b/.ci_support/linux_64_mpinompi.yaml @@ -0,0 +1,45 @@ +bzip2: +- '1' +c_compiler: +- gcc +c_compiler_version: +- '11' +cdt_name: +- cos6 +channel_sources: +- conda-forge +channel_targets: +- conda-forge main +curl: +- '7' +cxx_compiler: +- gxx +cxx_compiler_version: +- '11' +docker_image: +- quay.io/condaforge/linux-anvil-cos7-x86_64 +hdf4: +- 4.2.15 +hdf5: +- 1.14.0 +libjpeg_turbo: +- 2.1.5 +libxml2: +- '2.10' +libzip: +- '1' +mpi: +- nompi +mpich: +- '4' +openmpi: +- '4' +target_platform: +- linux-64 +zip_keys: +- - c_compiler_version + - cxx_compiler_version +zlib: +- '1.2' +zstd: +- '1.5' diff --git a/.ci_support/linux_64_mpiopenmpi.yaml b/.ci_support/linux_64_mpiopenmpi.yaml new file mode 100644 index 00000000..c27d04b1 --- /dev/null +++ b/.ci_support/linux_64_mpiopenmpi.yaml @@ -0,0 +1,45 @@ +bzip2: +- '1' +c_compiler: +- gcc +c_compiler_version: +- '11' +cdt_name: +- cos6 +channel_sources: +- conda-forge +channel_targets: +- conda-forge main +curl: +- '7' +cxx_compiler: +- gxx +cxx_compiler_version: +- '11' +docker_image: +- quay.io/condaforge/linux-anvil-cos7-x86_64 +hdf4: +- 4.2.15 +hdf5: +- 1.14.0 +libjpeg_turbo: +- 2.1.5 +libxml2: +- '2.10' +libzip: +- '1' +mpi: +- openmpi +mpich: +- '4' +openmpi: +- '4' +target_platform: +- linux-64 +zip_keys: +- - c_compiler_version + - cxx_compiler_version +zlib: +- '1.2' +zstd: +- '1.5' diff --git a/.ci_support/linux_aarch64_mpimpich.yaml b/.ci_support/linux_aarch64_mpimpich.yaml new file mode 100644 index 00000000..dbfe1d2a --- /dev/null +++ b/.ci_support/linux_aarch64_mpimpich.yaml @@ -0,0 +1,49 @@ +BUILD: +- aarch64-conda_cos7-linux-gnu +bzip2: +- '1' +c_compiler: +- gcc +c_compiler_version: +- '11' +cdt_arch: +- aarch64 +cdt_name: +- cos7 +channel_sources: +- conda-forge +channel_targets: +- conda-forge main +curl: +- '7' +cxx_compiler: +- gxx +cxx_compiler_version: +- '11' +docker_image: +- quay.io/condaforge/linux-anvil-cos7-x86_64 +hdf4: +- 4.2.15 +hdf5: +- 1.14.0 +libjpeg_turbo: +- 2.1.5 +libxml2: +- '2.10' +libzip: +- '1' +mpi: +- mpich +mpich: +- '4' +openmpi: +- '4' +target_platform: +- linux-aarch64 +zip_keys: +- - c_compiler_version + - cxx_compiler_version +zlib: +- '1.2' +zstd: +- '1.5' diff --git a/.ci_support/linux_aarch64_mpinompi.yaml b/.ci_support/linux_aarch64_mpinompi.yaml new file mode 100644 index 00000000..9d41ef8b --- /dev/null +++ b/.ci_support/linux_aarch64_mpinompi.yaml @@ -0,0 +1,49 @@ +BUILD: +- aarch64-conda_cos7-linux-gnu +bzip2: +- '1' +c_compiler: +- gcc +c_compiler_version: +- '11' +cdt_arch: +- aarch64 +cdt_name: +- cos7 +channel_sources: +- conda-forge +channel_targets: +- conda-forge main +curl: +- '7' +cxx_compiler: +- gxx +cxx_compiler_version: +- '11' +docker_image: +- quay.io/condaforge/linux-anvil-cos7-x86_64 +hdf4: +- 4.2.15 +hdf5: +- 1.14.0 +libjpeg_turbo: +- 2.1.5 +libxml2: +- '2.10' +libzip: +- '1' +mpi: +- nompi +mpich: +- '4' +openmpi: +- '4' +target_platform: +- linux-aarch64 +zip_keys: +- - c_compiler_version + - cxx_compiler_version +zlib: +- '1.2' +zstd: +- '1.5' diff --git a/.ci_support/linux_aarch64_mpiopenmpi.yaml b/.ci_support/linux_aarch64_mpiopenmpi.yaml new file mode 100644 index 00000000..a2e1db5b --- /dev/null +++ b/.ci_support/linux_aarch64_mpiopenmpi.yaml @@ -0,0 +1,49 @@ +BUILD: +- aarch64-conda_cos7-linux-gnu +bzip2: +- '1' +c_compiler: +- gcc +c_compiler_version: +- '11' +cdt_arch: +- aarch64 +cdt_name: +- cos7 +channel_sources: +- conda-forge +channel_targets: +- conda-forge main +curl: +- '7' +cxx_compiler: +- gxx +cxx_compiler_version: +- '11' +docker_image: +- quay.io/condaforge/linux-anvil-cos7-x86_64 +hdf4: +- 4.2.15 +hdf5: +- 1.14.0 +libjpeg_turbo: +- 2.1.5 +libxml2: +- '2.10' +libzip: +- '1' +mpi: +- openmpi +mpich: +- '4' +openmpi: +- '4' +target_platform: +- linux-aarch64 +zip_keys: +- - c_compiler_version + - cxx_compiler_version +zlib: +- '1.2' +zstd: +- '1.5' diff --git a/.ci_support/linux_ppc64le_mpimpich.yaml b/.ci_support/linux_ppc64le_mpimpich.yaml new file mode 100644 index 00000000..f1427048 --- /dev/null +++ b/.ci_support/linux_ppc64le_mpimpich.yaml @@ -0,0 +1,45 @@ +bzip2: +- '1' +c_compiler: +- gcc +c_compiler_version: +- '11' +cdt_name: +- cos7 +channel_sources: +- conda-forge +channel_targets: +- conda-forge main +curl: +- '7' +cxx_compiler: +- gxx +cxx_compiler_version: +- '11' +docker_image: +- quay.io/condaforge/linux-anvil-cos7-x86_64 +hdf4: +- 4.2.15 +hdf5: +- 1.14.0 +libjpeg_turbo: +- 2.1.5 +libxml2: +- '2.10' +libzip: +- '1' +mpi: +- mpich +mpich: +- '4' +openmpi: +- '4' +target_platform: +- linux-ppc64le +zip_keys: +- - c_compiler_version + - cxx_compiler_version +zlib: +- '1.2' +zstd: +- '1.5' diff --git a/.ci_support/linux_ppc64le_mpinompi.yaml b/.ci_support/linux_ppc64le_mpinompi.yaml new file mode 100644 index 00000000..c70a3567 --- /dev/null +++ b/.ci_support/linux_ppc64le_mpinompi.yaml @@ -0,0 +1,45 @@ +bzip2: +- '1' +c_compiler: +- gcc +c_compiler_version: +- '11' +cdt_name: +- cos7 +channel_sources: +- conda-forge +channel_targets: +- conda-forge main +curl: +- '7' +cxx_compiler: +- gxx +cxx_compiler_version: +- '11' +docker_image: +- quay.io/condaforge/linux-anvil-cos7-x86_64 +hdf4: +- 4.2.15 +hdf5: +- 1.14.0 +libjpeg_turbo: +- 2.1.5 +libxml2: +- '2.10' +libzip: +- '1' +mpi: +- nompi +mpich: +- '4' +openmpi: +- '4' +target_platform: +- linux-ppc64le +zip_keys: +- - c_compiler_version + - cxx_compiler_version +zlib: +- '1.2' +zstd: +- '1.5' diff --git a/.ci_support/linux_ppc64le_mpiopenmpi.yaml b/.ci_support/linux_ppc64le_mpiopenmpi.yaml new file mode 100644 index 00000000..369dda6a --- /dev/null +++ b/.ci_support/linux_ppc64le_mpiopenmpi.yaml @@ -0,0 +1,45 @@ +bzip2: +- '1' +c_compiler: +- gcc +c_compiler_version: +- '11' +cdt_name: +- cos7 +channel_sources: +- conda-forge +channel_targets: +- conda-forge main +curl: +- '7' +cxx_compiler: +- gxx +cxx_compiler_version: +- '11' +docker_image: +- quay.io/condaforge/linux-anvil-cos7-x86_64 +hdf4: +- 4.2.15 +hdf5: +- 1.14.0 +libjpeg_turbo: +- 2.1.5 +libxml2: +- '2.10' +libzip: +- '1' +mpi: +- openmpi +mpich: +- '4' +openmpi: +- '4' +target_platform: +- linux-ppc64le +zip_keys: +- - c_compiler_version + - cxx_compiler_version +zlib: +- '1.2' +zstd: +- '1.5' diff --git a/.ci_support/osx_64_mpimpich.yaml b/.ci_support/osx_64_mpimpich.yaml new file mode 100644 index 00000000..eb6172b5 --- /dev/null +++ b/.ci_support/osx_64_mpimpich.yaml @@ -0,0 +1,45 @@ +MACOSX_DEPLOYMENT_TARGET: +- '10.9' +bzip2: +- '1' +c_compiler: +- clang +c_compiler_version: +- '14' +channel_sources: +- conda-forge +channel_targets: +- conda-forge main +curl: +- '7' +cxx_compiler: +- clangxx +cxx_compiler_version: +- '14' +hdf4: +- 4.2.15 +hdf5: +- 1.14.0 +libjpeg_turbo: +- 2.1.5 +libxml2: +- '2.10' +libzip: +- '1' +macos_machine: +- x86_64-apple-darwin13.4.0 +mpi: +- mpich +mpich: +- '4' +openmpi: +- '4' +target_platform: +- osx-64 +zip_keys: +- - c_compiler_version + - cxx_compiler_version +zlib: +- '1.2' +zstd: +- '1.5' diff --git a/.ci_support/osx_64_mpinompi.yaml b/.ci_support/osx_64_mpinompi.yaml new file mode 100644 index 00000000..33b72b98 --- /dev/null +++ b/.ci_support/osx_64_mpinompi.yaml @@ -0,0 +1,45 @@ +MACOSX_DEPLOYMENT_TARGET: +- '10.9' +bzip2: +- '1' +c_compiler: +- clang +c_compiler_version: +- '14' +channel_sources: +- conda-forge +channel_targets: +- conda-forge main +curl: +- '7' +cxx_compiler: +- clangxx +cxx_compiler_version: +- '14' +hdf4: +- 4.2.15 +hdf5: +- 1.14.0 +libjpeg_turbo: +- 2.1.5 +libxml2: +- '2.10' +libzip: +- '1' +macos_machine: +- x86_64-apple-darwin13.4.0 +mpi: +- nompi +mpich: +- '4' +openmpi: +- '4' +target_platform: +- osx-64 +zip_keys: +- - c_compiler_version + - cxx_compiler_version +zlib: +- '1.2' +zstd: +- '1.5' diff --git a/.ci_support/osx_64_mpiopenmpi.yaml b/.ci_support/osx_64_mpiopenmpi.yaml new file mode 100644 index 00000000..5b130c86 --- /dev/null +++ b/.ci_support/osx_64_mpiopenmpi.yaml @@ -0,0 +1,45 @@ +MACOSX_DEPLOYMENT_TARGET: +- '10.9' +bzip2: +- '1' +c_compiler: +- clang +c_compiler_version: +- '14' +channel_sources: +- conda-forge +channel_targets: +- conda-forge main +curl: +- '7' +cxx_compiler: +- clangxx +cxx_compiler_version: +- '14' +hdf4: +- 4.2.15 +hdf5: +- 1.14.0 +libjpeg_turbo: +- 2.1.5 +libxml2: +- '2.10' +libzip: +- '1' +macos_machine: +- x86_64-apple-darwin13.4.0 +mpi: +- openmpi +mpich: +- '4' +openmpi: +- '4' +target_platform: +- osx-64 +zip_keys: +- - c_compiler_version + - cxx_compiler_version +zlib: +- '1.2' +zstd: +- '1.5' diff --git a/.ci_support/osx_arm64_mpimpich.yaml b/.ci_support/osx_arm64_mpimpich.yaml new file mode 100644 index 00000000..531d573c --- /dev/null +++ b/.ci_support/osx_arm64_mpimpich.yaml @@ -0,0 +1,45 @@ +MACOSX_DEPLOYMENT_TARGET: +- '11.0' +bzip2: +- '1' +c_compiler: +- clang +c_compiler_version: +- '14' +channel_sources: +- conda-forge +channel_targets: +- conda-forge main +curl: +- '7' +cxx_compiler: +- clangxx +cxx_compiler_version: +- '14' +hdf4: +- 4.2.15 +hdf5: +- 1.14.0 +libjpeg_turbo: +- 2.1.5 +libxml2: +- '2.10' +libzip: +- '1' +macos_machine: +- arm64-apple-darwin20.0.0 +mpi: +- mpich +mpich: +- '4' +openmpi: +- '4' +target_platform: +- osx-arm64 +zip_keys: +- - c_compiler_version + - cxx_compiler_version +zlib: +- '1.2' +zstd: +- '1.5' diff --git a/.ci_support/osx_arm64_mpinompi.yaml b/.ci_support/osx_arm64_mpinompi.yaml new file mode 100644 index 00000000..855af9ee --- /dev/null +++ b/.ci_support/osx_arm64_mpinompi.yaml @@ -0,0 +1,45 @@ +MACOSX_DEPLOYMENT_TARGET: +- '11.0' +bzip2: +- '1' +c_compiler: +- clang +c_compiler_version: +- '14' +channel_sources: +- conda-forge +channel_targets: +- conda-forge main +curl: +- '7' +cxx_compiler: +- clangxx +cxx_compiler_version: +- '14' +hdf4: +- 4.2.15 +hdf5: +- 1.14.0 +libjpeg_turbo: +- 2.1.5 +libxml2: +- '2.10' +libzip: +- '1' +macos_machine: +- arm64-apple-darwin20.0.0 +mpi: +- nompi +mpich: +- '4' +openmpi: +- '4' +target_platform: +- osx-arm64 +zip_keys: +- - c_compiler_version + - cxx_compiler_version +zlib: +- '1.2' +zstd: +- '1.5' diff --git a/.ci_support/osx_arm64_mpiopenmpi.yaml b/.ci_support/osx_arm64_mpiopenmpi.yaml new file mode 100644 index 00000000..c9279699 --- /dev/null +++ b/.ci_support/osx_arm64_mpiopenmpi.yaml @@ -0,0 +1,45 @@ +MACOSX_DEPLOYMENT_TARGET: +- '11.0' +bzip2: +- '1' +c_compiler: +- clang +c_compiler_version: +- '14' +channel_sources: +- conda-forge +channel_targets: +- conda-forge main +curl: +- '7' +cxx_compiler: +- clangxx +cxx_compiler_version: +- '14' +hdf4: +- 4.2.15 +hdf5: +- 1.14.0 +libjpeg_turbo: +- 2.1.5 +libxml2: +- '2.10' +libzip: +- '1' +macos_machine: +- arm64-apple-darwin20.0.0 +mpi: +- openmpi +mpich: +- '4' +openmpi: +- '4' +target_platform: +- osx-arm64 +zip_keys: +- - c_compiler_version + - cxx_compiler_version +zlib: +- '1.2' +zstd: +- '1.5' diff --git a/.ci_support/win_64_.yaml b/.ci_support/win_64_.yaml new file mode 100644 index 00000000..898b9815 --- /dev/null +++ b/.ci_support/win_64_.yaml @@ -0,0 +1,36 @@ +bzip2: +- '1' +c_compiler: +- vs2019 +channel_sources: +- conda-forge +channel_targets: +- conda-forge main +curl: +- '7' +cxx_compiler: +- vs2019 +hdf4: +- 4.2.15 +hdf5: +- 1.14.0 +libjpeg_turbo: +- 2.1.5 +libxml2: +- '2.10' +libzip: +- '1' +mpi: +- nompi +mpich: +- '4' +openmpi: +- '4' +target_platform: +- win-64 +vc: +- '14' +zlib: +- '1.2' +zstd: +- '1.5' diff --git a/.scripts/build_steps.sh b/.scripts/build_steps.sh new file mode 100755 index 00000000..a6b09f6b --- /dev/null +++ b/.scripts/build_steps.sh @@ -0,0 +1,90 @@ +#!/usr/bin/env bash + +# PLEASE NOTE: This script has been automatically generated by conda-smithy. Any changes here +# will be lost next time ``conda smithy rerender`` is run. If you would like to make permanent +# changes to this script, consider a proposal to conda-smithy so that other feedstocks can also +# benefit from the improvement. + +# -*- mode: jinja-shell -*- + +set -xeuo pipefail +export FEEDSTOCK_ROOT="${FEEDSTOCK_ROOT:-/home/conda/feedstock_root}" +source ${FEEDSTOCK_ROOT}/.scripts/logging_utils.sh + + +( endgroup "Start Docker" ) 2> /dev/null + +( startgroup "Configuring conda" ) 2> /dev/null + +export PYTHONUNBUFFERED=1 +export RECIPE_ROOT="${RECIPE_ROOT:-/home/conda/recipe_root}" +export CI_SUPPORT="${FEEDSTOCK_ROOT}/.ci_support" +export CONFIG_FILE="${CI_SUPPORT}/${CONFIG}.yaml" + +cat >~/.condarc < /dev/null + +if [[ -f "${FEEDSTOCK_ROOT}/LICENSE.txt" ]]; then + cp "${FEEDSTOCK_ROOT}/LICENSE.txt" "${RECIPE_ROOT}/recipe-scripts-license.txt" +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}" + fi + conda debug "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \ + ${EXTRA_CB_OPTIONS:-} \ + --clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml" + + # Drop into an interactive shell + /bin/bash +else + conda mambabuild "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \ + --suppress-variables ${EXTRA_CB_OPTIONS:-} \ + --clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml" + ( startgroup "Validating outputs" ) 2> /dev/null + + validate_recipe_outputs "${FEEDSTOCK_NAME}" + + ( endgroup "Validating outputs" ) 2> /dev/null + + ( startgroup "Uploading packages" ) 2> /dev/null + + if [[ "${UPLOAD_PACKAGES}" != "False" ]] && [[ "${IS_PR_BUILD}" == "False" ]]; then + upload_package --validate --feedstock-name="${FEEDSTOCK_NAME}" "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" + fi + + ( endgroup "Uploading packages" ) 2> /dev/null +fi + +( startgroup "Final checks" ) 2> /dev/null + +touch "${FEEDSTOCK_ROOT}/build_artifacts/conda-forge-build-done-${CONFIG}" \ No newline at end of file diff --git a/.scripts/create_conda_build_artifacts.bat b/.scripts/create_conda_build_artifacts.bat new file mode 100755 index 00000000..2853cfdc --- /dev/null +++ b/.scripts/create_conda_build_artifacts.bat @@ -0,0 +1,80 @@ +setlocal enableextensions enabledelayedexpansion + +rem INPUTS (environment variables that need to be set before calling this script): +rem +rem CI (azure/github_actions/UNSET) +rem CI_RUN_ID (unique identifier for the CI job run) +rem FEEDSTOCK_NAME +rem CONFIG (build matrix configuration string) +rem SHORT_CONFIG (uniquely-shortened configuration string) +rem CONDA_BLD_DIR (path to the conda-bld directory) +rem ARTIFACT_STAGING_DIR (use working directory if unset) +rem BLD_ARTIFACT_PREFIX (prefix for the conda build artifact name, skip if unset) +rem ENV_ARTIFACT_PREFIX (prefix for the conda build environments artifact name, skip if unset) + +rem OUTPUTS +rem +rem BLD_ARTIFACT_NAME +rem BLD_ARTIFACT_PATH +rem ENV_ARTIFACT_NAME +rem ENV_ARTIFACT_PATH + +rem Check that the conda-build directory exists +if not exist %CONDA_BLD_DIR% ( + echo conda-build directory does not exist + exit 1 +) + +if not defined ARTIFACT_STAGING_DIR ( + rem Set staging dir to the working dir + set ARTIFACT_STAGING_DIR=%cd% +) + +rem Set a unique ID for the artifact(s), specialized for this particular job run +set ARTIFACT_UNIQUE_ID=%CI_RUN_ID%_%CONFIG% +if not "%ARTIFACT_UNIQUE_ID%" == "%ARTIFACT_UNIQUE_ID:~0,80%" ( + set ARTIFACT_UNIQUE_ID=%CI_RUN_ID%_%SHORT_CONFIG% +) + +rem Set a descriptive ID for the archive(s), specialized for this particular job run +set ARCHIVE_UNIQUE_ID=%CI_RUN_ID%_%CONFIG% + +rem Make the build artifact zip +if defined BLD_ARTIFACT_PREFIX ( + set BLD_ARTIFACT_NAME=%BLD_ARTIFACT_PREFIX%_%ARTIFACT_UNIQUE_ID% + echo BLD_ARTIFACT_NAME: !BLD_ARTIFACT_NAME! + + set "BLD_ARTIFACT_PATH=%ARTIFACT_STAGING_DIR%\%FEEDSTOCK_NAME%_%BLD_ARTIFACT_PREFIX%_%ARCHIVE_UNIQUE_ID%.zip" + 7z a "!BLD_ARTIFACT_PATH!" "%CONDA_BLD_DIR%" -xr^^!.git/ -xr^^!_*_env*/ -xr^^!*_cache/ -bb + if errorlevel 1 exit 1 + echo BLD_ARTIFACT_PATH: !BLD_ARTIFACT_PATH! + + if "%CI%" == "azure" ( + echo ##vso[task.setVariable variable=BLD_ARTIFACT_NAME]!BLD_ARTIFACT_NAME! + echo ##vso[task.setVariable variable=BLD_ARTIFACT_PATH]!BLD_ARTIFACT_PATH! + ) + if "%CI%" == "github_actions" ( + echo BLD_ARTIFACT_NAME=!BLD_ARTIFACT_NAME!>> !GITHUB_OUTPUT! + echo BLD_ARTIFACT_PATH=!BLD_ARTIFACT_PATH!>> !GITHUB_OUTPUT! + ) +) + +rem Make the environments artifact zip +if defined ENV_ARTIFACT_PREFIX ( + set ENV_ARTIFACT_NAME=!ENV_ARTIFACT_PREFIX!_%ARTIFACT_UNIQUE_ID% + echo ENV_ARTIFACT_NAME: !ENV_ARTIFACT_NAME! + + set "ENV_ARTIFACT_PATH=%ARTIFACT_STAGING_DIR%\%FEEDSTOCK_NAME%_%ENV_ARTIFACT_PREFIX%_%ARCHIVE_UNIQUE_ID%.zip" + 7z a "!ENV_ARTIFACT_PATH!" -r "%CONDA_BLD_DIR%"/_*_env*/ -bb + if errorlevel 1 exit 1 + echo ENV_ARTIFACT_PATH: !ENV_ARTIFACT_PATH! + + if "%CI%" == "azure" ( + echo ##vso[task.setVariable variable=ENV_ARTIFACT_NAME]!ENV_ARTIFACT_NAME! + echo ##vso[task.setVariable variable=ENV_ARTIFACT_PATH]!ENV_ARTIFACT_PATH! + ) + if "%CI%" == "github_actions" ( + echo ENV_ARTIFACT_NAME=!ENV_ARTIFACT_NAME!>> !GITHUB_OUTPUT! + echo ENV_ARTIFACT_PATH=!ENV_ARTIFACT_PATH!>> !GITHUB_OUTPUT! + ) +) \ No newline at end of file diff --git a/.scripts/create_conda_build_artifacts.sh b/.scripts/create_conda_build_artifacts.sh new file mode 100755 index 00000000..17ec0868 --- /dev/null +++ b/.scripts/create_conda_build_artifacts.sh @@ -0,0 +1,113 @@ +#!/usr/bin/env bash + +# INPUTS (environment variables that need to be set before calling this script): +# +# CI (azure/github_actions/UNSET) +# CI_RUN_ID (unique identifier for the CI job run) +# FEEDSTOCK_NAME +# CONFIG (build matrix configuration string) +# SHORT_CONFIG (uniquely-shortened configuration string) +# CONDA_BLD_DIR (path to the conda-bld directory) +# ARTIFACT_STAGING_DIR (use working directory if unset) +# BLD_ARTIFACT_PREFIX (prefix for the conda build artifact name, skip if unset) +# ENV_ARTIFACT_PREFIX (prefix for the conda build environments artifact name, skip if unset) + +# OUTPUTS +# +# BLD_ARTIFACT_NAME +# BLD_ARTIFACT_PATH +# ENV_ARTIFACT_NAME +# ENV_ARTIFACT_PATH + +source .scripts/logging_utils.sh + +# DON'T do set -x, because it results in double echo-ing pipeline commands +# and that might end up inserting extraneous quotation marks in output variables +set -e + +# Check that the conda-build directory exists +if [ ! -d "$CONDA_BLD_DIR" ]; then + echo "conda-build directory does not exist" + exit 1 +fi + +# Set staging dir to the working dir, in Windows style if applicable +if [[ -z "${ARTIFACT_STAGING_DIR}" ]]; then + if pwd -W; then + ARTIFACT_STAGING_DIR=$(pwd -W) + else + ARTIFACT_STAGING_DIR=$PWD + fi +fi +echo "ARTIFACT_STAGING_DIR: $ARTIFACT_STAGING_DIR" + +FEEDSTOCK_ROOT=$(cd "$(dirname "$0")/.."; pwd;) +if [ -z ${FEEDSTOCK_NAME} ]; then + export FEEDSTOCK_NAME=$(basename ${FEEDSTOCK_ROOT}) +fi + +# Set a unique ID for the artifact(s), specialized for this particular job run +ARTIFACT_UNIQUE_ID="${CI_RUN_ID}_${CONFIG}" +if [[ ${#ARTIFACT_UNIQUE_ID} -gt 80 ]]; then + ARTIFACT_UNIQUE_ID="${CI_RUN_ID}_${SHORT_CONFIG}" +fi +echo "ARTIFACT_UNIQUE_ID: $ARTIFACT_UNIQUE_ID" + +# Set a descriptive ID for the archive(s), specialized for this particular job run +ARCHIVE_UNIQUE_ID="${CI_RUN_ID}_${CONFIG}" + +# Make the build artifact zip +if [[ ! -z "$BLD_ARTIFACT_PREFIX" ]]; then + export BLD_ARTIFACT_NAME="${BLD_ARTIFACT_PREFIX}_${ARTIFACT_UNIQUE_ID}" + export BLD_ARTIFACT_PATH="${ARTIFACT_STAGING_DIR}/${FEEDSTOCK_NAME}_${BLD_ARTIFACT_PREFIX}_${ARCHIVE_UNIQUE_ID}.zip" + + ( startgroup "Archive conda build directory" ) 2> /dev/null + + # Try 7z and fall back to zip if it fails (for cross-platform use) + if ! 7z a "$BLD_ARTIFACT_PATH" "$CONDA_BLD_DIR" '-xr!.git/' '-xr!_*_env*/' '-xr!*_cache/' -bb; then + pushd "$CONDA_BLD_DIR" + zip -r -y -T "$BLD_ARTIFACT_PATH" . -x '*.git/*' '*_*_env*/*' '*_cache/*' + popd + fi + + ( endgroup "Archive conda build directory" ) 2> /dev/null + + echo "BLD_ARTIFACT_NAME: $BLD_ARTIFACT_NAME" + echo "BLD_ARTIFACT_PATH: $BLD_ARTIFACT_PATH" + + if [[ "$CI" == "azure" ]]; then + echo "##vso[task.setVariable variable=BLD_ARTIFACT_NAME]$BLD_ARTIFACT_NAME" + echo "##vso[task.setVariable variable=BLD_ARTIFACT_PATH]$BLD_ARTIFACT_PATH" + elif [[ "$CI" == "github_actions" ]]; then + echo "BLD_ARTIFACT_NAME=$BLD_ARTIFACT_NAME" >> $GITHUB_OUTPUT + echo "BLD_ARTIFACT_PATH=$BLD_ARTIFACT_PATH" >> $GITHUB_OUTPUT + fi +fi + +# Make the environments artifact zip +if [[ ! -z "$ENV_ARTIFACT_PREFIX" ]]; then + export ENV_ARTIFACT_NAME="${ENV_ARTIFACT_PREFIX}_${ARTIFACT_UNIQUE_ID}" + export ENV_ARTIFACT_PATH="${ARTIFACT_STAGING_DIR}/${FEEDSTOCK_NAME}_${ENV_ARTIFACT_PREFIX}_${ARCHIVE_UNIQUE_ID}.zip" + + ( startgroup "Archive conda build environments" ) 2> /dev/null + + # Try 7z and fall back to zip if it fails (for cross-platform use) + if ! 7z a "$ENV_ARTIFACT_PATH" -r "$CONDA_BLD_DIR"/'_*_env*/' -bb; then + pushd "$CONDA_BLD_DIR" + zip -r -y -T "$ENV_ARTIFACT_PATH" . -i '*_*_env*/*' + popd + fi + + ( endgroup "Archive conda build environments" ) 2> /dev/null + + echo "ENV_ARTIFACT_NAME: $ENV_ARTIFACT_NAME" + echo "ENV_ARTIFACT_PATH: $ENV_ARTIFACT_PATH" + + if [[ "$CI" == "azure" ]]; then + echo "##vso[task.setVariable variable=ENV_ARTIFACT_NAME]$ENV_ARTIFACT_NAME" + echo "##vso[task.setVariable variable=ENV_ARTIFACT_PATH]$ENV_ARTIFACT_PATH" + elif [[ "$CI" == "github_actions" ]]; then + echo "ENV_ARTIFACT_NAME=$ENV_ARTIFACT_NAME" >> $GITHUB_OUTPUT + echo "ENV_ARTIFACT_PATH=$ENV_ARTIFACT_PATH" >> $GITHUB_OUTPUT + fi +fi \ No newline at end of file diff --git a/.scripts/run_docker_build.sh b/.scripts/run_docker_build.sh new file mode 100755 index 00000000..92362398 --- /dev/null +++ b/.scripts/run_docker_build.sh @@ -0,0 +1,105 @@ +#!/usr/bin/env bash + +# PLEASE NOTE: This script has been automatically generated by conda-smithy. Any changes here +# will be lost next time ``conda smithy rerender`` is run. If you would like to make permanent +# changes to this script, consider a proposal to conda-smithy so that other feedstocks can also +# benefit from the improvement. + +source .scripts/logging_utils.sh + +( startgroup "Configure Docker" ) 2> /dev/null + +set -xeo pipefail + +THISDIR="$( cd "$( dirname "$0" )" >/dev/null && pwd )" +PROVIDER_DIR="$(basename $THISDIR)" + +FEEDSTOCK_ROOT="$( cd "$( dirname "$0" )/.." >/dev/null && pwd )" +RECIPE_ROOT="${FEEDSTOCK_ROOT}/recipe" + +if [ -z ${FEEDSTOCK_NAME} ]; then + export FEEDSTOCK_NAME=$(basename ${FEEDSTOCK_ROOT}) +fi + +docker info + +# In order for the conda-build process in the container to write to the mounted +# volumes, we need to run with the same id as the host machine, which is +# normally the owner of the mounted volumes, or at least has write permission +export HOST_USER_ID=$(id -u) +# Check if docker-machine is being used (normally on OSX) and get the uid from +# the VM +if hash docker-machine 2> /dev/null && docker-machine active > /dev/null; then + export HOST_USER_ID=$(docker-machine ssh $(docker-machine active) id -u) +fi + +ARTIFACTS="$FEEDSTOCK_ROOT/build_artifacts" + +if [ -z "$CONFIG" ]; then + set +x + FILES=`ls .ci_support/linux_*` + CONFIGS="" + for file in $FILES; do + CONFIGS="${CONFIGS}'${file:12:-5}' or "; + done + echo "Need to set CONFIG env variable. Value can be one of ${CONFIGS:0:-4}" + exit 1 +fi + +if [ -z "${DOCKER_IMAGE}" ]; then + SHYAML_INSTALLED="$(shyaml -h || echo NO)" + if [ "${SHYAML_INSTALLED}" == "NO" ]; then + echo "WARNING: DOCKER_IMAGE variable not set and shyaml not installed. Trying to parse with coreutils" + DOCKER_IMAGE=$(cat .ci_support/${CONFIG}.yaml | grep '^docker_image:$' -A 1 | tail -n 1 | cut -b 3-) + if [ "${DOCKER_IMAGE}" = "" ]; then + echo "No docker_image entry found in ${CONFIG}. Falling back to quay.io/condaforge/linux-anvil-comp7" + DOCKER_IMAGE="quay.io/condaforge/linux-anvil-comp7" + fi + else + DOCKER_IMAGE="$(cat "${FEEDSTOCK_ROOT}/.ci_support/${CONFIG}.yaml" | shyaml get-value docker_image.0 quay.io/condaforge/linux-anvil-comp7 )" + fi +fi + +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}" +fi + +( endgroup "Configure Docker" ) 2> /dev/null + +( startgroup "Start Docker" ) 2> /dev/null + +export UPLOAD_PACKAGES="${UPLOAD_PACKAGES:-True}" +export IS_PR_BUILD="${IS_PR_BUILD:-False}" +docker pull "${DOCKER_IMAGE}" +docker run ${DOCKER_RUN_ARGS} \ + -v "${RECIPE_ROOT}":/home/conda/recipe_root:rw,z,delegated \ + -v "${FEEDSTOCK_ROOT}":/home/conda/feedstock_root:rw,z,delegated \ + -e CONFIG \ + -e HOST_USER_ID \ + -e UPLOAD_PACKAGES \ + -e IS_PR_BUILD \ + -e GIT_BRANCH \ + -e UPLOAD_ON_BRANCH \ + -e CI \ + -e FEEDSTOCK_NAME \ + -e CPU_COUNT \ + -e BUILD_WITH_CONDA_DEBUG \ + -e BUILD_OUTPUT_ID \ + -e BINSTAR_TOKEN \ + -e FEEDSTOCK_TOKEN \ + -e STAGING_BINSTAR_TOKEN \ + "${DOCKER_IMAGE}" \ + bash \ + "/home/conda/feedstock_root/${PROVIDER_DIR}/build_steps.sh" + +# verify that the end of the script was reached +test -f "$DONE_CANARY" + +# This closes the last group opened in `build_steps.sh` +( endgroup "Final checks" ) 2> /dev/null \ No newline at end of file diff --git a/.scripts/run_osx_build.sh b/.scripts/run_osx_build.sh new file mode 100755 index 00000000..bb00584b --- /dev/null +++ b/.scripts/run_osx_build.sh @@ -0,0 +1,94 @@ +#!/usr/bin/env bash + +# -*- mode: jinja-shell -*- + +source .scripts/logging_utils.sh + +set -xe + +MINIFORGE_HOME=${MINIFORGE_HOME:-${HOME}/miniforge3} + +( startgroup "Installing a fresh version of Miniforge" ) 2> /dev/null + +MINIFORGE_URL="https://github.com/conda-forge/miniforge/releases/latest/download" +MINIFORGE_FILE="Mambaforge-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 "Configuring conda" ) 2> /dev/null + +source ${MINIFORGE_HOME}/etc/profile.d/conda.sh +conda activate base + +mamba install --update-specs --quiet --yes --channel conda-forge \ + conda-build pip boa conda-forge-ci-setup=3 +mamba update --update-specs --yes --quiet --channel conda-forge \ + conda-build pip boa conda-forge-ci-setup=3 + + + +echo -e "\n\nSetting up the condarc and mangling the compiler." +setup_conda_rc ./ ./recipe ./.ci_support/${CONFIG}.yaml + +if [[ "${CI:-}" != "" ]]; then + mangle_compiler ./ ./recipe .ci_support/${CONFIG}.yaml +fi + +if [[ "${CI:-}" != "" ]]; then + echo -e "\n\nMangling homebrew in the CI to avoid conflicts." + /usr/bin/sudo mangle_homebrew + /usr/bin/sudo -k +else + echo -e "\n\nNot mangling homebrew as we are not running in CI" +fi + +echo -e "\n\nRunning the build setup script." +source run_conda_forge_build_setup + + + +( endgroup "Configuring conda" ) 2> /dev/null + +echo -e "\n\nMaking the build clobber file" +make_build_number ./ ./recipe ./.ci_support/${CONFIG}.yaml + +if [[ "${HOST_PLATFORM}" != "${BUILD_PLATFORM}" ]]; then + EXTRA_CB_OPTIONS="${EXTRA_CB_OPTIONS:-} --no-test" +fi + + +if [[ -f LICENSE.txt ]]; then + cp LICENSE.txt "recipe/recipe-scripts-license.txt" +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}" + fi + conda debug ./recipe -m ./.ci_support/${CONFIG}.yaml \ + ${EXTRA_CB_OPTIONS:-} \ + --clobber-file ./.ci_support/clobber_${CONFIG}.yaml + + # Drop into an interactive shell + /bin/bash +else + conda mambabuild ./recipe -m ./.ci_support/${CONFIG}.yaml \ + --suppress-variables ${EXTRA_CB_OPTIONS:-} \ + --clobber-file ./.ci_support/clobber_${CONFIG}.yaml + ( startgroup "Validating outputs" ) 2> /dev/null + + validate_recipe_outputs "${FEEDSTOCK_NAME}" + + ( endgroup "Validating outputs" ) 2> /dev/null + + ( startgroup "Uploading packages" ) 2> /dev/null + + if [[ "${UPLOAD_PACKAGES}" != "False" ]] && [[ "${IS_PR_BUILD}" == "False" ]]; then + upload_package --validate --feedstock-name="${FEEDSTOCK_NAME}" ./ ./recipe ./.ci_support/${CONFIG}.yaml + fi + + ( endgroup "Uploading packages" ) 2> /dev/null +fi \ No newline at end of file From 0a19f0e5637f05e3fe3112aea65f5f22a2d2881d Mon Sep 17 00:00:00 2001 From: Klaus Zimmermann Date: Mon, 27 Mar 2023 16:57:56 +0200 Subject: [PATCH 06/12] Fix quoting problem --- recipe/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/build.sh b/recipe/build.sh index 06daeb5b..68878bba 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -54,7 +54,7 @@ fi # https://github.com/Unidata/netcdf-c/issues/2188#issuecomment-1015927961 # -DENABLE_DAP_REMOTE_TESTS=OFF -export HDF5_PLUGIN_PATH=$(echo "H5_DEFAULT_PLUGINDIR" | $CPP -P -include $PREFIX/include/H5pubconf.h -) +export HDF5_PLUGIN_PATH=$(echo "H5_DEFAULT_PLUGINDIR" | $CPP -P -include $PREFIX/include/H5pubconf.h - | tr -d '"') mkdir build-shared cd build-shared From f5db3711328965ddf3a4edf004d69e84e6e7b18c Mon Sep 17 00:00:00 2001 From: Klaus Zimmermann Date: Mon, 27 Mar 2023 17:07:37 +0200 Subject: [PATCH 07/12] Explicitly set plugin install dir --- recipe/build.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/recipe/build.sh b/recipe/build.sh index 68878bba..bffb7f87 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -68,6 +68,7 @@ cmake ${CMAKE_ARGS} \ -DENABLE_NETCDF_4=ON \ -DBUILD_SHARED_LIBS=ON \ -DENABLE_PLUGIN_INSTALL=ON \ + -DPLUGIN_INSTALL_DIR=${HDF5_PLUGIN_PATH} \ -DENABLE_TESTS=ON \ -DBUILD_UTILITIES=ON \ -DENABLE_DOXYGEN=OFF \ From 4266a27206636dd115ed6582f36c3cedffc377b8 Mon Sep 17 00:00:00 2001 From: Klaus Zimmermann Date: Mon, 27 Mar 2023 17:27:23 +0200 Subject: [PATCH 08/12] Add blosc --- recipe/meta.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index a60513fb..999d137b 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -78,6 +78,7 @@ requirements: - libzip - zstd - libxml2 + - blosc run: - {{ mpi }} # [mpi != 'nompi'] - curl From bceeea1e1e46850092096c77446a99b83d8a1d5f Mon Sep 17 00:00:00 2001 From: Klaus Zimmermann Date: Wed, 29 Mar 2023 10:22:11 +0200 Subject: [PATCH 09/12] Use clang-cpp on osx --- recipe/build.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/recipe/build.sh b/recipe/build.sh index bffb7f87..130c978b 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -47,6 +47,9 @@ if [[ ${HOST} =~ .*darwin.* ]]; then # (symbol in a section other than those above according to man nm), instead though # or to fix ld64 so that it checks for symbols being used in this section). export LDFLAGS=$(echo "${LDFLAGS}" | sed "s/-Wl,-dead_strip_dylibs//g") + export HDF5_PLUGIN_PATH=$(echo "H5_DEFAULT_PLUGINDIR" | clang-cpp -P -include $PREFIX/include/H5pubconf.h - | tr -d '"') +else + export HDF5_PLUGIN_PATH=$(echo "H5_DEFAULT_PLUGINDIR" | $CPP -P -include $PREFIX/include/H5pubconf.h - | tr -d '"') fi # 2022/04/25 @@ -54,7 +57,6 @@ fi # https://github.com/Unidata/netcdf-c/issues/2188#issuecomment-1015927961 # -DENABLE_DAP_REMOTE_TESTS=OFF -export HDF5_PLUGIN_PATH=$(echo "H5_DEFAULT_PLUGINDIR" | $CPP -P -include $PREFIX/include/H5pubconf.h - | tr -d '"') mkdir build-shared cd build-shared From b34ae05021657a329a0fb52b924913265b397e8b Mon Sep 17 00:00:00 2001 From: Klaus Zimmermann Date: Wed, 29 Mar 2023 11:19:36 +0200 Subject: [PATCH 10/12] Activate plugin installation on Windows --- recipe/bld.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/bld.bat b/recipe/bld.bat index 87a0864a..f3f0ca8c 100644 --- a/recipe/bld.bat +++ b/recipe/bld.bat @@ -9,6 +9,7 @@ rem manually specify hdf5 paths to work-around https://github.com/Unidata/netcdf cmake -LAH -G "NMake Makefiles" ^ -DCMAKE_INSTALL_PREFIX="%LIBRARY_PREFIX%" ^ -DBUILD_SHARED_LIBS=ON ^ + -DPLUGIN_INSTALL_DIR=YES ^ -DENABLE_TESTS=ON ^ -DENABLE_HDF4=ON ^ -DCMAKE_PREFIX_PATH="%LIBRARY_PREFIX%" ^ @@ -42,4 +43,3 @@ goto end_tests :vc9_tests ctest -VV :end_tests - From c78591a2365626ae7cef97853bf2d55d52a3906f Mon Sep 17 00:00:00 2001 From: Klaus Zimmermann Date: Wed, 29 Mar 2023 11:49:26 +0200 Subject: [PATCH 11/12] Remove artifact storage --- conda-forge.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/conda-forge.yml b/conda-forge.yml index e99f8cf7..092b9fdf 100644 --- a/conda-forge.yml +++ b/conda-forge.yml @@ -12,5 +12,3 @@ provider: linux_aarch64: default linux_ppc64le: default test_on_native_only: true -azure: - store_build_artifacts: true From c2bec504527390aeded5763b4dd31836c489f115 Mon Sep 17 00:00:00 2001 From: Klaus Zimmermann Date: Wed, 29 Mar 2023 11:50:37 +0200 Subject: [PATCH 12/12] MNT: Re-rendered with conda-build 3.23.3, conda-smithy 3.23.1, and conda-forge-pinning 2023.03.29.08.25.52 --- .azure-pipelines/azure-pipelines-linux.yml | 40 +------- .azure-pipelines/azure-pipelines-osx.yml | 37 +------ .azure-pipelines/azure-pipelines-win.yml | 28 ----- .scripts/create_conda_build_artifacts.bat | 80 --------------- .scripts/create_conda_build_artifacts.sh | 113 --------------------- 5 files changed, 2 insertions(+), 296 deletions(-) delete mode 100755 .scripts/create_conda_build_artifacts.bat delete mode 100755 .scripts/create_conda_build_artifacts.sh diff --git a/.azure-pipelines/azure-pipelines-linux.yml b/.azure-pipelines/azure-pipelines-linux.yml index 029a45e1..eea1bef7 100755 --- a/.azure-pipelines/azure-pipelines-linux.yml +++ b/.azure-pipelines/azure-pipelines-linux.yml @@ -12,47 +12,38 @@ jobs: CONFIG: linux_64_mpimpich UPLOAD_PACKAGES: 'True' DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 - SHORT_CONFIG: linux_64_mpimpich linux_64_mpinompi: CONFIG: linux_64_mpinompi UPLOAD_PACKAGES: 'True' DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 - SHORT_CONFIG: linux_64_mpinompi linux_64_mpiopenmpi: CONFIG: linux_64_mpiopenmpi UPLOAD_PACKAGES: 'True' DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 - SHORT_CONFIG: linux_64_mpiopenmpi linux_aarch64_mpimpich: CONFIG: linux_aarch64_mpimpich UPLOAD_PACKAGES: 'True' DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 - SHORT_CONFIG: linux_aarch64_mpimpich linux_aarch64_mpinompi: CONFIG: linux_aarch64_mpinompi UPLOAD_PACKAGES: 'True' DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 - SHORT_CONFIG: linux_aarch64_mpinompi linux_aarch64_mpiopenmpi: CONFIG: linux_aarch64_mpiopenmpi UPLOAD_PACKAGES: 'True' DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 - SHORT_CONFIG: linux_aarch64_mpiopenmpi linux_ppc64le_mpimpich: CONFIG: linux_ppc64le_mpimpich UPLOAD_PACKAGES: 'True' DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 - SHORT_CONFIG: linux_ppc64le_mpimpich linux_ppc64le_mpinompi: CONFIG: linux_ppc64le_mpinompi UPLOAD_PACKAGES: 'True' DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 - SHORT_CONFIG: linux_ppc64le_mpinompi linux_ppc64le_mpiopenmpi: CONFIG: linux_ppc64le_mpiopenmpi UPLOAD_PACKAGES: 'True' DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 - SHORT_CONFIG: linux_ppc64le_mpiopenmpi timeoutInMinutes: 360 steps: @@ -83,33 +74,4 @@ jobs: env: BINSTAR_TOKEN: $(BINSTAR_TOKEN) FEEDSTOCK_TOKEN: $(FEEDSTOCK_TOKEN) - STAGING_BINSTAR_TOKEN: $(STAGING_BINSTAR_TOKEN) - - script: | - export CI=azure - export CI_RUN_ID=$(build.BuildNumber).$(system.JobAttempt) - export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) - export CONDA_BLD_DIR=build_artifacts - export ARTIFACT_STAGING_DIR="$(Build.ArtifactStagingDirectory)" - # Archive everything in CONDA_BLD_DIR except environments - export BLD_ARTIFACT_PREFIX=conda_artifacts - if [[ "$AGENT_JOBSTATUS" == "Failed" ]]; then - # Archive the CONDA_BLD_DIR environments only when the job fails - export ENV_ARTIFACT_PREFIX=conda_envs - fi - ./.scripts/create_conda_build_artifacts.sh - displayName: Prepare conda build artifacts - condition: succeededOrFailed() - - - task: PublishPipelineArtifact@1 - displayName: Store conda build artifacts - condition: not(eq(variables.BLD_ARTIFACT_PATH, '')) - inputs: - targetPath: $(BLD_ARTIFACT_PATH) - artifactName: $(BLD_ARTIFACT_NAME) - - - task: PublishPipelineArtifact@1 - displayName: Store conda build environment artifacts - condition: not(eq(variables.ENV_ARTIFACT_PATH, '')) - inputs: - targetPath: $(ENV_ARTIFACT_PATH) - artifactName: $(ENV_ARTIFACT_NAME) \ No newline at end of file + 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 6c6dade4..0f55bb1a 100755 --- a/.azure-pipelines/azure-pipelines-osx.yml +++ b/.azure-pipelines/azure-pipelines-osx.yml @@ -11,27 +11,21 @@ jobs: osx_64_mpimpich: CONFIG: osx_64_mpimpich UPLOAD_PACKAGES: 'True' - SHORT_CONFIG: osx_64_mpimpich osx_64_mpinompi: CONFIG: osx_64_mpinompi UPLOAD_PACKAGES: 'True' - SHORT_CONFIG: osx_64_mpinompi osx_64_mpiopenmpi: CONFIG: osx_64_mpiopenmpi UPLOAD_PACKAGES: 'True' - SHORT_CONFIG: osx_64_mpiopenmpi osx_arm64_mpimpich: CONFIG: osx_arm64_mpimpich UPLOAD_PACKAGES: 'True' - SHORT_CONFIG: osx_arm64_mpimpich osx_arm64_mpinompi: CONFIG: osx_arm64_mpinompi UPLOAD_PACKAGES: 'True' - SHORT_CONFIG: osx_arm64_mpinompi osx_arm64_mpiopenmpi: CONFIG: osx_arm64_mpiopenmpi UPLOAD_PACKAGES: 'True' - SHORT_CONFIG: osx_arm64_mpiopenmpi timeoutInMinutes: 360 steps: @@ -51,33 +45,4 @@ jobs: env: BINSTAR_TOKEN: $(BINSTAR_TOKEN) FEEDSTOCK_TOKEN: $(FEEDSTOCK_TOKEN) - STAGING_BINSTAR_TOKEN: $(STAGING_BINSTAR_TOKEN) - - script: | - export CI=azure - export CI_RUN_ID=$(build.BuildNumber).$(system.JobAttempt) - export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) - export CONDA_BLD_DIR=/Users/runner/miniforge3/conda-bld - export ARTIFACT_STAGING_DIR="$(Build.ArtifactStagingDirectory)" - # Archive everything in CONDA_BLD_DIR except environments - export BLD_ARTIFACT_PREFIX=conda_artifacts - if [[ "$AGENT_JOBSTATUS" == "Failed" ]]; then - # Archive the CONDA_BLD_DIR environments only when the job fails - export ENV_ARTIFACT_PREFIX=conda_envs - fi - ./.scripts/create_conda_build_artifacts.sh - displayName: Prepare conda build artifacts - condition: succeededOrFailed() - - - task: PublishPipelineArtifact@1 - displayName: Store conda build artifacts - condition: not(eq(variables.BLD_ARTIFACT_PATH, '')) - inputs: - targetPath: $(BLD_ARTIFACT_PATH) - artifactName: $(BLD_ARTIFACT_NAME) - - - task: PublishPipelineArtifact@1 - displayName: Store conda build environment artifacts - condition: not(eq(variables.ENV_ARTIFACT_PATH, '')) - inputs: - targetPath: $(ENV_ARTIFACT_PATH) - artifactName: $(ENV_ARTIFACT_NAME) \ No newline at end of file + 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 44f93bca..8a96a72e 100755 --- a/.azure-pipelines/azure-pipelines-win.yml +++ b/.azure-pipelines/azure-pipelines-win.yml @@ -11,7 +11,6 @@ jobs: win_64_: CONFIG: win_64_ UPLOAD_PACKAGES: 'True' - SHORT_CONFIG: win_64_ timeoutInMinutes: 360 variables: CONDA_BLD_PATH: D:\\bld\\ @@ -65,33 +64,6 @@ jobs: displayName: Build recipe env: PYTHONUNBUFFERED: 1 - - script: | - set CI=azure - set CI_RUN_ID=$(build.BuildNumber).$(system.JobAttempt) - set FEEDSTOCK_NAME=$(build.Repository.Name) - set ARTIFACT_STAGING_DIR=$(Build.ArtifactStagingDirectory) - set CONDA_BLD_DIR=$(CONDA_BLD_PATH) - set BLD_ARTIFACT_PREFIX=conda_artifacts - if "%AGENT_JOBSTATUS%" == "Failed" ( - set ENV_ARTIFACT_PREFIX=conda_envs - ) - call ".scripts\create_conda_build_artifacts.bat" - displayName: Prepare conda build artifacts - condition: succeededOrFailed() - - - task: PublishPipelineArtifact@1 - displayName: Store conda build artifacts - condition: not(eq(variables.BLD_ARTIFACT_PATH, '')) - inputs: - targetPath: $(BLD_ARTIFACT_PATH) - artifactName: $(BLD_ARTIFACT_NAME) - - - task: PublishPipelineArtifact@1 - displayName: Store conda build environment artifacts - condition: not(eq(variables.ENV_ARTIFACT_PATH, '')) - inputs: - targetPath: $(ENV_ARTIFACT_PATH) - artifactName: $(ENV_ARTIFACT_NAME) - script: | set "FEEDSTOCK_NAME=%BUILD_REPOSITORY_NAME:*/=%" call activate base diff --git a/.scripts/create_conda_build_artifacts.bat b/.scripts/create_conda_build_artifacts.bat deleted file mode 100755 index 2853cfdc..00000000 --- a/.scripts/create_conda_build_artifacts.bat +++ /dev/null @@ -1,80 +0,0 @@ -setlocal enableextensions enabledelayedexpansion - -rem INPUTS (environment variables that need to be set before calling this script): -rem -rem CI (azure/github_actions/UNSET) -rem CI_RUN_ID (unique identifier for the CI job run) -rem FEEDSTOCK_NAME -rem CONFIG (build matrix configuration string) -rem SHORT_CONFIG (uniquely-shortened configuration string) -rem CONDA_BLD_DIR (path to the conda-bld directory) -rem ARTIFACT_STAGING_DIR (use working directory if unset) -rem BLD_ARTIFACT_PREFIX (prefix for the conda build artifact name, skip if unset) -rem ENV_ARTIFACT_PREFIX (prefix for the conda build environments artifact name, skip if unset) - -rem OUTPUTS -rem -rem BLD_ARTIFACT_NAME -rem BLD_ARTIFACT_PATH -rem ENV_ARTIFACT_NAME -rem ENV_ARTIFACT_PATH - -rem Check that the conda-build directory exists -if not exist %CONDA_BLD_DIR% ( - echo conda-build directory does not exist - exit 1 -) - -if not defined ARTIFACT_STAGING_DIR ( - rem Set staging dir to the working dir - set ARTIFACT_STAGING_DIR=%cd% -) - -rem Set a unique ID for the artifact(s), specialized for this particular job run -set ARTIFACT_UNIQUE_ID=%CI_RUN_ID%_%CONFIG% -if not "%ARTIFACT_UNIQUE_ID%" == "%ARTIFACT_UNIQUE_ID:~0,80%" ( - set ARTIFACT_UNIQUE_ID=%CI_RUN_ID%_%SHORT_CONFIG% -) - -rem Set a descriptive ID for the archive(s), specialized for this particular job run -set ARCHIVE_UNIQUE_ID=%CI_RUN_ID%_%CONFIG% - -rem Make the build artifact zip -if defined BLD_ARTIFACT_PREFIX ( - set BLD_ARTIFACT_NAME=%BLD_ARTIFACT_PREFIX%_%ARTIFACT_UNIQUE_ID% - echo BLD_ARTIFACT_NAME: !BLD_ARTIFACT_NAME! - - set "BLD_ARTIFACT_PATH=%ARTIFACT_STAGING_DIR%\%FEEDSTOCK_NAME%_%BLD_ARTIFACT_PREFIX%_%ARCHIVE_UNIQUE_ID%.zip" - 7z a "!BLD_ARTIFACT_PATH!" "%CONDA_BLD_DIR%" -xr^^!.git/ -xr^^!_*_env*/ -xr^^!*_cache/ -bb - if errorlevel 1 exit 1 - echo BLD_ARTIFACT_PATH: !BLD_ARTIFACT_PATH! - - if "%CI%" == "azure" ( - echo ##vso[task.setVariable variable=BLD_ARTIFACT_NAME]!BLD_ARTIFACT_NAME! - echo ##vso[task.setVariable variable=BLD_ARTIFACT_PATH]!BLD_ARTIFACT_PATH! - ) - if "%CI%" == "github_actions" ( - echo BLD_ARTIFACT_NAME=!BLD_ARTIFACT_NAME!>> !GITHUB_OUTPUT! - echo BLD_ARTIFACT_PATH=!BLD_ARTIFACT_PATH!>> !GITHUB_OUTPUT! - ) -) - -rem Make the environments artifact zip -if defined ENV_ARTIFACT_PREFIX ( - set ENV_ARTIFACT_NAME=!ENV_ARTIFACT_PREFIX!_%ARTIFACT_UNIQUE_ID% - echo ENV_ARTIFACT_NAME: !ENV_ARTIFACT_NAME! - - set "ENV_ARTIFACT_PATH=%ARTIFACT_STAGING_DIR%\%FEEDSTOCK_NAME%_%ENV_ARTIFACT_PREFIX%_%ARCHIVE_UNIQUE_ID%.zip" - 7z a "!ENV_ARTIFACT_PATH!" -r "%CONDA_BLD_DIR%"/_*_env*/ -bb - if errorlevel 1 exit 1 - echo ENV_ARTIFACT_PATH: !ENV_ARTIFACT_PATH! - - if "%CI%" == "azure" ( - echo ##vso[task.setVariable variable=ENV_ARTIFACT_NAME]!ENV_ARTIFACT_NAME! - echo ##vso[task.setVariable variable=ENV_ARTIFACT_PATH]!ENV_ARTIFACT_PATH! - ) - if "%CI%" == "github_actions" ( - echo ENV_ARTIFACT_NAME=!ENV_ARTIFACT_NAME!>> !GITHUB_OUTPUT! - echo ENV_ARTIFACT_PATH=!ENV_ARTIFACT_PATH!>> !GITHUB_OUTPUT! - ) -) \ No newline at end of file diff --git a/.scripts/create_conda_build_artifacts.sh b/.scripts/create_conda_build_artifacts.sh deleted file mode 100755 index 17ec0868..00000000 --- a/.scripts/create_conda_build_artifacts.sh +++ /dev/null @@ -1,113 +0,0 @@ -#!/usr/bin/env bash - -# INPUTS (environment variables that need to be set before calling this script): -# -# CI (azure/github_actions/UNSET) -# CI_RUN_ID (unique identifier for the CI job run) -# FEEDSTOCK_NAME -# CONFIG (build matrix configuration string) -# SHORT_CONFIG (uniquely-shortened configuration string) -# CONDA_BLD_DIR (path to the conda-bld directory) -# ARTIFACT_STAGING_DIR (use working directory if unset) -# BLD_ARTIFACT_PREFIX (prefix for the conda build artifact name, skip if unset) -# ENV_ARTIFACT_PREFIX (prefix for the conda build environments artifact name, skip if unset) - -# OUTPUTS -# -# BLD_ARTIFACT_NAME -# BLD_ARTIFACT_PATH -# ENV_ARTIFACT_NAME -# ENV_ARTIFACT_PATH - -source .scripts/logging_utils.sh - -# DON'T do set -x, because it results in double echo-ing pipeline commands -# and that might end up inserting extraneous quotation marks in output variables -set -e - -# Check that the conda-build directory exists -if [ ! -d "$CONDA_BLD_DIR" ]; then - echo "conda-build directory does not exist" - exit 1 -fi - -# Set staging dir to the working dir, in Windows style if applicable -if [[ -z "${ARTIFACT_STAGING_DIR}" ]]; then - if pwd -W; then - ARTIFACT_STAGING_DIR=$(pwd -W) - else - ARTIFACT_STAGING_DIR=$PWD - fi -fi -echo "ARTIFACT_STAGING_DIR: $ARTIFACT_STAGING_DIR" - -FEEDSTOCK_ROOT=$(cd "$(dirname "$0")/.."; pwd;) -if [ -z ${FEEDSTOCK_NAME} ]; then - export FEEDSTOCK_NAME=$(basename ${FEEDSTOCK_ROOT}) -fi - -# Set a unique ID for the artifact(s), specialized for this particular job run -ARTIFACT_UNIQUE_ID="${CI_RUN_ID}_${CONFIG}" -if [[ ${#ARTIFACT_UNIQUE_ID} -gt 80 ]]; then - ARTIFACT_UNIQUE_ID="${CI_RUN_ID}_${SHORT_CONFIG}" -fi -echo "ARTIFACT_UNIQUE_ID: $ARTIFACT_UNIQUE_ID" - -# Set a descriptive ID for the archive(s), specialized for this particular job run -ARCHIVE_UNIQUE_ID="${CI_RUN_ID}_${CONFIG}" - -# Make the build artifact zip -if [[ ! -z "$BLD_ARTIFACT_PREFIX" ]]; then - export BLD_ARTIFACT_NAME="${BLD_ARTIFACT_PREFIX}_${ARTIFACT_UNIQUE_ID}" - export BLD_ARTIFACT_PATH="${ARTIFACT_STAGING_DIR}/${FEEDSTOCK_NAME}_${BLD_ARTIFACT_PREFIX}_${ARCHIVE_UNIQUE_ID}.zip" - - ( startgroup "Archive conda build directory" ) 2> /dev/null - - # Try 7z and fall back to zip if it fails (for cross-platform use) - if ! 7z a "$BLD_ARTIFACT_PATH" "$CONDA_BLD_DIR" '-xr!.git/' '-xr!_*_env*/' '-xr!*_cache/' -bb; then - pushd "$CONDA_BLD_DIR" - zip -r -y -T "$BLD_ARTIFACT_PATH" . -x '*.git/*' '*_*_env*/*' '*_cache/*' - popd - fi - - ( endgroup "Archive conda build directory" ) 2> /dev/null - - echo "BLD_ARTIFACT_NAME: $BLD_ARTIFACT_NAME" - echo "BLD_ARTIFACT_PATH: $BLD_ARTIFACT_PATH" - - if [[ "$CI" == "azure" ]]; then - echo "##vso[task.setVariable variable=BLD_ARTIFACT_NAME]$BLD_ARTIFACT_NAME" - echo "##vso[task.setVariable variable=BLD_ARTIFACT_PATH]$BLD_ARTIFACT_PATH" - elif [[ "$CI" == "github_actions" ]]; then - echo "BLD_ARTIFACT_NAME=$BLD_ARTIFACT_NAME" >> $GITHUB_OUTPUT - echo "BLD_ARTIFACT_PATH=$BLD_ARTIFACT_PATH" >> $GITHUB_OUTPUT - fi -fi - -# Make the environments artifact zip -if [[ ! -z "$ENV_ARTIFACT_PREFIX" ]]; then - export ENV_ARTIFACT_NAME="${ENV_ARTIFACT_PREFIX}_${ARTIFACT_UNIQUE_ID}" - export ENV_ARTIFACT_PATH="${ARTIFACT_STAGING_DIR}/${FEEDSTOCK_NAME}_${ENV_ARTIFACT_PREFIX}_${ARCHIVE_UNIQUE_ID}.zip" - - ( startgroup "Archive conda build environments" ) 2> /dev/null - - # Try 7z and fall back to zip if it fails (for cross-platform use) - if ! 7z a "$ENV_ARTIFACT_PATH" -r "$CONDA_BLD_DIR"/'_*_env*/' -bb; then - pushd "$CONDA_BLD_DIR" - zip -r -y -T "$ENV_ARTIFACT_PATH" . -i '*_*_env*/*' - popd - fi - - ( endgroup "Archive conda build environments" ) 2> /dev/null - - echo "ENV_ARTIFACT_NAME: $ENV_ARTIFACT_NAME" - echo "ENV_ARTIFACT_PATH: $ENV_ARTIFACT_PATH" - - if [[ "$CI" == "azure" ]]; then - echo "##vso[task.setVariable variable=ENV_ARTIFACT_NAME]$ENV_ARTIFACT_NAME" - echo "##vso[task.setVariable variable=ENV_ARTIFACT_PATH]$ENV_ARTIFACT_PATH" - elif [[ "$CI" == "github_actions" ]]; then - echo "ENV_ARTIFACT_NAME=$ENV_ARTIFACT_NAME" >> $GITHUB_OUTPUT - echo "ENV_ARTIFACT_PATH=$ENV_ARTIFACT_PATH" >> $GITHUB_OUTPUT - fi -fi \ No newline at end of file