Conversation
✅ Deploy Preview for conda-forge-previews ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
| build: | ||
| number: 0 | ||
| script: | ||
| content: | ||
| - if: unix | ||
| then: | ||
| - cmake -B build -GNinja $CMAKE_ARGS . | ||
| else: | ||
| - cmake -B build -GNinja %CMAKE_ARGS% . | ||
| - cmake --build build | ||
| - cmake --install build | ||
|
|
||
| requirements: | ||
| build: | ||
| - ${{ stdlib('c') }} | ||
| - ${{ compiler('c') }} | ||
| - ${{ compiler('cxx') }} # optional | ||
| - cmake | ||
| - ninja | ||
| host: | ||
| # put any dependencies here | ||
| run_exports: | ||
| - ${{ pin_subpackage('example-package', upper_bound='x.x.x') }} | ||
|
|
||
| tests: | ||
| - package_contents: | ||
| lib: | ||
| - example_package |
There was a problem hiding this comment.
i would prefer adding the paragraphs below as i always get annoyed by the need to delete half of the lines in https://github.com/conda-forge/staged-recipes/blob/main/recipes/example-v1/recipe.yaml
| - if: unix | ||
| then: | ||
| - cmake -B build -GNinja $CMAKE_ARGS . | ||
| else: | ||
| - cmake -B build -GNinja %CMAKE_ARGS% . | ||
| - cmake --build build | ||
| - cmake --install build |
There was a problem hiding this comment.
Let's use scripts for these and add ctest, CPU_COUNT etc.
There was a problem hiding this comment.
wdym with scripts? build.sh and build.bat?
There was a problem hiding this comment.
i don't like separating trivial-ish recipes into recipe.yaml, build.sh and build.bat, especially if windows and linux are basically the same. this takes longer to copy as i need to copy three files instead of just one and harder to review on first glance as things are now split between files.
There was a problem hiding this comment.
The bot knows how to edit build.sh and build.bat when adding cross compilation. So it's important to have them.
There was a problem hiding this comment.
what additional modifications are needed to build.sh/build.bat when cross-compiling cmake projects? in https://conda-forge.org/blog/2020/10/29/macos-arm64/#how-to-add-a-osx-arm64-build-to-a-feedstock i only see the mentioning of ${CMAKE_ARGS} which are already in this template
There was a problem hiding this comment.
I agree on preferring to have proper build scripts.
| else: | ||
| - cmake -B build -GNinja %CMAKE_ARGS% . | ||
| - cmake --build build --parallel %CPU_COUNT% | ||
| - ctest --test-dir build --output-on-failure |
There was a problem hiding this comment.
There was a problem hiding this comment.
Grepping through the rattler-build codebase, the only env variable i can find is CONDA_BUILD_CROSS_COMPILATION. @wolfv is CONDA_BUILD_SKIP_TESTS and CROSSCOMPILING_EMULATOR not being set intentional?
Also, why not something like
if [[ "${CONDA_BUILD_SKIP_TESTS:-}" != "1" ]]; then
ctest
fiin build.sh?

PR Checklist:
docs/orcommunity/, you have added it to the sidebar in the corresponding_sidebar.jsonfile