From f200a4ed4d2a8bc161242dbf99a8e81cb051b80f Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Sat, 29 Jun 2024 07:59:24 +1100 Subject: [PATCH 1/6] fail correctly upon error in bld.bat --- recipe/bld.bat | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/recipe/bld.bat b/recipe/bld.bat index 823c08c..c044984 100644 --- a/recipe/bld.bat +++ b/recipe/bld.bat @@ -1,3 +1,5 @@ +@echo on + mkdir build cd build @@ -12,7 +14,10 @@ cmake -G "NMake Makefiles JOM" ^ -DNUM_THREADS=128 ^ -DBUILD_SHARED_LIBS=on ^ %SRC_DIR% +if %ERRORLEVEL% neq 0 exit 1 jom install -j%CPU_COUNT% +if %ERRORLEVEL% neq 0 exit 1 utest\openblas_utest.exe +if %ERRORLEVEL% neq 0 exit 1 From 4d155774eb293d35491b674e699d75f3c61634e5 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Sat, 29 Jun 2024 07:59:56 +1100 Subject: [PATCH 2/6] switch to ninja on windows --- recipe/bld.bat | 4 ++-- recipe/meta.yaml | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/recipe/bld.bat b/recipe/bld.bat index c044984..3297ed9 100644 --- a/recipe/bld.bat +++ b/recipe/bld.bat @@ -3,7 +3,7 @@ mkdir build cd build -cmake -G "NMake Makefiles JOM" ^ +cmake -G "Ninja" ^ -DCMAKE_C_COMPILER=clang-cl ^ -DCMAKE_Fortran_COMPILER=flang ^ -DCMAKE_BUILD_TYPE=Release ^ @@ -16,7 +16,7 @@ cmake -G "NMake Makefiles JOM" ^ %SRC_DIR% if %ERRORLEVEL% neq 0 exit 1 -jom install -j%CPU_COUNT% +cmake --build . --target install if %ERRORLEVEL% neq 0 exit 1 utest\openblas_utest.exe diff --git a/recipe/meta.yaml b/recipe/meta.yaml index dd109cc..2f4e3f2 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -21,8 +21,7 @@ requirements: - perl - make # [not win] - cmake # [win] - - curl # [win] - - jom # [win] + - ninja # [win] - objconv # [osx] - llvm-openmp # [(osx or linux) and USE_OPENMP == 1] # Following is needed because the Fortran compiler add an rpath to the BUILD_PREFIX From 8099eb6006bb1eea8490e675ebf205226735ce29 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Sat, 29 Jun 2024 08:00:46 +1100 Subject: [PATCH 3/6] run OpenBLAS test suite on windows --- recipe/bld.bat | 3 +++ 1 file changed, 3 insertions(+) diff --git a/recipe/bld.bat b/recipe/bld.bat index 3297ed9..24c3c93 100644 --- a/recipe/bld.bat +++ b/recipe/bld.bat @@ -19,5 +19,8 @@ if %ERRORLEVEL% neq 0 exit 1 cmake --build . --target install if %ERRORLEVEL% neq 0 exit 1 +ctest -j2 +if %ERRORLEVEL% neq 0 exit 1 + utest\openblas_utest.exe if %ERRORLEVEL% neq 0 exit 1 From 53dd86c51f8b66de73290214e4db6fa956ac749b Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Sat, 29 Jun 2024 08:09:09 +1100 Subject: [PATCH 4/6] do not store build artefacts --- conda-forge.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/conda-forge.yml b/conda-forge.yml index b927254..0f5a175 100644 --- a/conda-forge.yml +++ b/conda-forge.yml @@ -4,8 +4,6 @@ provider: {linux_aarch64: default, linux_ppc64le: default} github: branch_name: main tooling_branch_name: main -azure: - store_build_artifacts: true conda_build: pkg_format: '2' idle_timeout_minutes: 30 From 3db04520ad4ab181c38bbb547060395b19212d45 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Sat, 29 Jun 2024 08:16:59 +1100 Subject: [PATCH 5/6] add stdlib --- recipe/meta.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 2f4e3f2..ca35616 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,5 +1,5 @@ {% set version = "0.3.27" %} -{% set build_number = 0 %} +{% set build_number = 1 %} package: name: openblas @@ -16,6 +16,7 @@ build: requirements: build: + - {{ stdlib("c") }} - {{ compiler("c") }} - {{ compiler("fortran") }} - perl @@ -40,6 +41,7 @@ outputs: - {{ pin_subpackage("libopenblas" ~ name_suffix) }} requirements: build: + - {{ stdlib("c") }} - {{ compiler("c") }} - {{ compiler("fortran") }} - llvm-openmp # [(osx or linux) and USE_OPENMP == 1] From 6030d72ccd5139815ad8a43a69fc061885eb6cd7 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Sat, 29 Jun 2024 08:19:30 +1100 Subject: [PATCH 6/6] MNT: Re-rendered with conda-build 24.5.1, conda-smithy 3.36.2, and conda-forge-pinning 2024.06.28.19.57.36 --- .azure-pipelines/azure-pipelines-linux.yml | 41 +------ .azure-pipelines/azure-pipelines-osx.yml | 37 +----- .azure-pipelines/azure-pipelines-win.yml | 30 +---- ...x_64_SYMBOLSUFFIX64_name_suffix-ilp64.yaml | 6 +- .../osx_64_SYMBOLSUFFIXname_suffix.yaml | 6 +- ...rm64_SYMBOLSUFFIX64_name_suffix-ilp64.yaml | 2 + .../osx_arm64_SYMBOLSUFFIXname_suffix.yaml | 2 + .ci_support/win_64_.yaml | 2 - .gitattributes | 4 +- .scripts/build_steps.sh | 7 ++ .scripts/create_conda_build_artifacts.bat | 80 ------------- .scripts/create_conda_build_artifacts.sh | 113 ------------------ .scripts/run_osx_build.sh | 7 ++ .scripts/run_win_build.bat | 5 + 14 files changed, 37 insertions(+), 305 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 a487c57..eba1361 100755 --- a/.azure-pipelines/azure-pipelines-linux.yml +++ b/.azure-pipelines/azure-pipelines-linux.yml @@ -12,52 +12,42 @@ jobs: CONFIG: linux_64_SYMBOLSUFFIX64_USE_OPENMP0name_suffix-ilp64 UPLOAD_PACKAGES: 'True' DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 - SHORT_CONFIG: linux_64_SYMBOLSUFFIX64_USE_OPENMP0_h6975972aaa linux_64_SYMBOLSUFFIX64_USE_OPENMP1name_suffix-ilp64: CONFIG: linux_64_SYMBOLSUFFIX64_USE_OPENMP1name_suffix-ilp64 UPLOAD_PACKAGES: 'True' DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 - SHORT_CONFIG: linux_64_SYMBOLSUFFIX64_USE_OPENMP1_h19175b77ab linux_64_SYMBOLSUFFIXUSE_OPENMP0name_suffix: CONFIG: linux_64_SYMBOLSUFFIXUSE_OPENMP0name_suffix UPLOAD_PACKAGES: 'True' DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 - SHORT_CONFIG: linux_64_SYMBOLSUFFIXUSE_OPENMP0name_suffix linux_64_SYMBOLSUFFIXUSE_OPENMP1name_suffix: CONFIG: linux_64_SYMBOLSUFFIXUSE_OPENMP1name_suffix UPLOAD_PACKAGES: 'True' DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 - SHORT_CONFIG: linux_64_SYMBOLSUFFIXUSE_OPENMP1name_suffix linux_aarch64_USE_OPENMP0: CONFIG: linux_aarch64_USE_OPENMP0 UPLOAD_PACKAGES: 'True' DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 - SHORT_CONFIG: linux_aarch64_USE_OPENMP0 linux_aarch64_USE_OPENMP1: CONFIG: linux_aarch64_USE_OPENMP1 UPLOAD_PACKAGES: 'True' DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 - SHORT_CONFIG: linux_aarch64_USE_OPENMP1 linux_ppc64le_SYMBOLSUFFIX64_USE_OPENMP0name_suffix-ilp64: CONFIG: linux_ppc64le_SYMBOLSUFFIX64_USE_OPENMP0name_suffix-ilp64 UPLOAD_PACKAGES: 'True' DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 - SHORT_CONFIG: linux_ppc64le_SYMBOLSUFFIX64_USE_OP_h9dbd683d2b linux_ppc64le_SYMBOLSUFFIX64_USE_OPENMP1name_suffix-ilp64: CONFIG: linux_ppc64le_SYMBOLSUFFIX64_USE_OPENMP1name_suffix-ilp64 UPLOAD_PACKAGES: 'True' DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 - SHORT_CONFIG: linux_ppc64le_SYMBOLSUFFIX64_USE_OP_hbf3245b199 linux_ppc64le_SYMBOLSUFFIXUSE_OPENMP0name_suffix: CONFIG: linux_ppc64le_SYMBOLSUFFIXUSE_OPENMP0name_suffix UPLOAD_PACKAGES: 'True' DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 - SHORT_CONFIG: linux_ppc64le_SYMBOLSUFFIXUSE_OPENMP0name_suffix linux_ppc64le_SYMBOLSUFFIXUSE_OPENMP1name_suffix: CONFIG: linux_ppc64le_SYMBOLSUFFIXUSE_OPENMP1name_suffix UPLOAD_PACKAGES: 'True' DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 - SHORT_CONFIG: linux_ppc64le_SYMBOLSUFFIXUSE_OPENMP1name_suffix timeoutInMinutes: 360 variables: {} @@ -87,33 +77,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 971ee66..4a1af04 100755 --- a/.azure-pipelines/azure-pipelines-osx.yml +++ b/.azure-pipelines/azure-pipelines-osx.yml @@ -5,25 +5,21 @@ jobs: - job: osx pool: - vmImage: macOS-11 + vmImage: macOS-12 strategy: matrix: osx_64_SYMBOLSUFFIX64_name_suffix-ilp64: CONFIG: osx_64_SYMBOLSUFFIX64_name_suffix-ilp64 UPLOAD_PACKAGES: 'True' - SHORT_CONFIG: osx_64_SYMBOLSUFFIX64_name_suffix-ilp64 osx_64_SYMBOLSUFFIXname_suffix: CONFIG: osx_64_SYMBOLSUFFIXname_suffix UPLOAD_PACKAGES: 'True' - SHORT_CONFIG: osx_64_SYMBOLSUFFIXname_suffix osx_arm64_SYMBOLSUFFIX64_name_suffix-ilp64: CONFIG: osx_arm64_SYMBOLSUFFIX64_name_suffix-ilp64 UPLOAD_PACKAGES: 'True' - SHORT_CONFIG: osx_arm64_SYMBOLSUFFIX64_name_suffix-ilp64 osx_arm64_SYMBOLSUFFIXname_suffix: CONFIG: osx_arm64_SYMBOLSUFFIXname_suffix UPLOAD_PACKAGES: 'True' - SHORT_CONFIG: osx_arm64_SYMBOLSUFFIXname_suffix timeoutInMinutes: 360 variables: {} @@ -47,33 +43,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 8be5906..d609fcd 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\\ @@ -50,31 +49,4 @@ jobs: UPLOAD_TEMP: $(UPLOAD_TEMP) BINSTAR_TOKEN: $(BINSTAR_TOKEN) FEEDSTOCK_TOKEN: $(FEEDSTOCK_TOKEN) - STAGING_BINSTAR_TOKEN: $(STAGING_BINSTAR_TOKEN) - - 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) \ No newline at end of file + STAGING_BINSTAR_TOKEN: $(STAGING_BINSTAR_TOKEN) \ No newline at end of file diff --git a/.ci_support/osx_64_SYMBOLSUFFIX64_name_suffix-ilp64.yaml b/.ci_support/osx_64_SYMBOLSUFFIX64_name_suffix-ilp64.yaml index 26aff30..ee86ef5 100644 --- a/.ci_support/osx_64_SYMBOLSUFFIX64_name_suffix-ilp64.yaml +++ b/.ci_support/osx_64_SYMBOLSUFFIX64_name_suffix-ilp64.yaml @@ -1,7 +1,9 @@ INTERFACE64: - '1' MACOSX_DEPLOYMENT_TARGET: -- '10.9' +- '10.13' +MACOSX_SDK_VERSION: +- '10.13' SYMBOLSUFFIX: - '64_' USE_OPENMP: @@ -13,7 +15,7 @@ c_compiler_version: c_stdlib: - macosx_deployment_target c_stdlib_version: -- '10.9' +- '10.13' channel_sources: - conda-forge channel_targets: diff --git a/.ci_support/osx_64_SYMBOLSUFFIXname_suffix.yaml b/.ci_support/osx_64_SYMBOLSUFFIXname_suffix.yaml index 4b5110f..aebc031 100644 --- a/.ci_support/osx_64_SYMBOLSUFFIXname_suffix.yaml +++ b/.ci_support/osx_64_SYMBOLSUFFIXname_suffix.yaml @@ -1,7 +1,9 @@ INTERFACE64: - '0' MACOSX_DEPLOYMENT_TARGET: -- '10.9' +- '10.13' +MACOSX_SDK_VERSION: +- '10.13' SYMBOLSUFFIX: - '' USE_OPENMP: @@ -13,7 +15,7 @@ c_compiler_version: c_stdlib: - macosx_deployment_target c_stdlib_version: -- '10.9' +- '10.13' channel_sources: - conda-forge channel_targets: diff --git a/.ci_support/osx_arm64_SYMBOLSUFFIX64_name_suffix-ilp64.yaml b/.ci_support/osx_arm64_SYMBOLSUFFIX64_name_suffix-ilp64.yaml index 1a145a9..256ad31 100644 --- a/.ci_support/osx_arm64_SYMBOLSUFFIX64_name_suffix-ilp64.yaml +++ b/.ci_support/osx_arm64_SYMBOLSUFFIX64_name_suffix-ilp64.yaml @@ -2,6 +2,8 @@ INTERFACE64: - '1' MACOSX_DEPLOYMENT_TARGET: - '11.0' +MACOSX_SDK_VERSION: +- '11.0' SYMBOLSUFFIX: - '64_' USE_OPENMP: diff --git a/.ci_support/osx_arm64_SYMBOLSUFFIXname_suffix.yaml b/.ci_support/osx_arm64_SYMBOLSUFFIXname_suffix.yaml index a64526f..cd90d64 100644 --- a/.ci_support/osx_arm64_SYMBOLSUFFIXname_suffix.yaml +++ b/.ci_support/osx_arm64_SYMBOLSUFFIXname_suffix.yaml @@ -2,6 +2,8 @@ INTERFACE64: - '0' MACOSX_DEPLOYMENT_TARGET: - '11.0' +MACOSX_SDK_VERSION: +- '11.0' SYMBOLSUFFIX: - '' USE_OPENMP: diff --git a/.ci_support/win_64_.yaml b/.ci_support/win_64_.yaml index 22cd99f..670fd2c 100644 --- a/.ci_support/win_64_.yaml +++ b/.ci_support/win_64_.yaml @@ -12,8 +12,6 @@ channel_sources: - conda-forge channel_targets: - conda-forge main -curl: -- '8' fortran_compiler: - flang fortran_compiler_version: diff --git a/.gitattributes b/.gitattributes index 7f32763..18f114a 100644 --- a/.gitattributes +++ b/.gitattributes @@ -20,8 +20,8 @@ bld.bat text eol=crlf .travis.yml linguist-generated=true .scripts/* linguist-generated=true .woodpecker.yml linguist-generated=true -LICENSE.txt linguist-generated=true -README.md linguist-generated=true +/LICENSE.txt linguist-generated=true +/README.md linguist-generated=true azure-pipelines.yml linguist-generated=true build-locally.py linguist-generated=true shippable.yml linguist-generated=true diff --git a/.scripts/build_steps.sh b/.scripts/build_steps.sh index 899ba03..a5836e8 100755 --- a/.scripts/build_steps.sh +++ b/.scripts/build_steps.sh @@ -72,6 +72,13 @@ else --suppress-variables ${EXTRA_CB_OPTIONS:-} \ --clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml" \ --extra-meta flow_run_id="${flow_run_id:-}" remote_url="${remote_url:-}" sha="${sha:-}" + + ( startgroup "Inspecting artifacts" ) 2> /dev/null + + # inspect_artifacts was only added in conda-forge-ci-setup 4.6.0 + command -v inspect_artifacts >/dev/null 2>&1 && inspect_artifacts || echo "inspect_artifacts needs conda-forge-ci-setup >=4.6.0" + + ( endgroup "Inspecting artifacts" ) 2> /dev/null ( startgroup "Validating outputs" ) 2> /dev/null validate_recipe_outputs "${FEEDSTOCK_NAME}" diff --git a/.scripts/create_conda_build_artifacts.bat b/.scripts/create_conda_build_artifacts.bat deleted file mode 100755 index 2853cfd..0000000 --- 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 17ec086..0000000 --- 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 diff --git a/.scripts/run_osx_build.sh b/.scripts/run_osx_build.sh index 07dff21..ba0c879 100755 --- a/.scripts/run_osx_build.sh +++ b/.scripts/run_osx_build.sh @@ -85,6 +85,13 @@ else --suppress-variables ${EXTRA_CB_OPTIONS:-} \ --clobber-file ./.ci_support/clobber_${CONFIG}.yaml \ --extra-meta flow_run_id="$flow_run_id" remote_url="$remote_url" sha="$sha" + + ( startgroup "Inspecting artifacts" ) 2> /dev/null + + # inspect_artifacts was only added in conda-forge-ci-setup 4.6.0 + command -v inspect_artifacts >/dev/null 2>&1 && inspect_artifacts || echo "inspect_artifacts needs conda-forge-ci-setup >=4.6.0" + + ( endgroup "Inspecting artifacts" ) 2> /dev/null ( startgroup "Validating outputs" ) 2> /dev/null validate_recipe_outputs "${FEEDSTOCK_NAME}" diff --git a/.scripts/run_win_build.bat b/.scripts/run_win_build.bat index 6d54697..65650bf 100755 --- a/.scripts/run_win_build.bat +++ b/.scripts/run_win_build.bat @@ -58,6 +58,11 @@ echo Building recipe conda-build.exe "recipe" -m .ci_support\%CONFIG%.yaml --suppress-variables %EXTRA_CB_OPTIONS% if !errorlevel! neq 0 exit /b !errorlevel! +call :start_group "Inspecting artifacts" +:: inspect_artifacts was only added in conda-forge-ci-setup 4.6.0 +WHERE inspect_artifacts >nul 2>nul && inspect_artifacts || echo "inspect_artifacts needs conda-forge-ci-setup >=4.6.0" +call :end_group + :: Prepare some environment variables for the upload step if /i "%CI%" == "github_actions" ( set "FEEDSTOCK_NAME=%GITHUB_REPOSITORY:*/=%"