Conversation
…define build recipe in meta.yaml and relevant fields. define conda environment.
|
green check, yes. note failures in pipeline... |
…for test step. add git at dependency to see if it keeps the pipeline happy.
|
current testing state is odd. In the pipeline, Additionally, in the pipeline, all |
…move most unneeded failure-guarding shell commands.
…st t/t001-list_paths.sh
…nge approach to resolving binDir in t/t001-list_paths- should possibly keep the pipeline happier. include mkmf in source files for test step of conda build. more echos, switch spot of echo output to avoid adjusting status of last-called shell command.
…he testing approach makes perfect sense locally- so why isnt the pipeline happy?
…tween string and ints in test success condition checks
…slowing this pipeline down for its own good!! (maybe...)
|
AHA! the failure in githhub's pipeline arises because the command there, for some reason, resolves the symbolic link file a little more simply: locally, the test |
|
relatively sure that once the |
|
It looks great, thanks! The What do you think about throwing in the noaa-gfdl anaconda channel key and having this pipeline publish as well as build. Too soon? It's odd that the tests needing adjusting (but then again I hadn't realized there were mkmf tests. :) |
nope!
no we can do it- i'll maybe say it should stick with an alpha version tag for now... at most, beta
100% conda build is derefencing links found in specified source files for the testing step! idk what the best way to deal with that is and not lose true quality control. |
put conda-relevant things in README- adjust markdown, update dependencies discussed. put disclaimer+license at the bottom of the readme to emphasize usage, installation, featurres etc.
update badge
|
Let's chat for a minute in-person on this when we can |
|
The templates should be a separate repository, as they're not really used by this repository out of necessity- they are a convenience for prospective users. We're informing this view point with the following:
|
… package directory.
slightly adjust current README instructions
test-run publish_conda workflow by asking it to run on push to `conda_package` branch, see what happens!
…gitlab/travis pipeline workflow files
underwoo
left a comment
There was a problem hiding this comment.
Some changes, or additional information needed.
Removed 'conda-forge::tcsh' from host, run, and test requirements.
…list (targeting #75 review) meta.yaml: - Add build steps to copy templates/* to $PREFIX/share/mkmf/templates/ so the templates are part of the conda package and discoverable by downstream tools (e.g. fre-cli) at a stable, predictable path: mkmf -t $CONDA_PREFIX/share/mkmf/templates/<name>.mk t/t004-templates.sh: - setup(): detect conda context via $PREFIX env var and set templateDir to the installed location; fall back to in-source templates/ otherwise - Remove stale template tests that no longer exist in templates/: ncrc-cray.mk, ncrc-gnu.mk, ncrc-pgi.mk, ncrc-intel.mk - Add tests for all templates that currently exist in templates/: hpcme-intel2025.03-oneapi.mk, hpcme-intel21/23/24.mk, linux-intel.mk, ncrc-nvhpc.mk, ncrc4-cce/gcc/intel.mk, ncrc5-cce/gcc/intel/intel-classic/intel-oneapi.mk
t000, t001, t002, t003, t004 — PATH check (underwoo line 8 / 'see above'): - Replace fragile 'do_we_have_mkmf=$(which mkmf) || echo ...' pattern with 'if [ $(command -v mkmf) ]' as suggested - Add comment explaining the dual-mode rationale: conda-installed copy is already on PATH and is the copy under test; local dev adds bin/ so the working copy is exercised instead of any system copy t001 — symlink isolation (underwoo lines 14 and 24): - setup(): create testDir first, copy t/src/ into it, create the file6.f90 symlink inside testDir/src/ instead of in the real source tree so teardown cleans it automatically and a killed test leaves no residue - teardown(): remove the now-unnecessary 'rm -f .../src/file6.f90' line - Update all test invocations from BATS_TEST_DIRNAME/src -> testDir/src t001 — count_lines usage (underwoo line 44): - Apply count_lines() helper to all seven 'cat file | wc -l' sites t003 — symlink isolation (same class as t001): - Same setup/teardown changes: copy src to testDir, symlink inside testDir - Update all BATS_TEST_DIRNAME/src references in test bodies to testDir/src including path-matching regexes in 'mkmf finds sources in directory' and 'mkmf finds include files in -I<INCLUDE>' t004 — fix syntax error from previous commit: - Restore missing testDir creation, cd, and teardown() that were accidentally dropped; setup() was left unclosed causing bats parse error
….yaml - Remove tcsh dependency from environment.yml per underwoo's review (tcsh is not used in any mkmf tools) - Remove bats-core from host: and run: requirements in meta.yaml (bats-core is a test runner, not a runtime dependency; it remains in test.requires where it belongs)
Address underwoo's follow-up review comment: the old approach skipped the PATH prepend when mkmf was already found on PATH, which could silently test a stale or unrelated copy and hide real failures. New approach: always prepend the appropriate directory to PATH. - In conda build test environments ($PREFIX set): use $PREFIX/bin where the just-built package was installed. - In local development: use the repo's own mkmf/bin/ directory. This ensures the tests always exercise the intended copy of mkmf regardless of what else is on the user's PATH.
Replace the if/else pattern that silently fell back to the repo's mkmf/bin/ directory with a two-step approach: 1. In conda build/test ($PREFIX set), prepend $PREFIX/bin to PATH 2. Verify mkmf is on PATH; if not, error out with an actionable message telling the user to add mkmf/bin to their PATH This addresses underwoo's review feedback: the old else branch could resolve a path that doesn't work and mask the real failure. Now, missing mkmf always causes an immediate, clear failure.
Runs bats tests directly against the repo checkout using system perl and bats from apt, exercising the local-development PATH setup in the test harness.
On pull_request: build only (test). On push to main: build and publish to anaconda.org using ANACONDA_TOKEN. Removes the now-redundant publish_conda workflow.
|
I decided that those testing locally checked out code will be yelled at by the tests if they have no added edit: |
Replace 'tr < /dev/urandom | fold | head' pipelines with bounded 'dd bs=45 count=1 | base64' approach. The old pipeline can hang when SIGPIPE delivery to tr is delayed, which was observed on bare ubuntu-latest runners (the conda container was unaffected).
|
Looks like this is ready for round 2. |
|
NOAA-GFDL/fre-cli#774 checks the compatibility of this with |
this PR:
meta.yamlandbuild.shto define theconda buildpackage recipeenvironment.ymldefining fully functionalcondaenvironment inwhichmkmfshould workbin/executables under a nestedmkmf"package" directory forconda buildrecipe compatibilityconda buildunder github's CI/CD pipelines,conda build .--no-anaconda-uploadversion in.github/workflows/build_conda.yml, with uploading in.github/workflows/publish_conda.yml. run conditions identical to that offre-cli.travis.yaml,.gitlab-ci.yml)list_paths prints versionregex reflect recent version stringst/t001-list_paths.shdoes set-up, now createst/src/file6.f90symbolic link on-the-fly. removed at end of each of those testsPATHand adjusts only if needed. abovefile6.f90link creation done on-the-fly fort/t003-mkmf.shas well.