From c6bb70182bf830c4b7c7f26acc56ecb6750c6f6d Mon Sep 17 00:00:00 2001 From: h-vetinari Date: Fri, 16 Aug 2024 00:01:36 +1100 Subject: [PATCH] improve (ignore_)run_exports, don't refer to `-ng` packages (#14) * remove obsolete pins * add stdlib * cross-compile linux arches * rely on compiler run-exports * fix run-export situation, reenable error_overlinking * MNT: Re-rendered with conda-build 24.7.1, conda-smithy 3.38.0, and conda-forge-pinning 2024.08.14.18.26.09 --- .azure-pipelines/azure-pipelines-linux.yml | 8 ++++++ .azure-pipelines/azure-pipelines-win.yml | 2 +- .ci_support/linux_64_.yaml | 13 +++++++--- .ci_support/linux_aarch64_.yaml | 13 +++++++--- .ci_support/linux_ppc64le_.yaml | 29 ++++++++++++++++++++++ .ci_support/osx_64_.yaml | 8 ++++-- .ci_support/osx_arm64_.yaml | 8 ++++-- .ci_support/win_64_.yaml | 6 +++-- .scripts/build_steps.sh | 6 +++++ .scripts/run_osx_build.sh | 9 ++++++- .scripts/run_win_build.bat | 5 ++++ .travis.yml | 25 ------------------- README.md | 17 +++++++------ build-locally.py | 4 +-- conda-forge.yml | 6 +++-- recipe/conda_build_config.yaml | 6 +---- recipe/meta.yaml | 19 +++++--------- 17 files changed, 115 insertions(+), 69 deletions(-) create mode 100644 .ci_support/linux_ppc64le_.yaml delete mode 100644 .travis.yml diff --git a/.azure-pipelines/azure-pipelines-linux.yml b/.azure-pipelines/azure-pipelines-linux.yml index 875d996..aef462c 100755 --- a/.azure-pipelines/azure-pipelines-linux.yml +++ b/.azure-pipelines/azure-pipelines-linux.yml @@ -12,6 +12,14 @@ jobs: CONFIG: linux_64_ UPLOAD_PACKAGES: 'True' DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 + linux_aarch64_: + CONFIG: linux_aarch64_ + UPLOAD_PACKAGES: 'True' + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 + linux_ppc64le_: + CONFIG: linux_ppc64le_ + UPLOAD_PACKAGES: 'True' + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 timeoutInMinutes: 360 variables: {} diff --git a/.azure-pipelines/azure-pipelines-win.yml b/.azure-pipelines/azure-pipelines-win.yml index d609fcd..204327b 100755 --- a/.azure-pipelines/azure-pipelines-win.yml +++ b/.azure-pipelines/azure-pipelines-win.yml @@ -24,7 +24,7 @@ jobs: scriptSource: inline script: | import urllib.request - url = 'https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Windows-x86_64.exe' + url = 'https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Windows-x86_64.exe' path = r"$(Build.ArtifactStagingDirectory)/Miniforge.exe" urllib.request.urlretrieve(url, path) diff --git a/.ci_support/linux_64_.yaml b/.ci_support/linux_64_.yaml index d406130..fcd6f3b 100644 --- a/.ci_support/linux_64_.yaml +++ b/.ci_support/linux_64_.yaml @@ -1,11 +1,15 @@ +c_stdlib: +- sysroot +c_stdlib_version: +- '2.17' cdt_name: -- cos6 +- cos7 channel_sources: - conda-forge channel_targets: - conda-forge main clangdev: -- 18.* +- '18' cxx_compiler: - gxx cxx_compiler_version: @@ -16,7 +20,10 @@ libxml2: - '2' target_platform: - linux-64 +zip_keys: +- - c_stdlib_version + - cdt_name zlib: -- '1.2' +- '1' zstd: - '1.5' diff --git a/.ci_support/linux_aarch64_.yaml b/.ci_support/linux_aarch64_.yaml index b19e55a..3e0772f 100644 --- a/.ci_support/linux_aarch64_.yaml +++ b/.ci_support/linux_aarch64_.yaml @@ -1,5 +1,9 @@ BUILD: - aarch64-conda_cos7-linux-gnu +c_stdlib: +- sysroot +c_stdlib_version: +- '2.17' cdt_arch: - aarch64 cdt_name: @@ -9,18 +13,21 @@ channel_sources: channel_targets: - conda-forge main clangdev: -- 18.* +- '18' cxx_compiler: - gxx cxx_compiler_version: - '12' docker_image: -- quay.io/condaforge/linux-anvil-aarch64 +- quay.io/condaforge/linux-anvil-cos7-x86_64 libxml2: - '2' target_platform: - linux-aarch64 +zip_keys: +- - c_stdlib_version + - cdt_name zlib: -- '1.2' +- '1' zstd: - '1.5' diff --git a/.ci_support/linux_ppc64le_.yaml b/.ci_support/linux_ppc64le_.yaml new file mode 100644 index 0000000..5f21b1f --- /dev/null +++ b/.ci_support/linux_ppc64le_.yaml @@ -0,0 +1,29 @@ +c_stdlib: +- sysroot +c_stdlib_version: +- '2.17' +cdt_name: +- cos7 +channel_sources: +- conda-forge +channel_targets: +- conda-forge main +clangdev: +- '18' +cxx_compiler: +- gxx +cxx_compiler_version: +- '12' +docker_image: +- quay.io/condaforge/linux-anvil-cos7-x86_64 +libxml2: +- '2' +target_platform: +- linux-ppc64le +zip_keys: +- - c_stdlib_version + - cdt_name +zlib: +- '1' +zstd: +- '1.5' diff --git a/.ci_support/osx_64_.yaml b/.ci_support/osx_64_.yaml index 5f013fe..e8204e0 100644 --- a/.ci_support/osx_64_.yaml +++ b/.ci_support/osx_64_.yaml @@ -2,12 +2,16 @@ MACOSX_DEPLOYMENT_TARGET: - '10.13' MACOSX_SDK_VERSION: - '10.13' +c_stdlib: +- macosx_deployment_target +c_stdlib_version: +- '10.13' channel_sources: - conda-forge channel_targets: - conda-forge main clangdev: -- 18.* +- '18' cxx_compiler: - clang_bootstrap cxx_compiler_version: @@ -19,6 +23,6 @@ macos_machine: target_platform: - osx-64 zlib: -- '1.2' +- '1' zstd: - '1.5' diff --git a/.ci_support/osx_arm64_.yaml b/.ci_support/osx_arm64_.yaml index bd455ed..bd349d7 100644 --- a/.ci_support/osx_arm64_.yaml +++ b/.ci_support/osx_arm64_.yaml @@ -2,12 +2,16 @@ MACOSX_DEPLOYMENT_TARGET: - '11.0' MACOSX_SDK_VERSION: - '11.0' +c_stdlib: +- macosx_deployment_target +c_stdlib_version: +- '11.0' channel_sources: - conda-forge channel_targets: - conda-forge main clangdev: -- 18.* +- '18' cxx_compiler: - clang_bootstrap cxx_compiler_version: @@ -19,6 +23,6 @@ macos_machine: target_platform: - osx-arm64 zlib: -- '1.2' +- '1' zstd: - '1.5' diff --git a/.ci_support/win_64_.yaml b/.ci_support/win_64_.yaml index 982300d..d3f9625 100644 --- a/.ci_support/win_64_.yaml +++ b/.ci_support/win_64_.yaml @@ -1,9 +1,11 @@ +c_stdlib: +- vs channel_sources: - conda-forge channel_targets: - conda-forge main clangdev: -- 18.* +- '18' cxx_compiler: - vs2019 libxml2: @@ -11,6 +13,6 @@ libxml2: target_platform: - win-64 zlib: -- '1.2' +- '1' zstd: - '1.5' diff --git a/.scripts/build_steps.sh b/.scripts/build_steps.sh index 2f3df6c..6c805a9 100755 --- a/.scripts/build_steps.sh +++ b/.scripts/build_steps.sh @@ -69,6 +69,12 @@ 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_osx_build.sh b/.scripts/run_osx_build.sh index 165fa51..4ebc38f 100755 --- a/.scripts/run_osx_build.sh +++ b/.scripts/run_osx_build.sh @@ -11,7 +11,7 @@ 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" +MINIFORGE_FILE="Miniforge3-MacOSX-$(uname -m).sh" curl -L -O "${MINIFORGE_URL}/${MINIFORGE_FILE}" rm -rf ${MINIFORGE_HOME} bash $MINIFORGE_FILE -b -p ${MINIFORGE_HOME} @@ -81,6 +81,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 7491838..24ef201 100755 --- a/.scripts/run_win_build.bat +++ b/.scripts/run_win_build.bat @@ -53,6 +53,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:*/=%" diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 18ca8e6..0000000 --- a/.travis.yml +++ /dev/null @@ -1,25 +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. - -language: shell - - - -jobs: - include: - - env: CONFIG=linux_aarch64_ UPLOAD_PACKAGES=True PLATFORM=linux-aarch64 DOCKER_IMAGE=quay.io/condaforge/linux-anvil-aarch64 - os: linux - arch: arm64 - dist: focal - -script: - - export CI=travis - - export GIT_BRANCH="$TRAVIS_BRANCH" - - export flow_run_id="travis_$TRAVIS_JOB_ID" - - export sha="$TRAVIS_COMMIT" - - export remote_url="https://github.com/$TRAVIS_REPO_SLUG" - - export FEEDSTOCK_NAME=$(basename ${TRAVIS_REPO_SLUG}) - - if [[ "${TRAVIS_PULL_REQUEST:-}" == "false" ]]; then export IS_PR_BUILD="False"; else export IS_PR_BUILD="True"; fi - - - - if [[ ${PLATFORM} =~ .*linux.* ]]; then CONDA_FORGE_DOCKER_RUN_ARGS="--network=host --security-opt=seccomp=unconfined" ./.scripts/run_docker_build.sh; fi \ No newline at end of file diff --git a/README.md b/README.md index 269d1e3..ed1cb1c 100644 --- a/README.md +++ b/README.md @@ -28,14 +28,7 @@ Current build status ==================== - - - - +
Travis - - linux - -
@@ -62,6 +55,13 @@ Current build status variant + + +
Azure
linux_ppc64le + + variant + +
osx_64 @@ -212,6 +212,7 @@ In order to produce a uniquely identifiable distribution: Feedstock Maintainers ===================== +* [@JohanMabille](https://github.com/JohanMabille/) * [@alexander-penev](https://github.com/alexander-penev/) * [@vgvassilev](https://github.com/vgvassilev/) diff --git a/build-locally.py b/build-locally.py index e0d408d..d78427b 100755 --- a/build-locally.py +++ b/build-locally.py @@ -3,11 +3,11 @@ # This file has been generated by conda-smithy in order to build the recipe # locally. # -import os import glob +import os +import platform import subprocess from argparse import ArgumentParser -import platform def setup_environment(ns): diff --git a/conda-forge.yml b/conda-forge.yml index 6bd043a..d3c8e95 100644 --- a/conda-forge.yml +++ b/conda-forge.yml @@ -1,6 +1,8 @@ -build_platform: {osx_arm64: osx_64} +build_platform: + linux_aarch64: linux_64 + linux_ppc64le: linux_64 + osx_arm64: osx_64 conda_forge_output_validation: true -provider: {linux_aarch64: default, win: azure} github: branch_name: main tooling_branch_name: main diff --git a/recipe/conda_build_config.yaml b/recipe/conda_build_config.yaml index 41ffe4f..b2d24d6 100644 --- a/recipe/conda_build_config.yaml +++ b/recipe/conda_build_config.yaml @@ -1,11 +1,7 @@ clangdev: - - 18.* + - 18 -c_stdlib_version: # [linux] - - 2.17 # [linux] c_compiler: # [osx] - clang_bootstrap # [osx] cxx_compiler: # [osx] - clang_bootstrap # [osx] -MACOSX_SDK_VERSION: # [osx and x86_64] - - 10.12 # [osx and x86_64] diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 64ec646..a2b7c0c 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,5 +1,5 @@ {% set name = "cppinterop" %} -{% set build_number = 1 %} +{% set build_number = 2 %} {% set version = "1.3.0" %} {% set revision_tag = "v"+version %} @@ -19,9 +19,7 @@ source: build: number: {{ build_number }} string: clang{{ (clangdev or "None").split(".")[0] }}_repl_h{{ PKG_HASH }}_{{ build_number }} - error_overlinking: false # FIXME: We should adjust the ignore_run_exports. ignore_run_exports: - - zstd # [win] - libxml2 - backtrace - libllvm{{ clangdev }} @@ -34,13 +32,12 @@ requirements: #- clang # [osx] - make # [unix] - ninja # [win] + - {{ stdlib('c') }} - {{ compiler('cxx') }} - llvm {{ clangdev }} - llvmdev {{ clangdev }} - clangdev {{ clangdev }} - git-lfs - - libcxx {{ cxx_compiler_version }} # [osx] - - libstdcxx-ng {{ cxx_compiler_version }} # [linux] host: - llvm {{ clangdev }} - llvmdev {{ clangdev }} @@ -48,22 +45,18 @@ requirements: - backtrace # [unix and x86] - libxml2 - zlib - - zstd # [unix] - - libcxx {{ cxx_compiler_version }} # [osx] - - libstdcxx-ng {{ cxx_compiler_version }} # [linux] + - zstd + run: + # clang_bootstrap has no run-export + - libcxx >={{ cxx_compiler_version }} # [osx] run_constrained: - llvm {{ clangdev }} - llvmdev {{ clangdev }} - clangdev {{ clangdev }} - run: - - libcxx {{ cxx_compiler_version }} # [osx] - - libstdcxx-ng >={{ cxx_compiler_version }} # [linux] test: requires: - {{ compiler('cxx') }} - - libcxx {{ cxx_compiler_version }} # [osx] - - libstdcxx-ng >={{ cxx_compiler_version }} # [linux] - cmake - ninja files: