rgpot 2.2.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- rgpot-2.2.1/.gitattributes +2 -0
- rgpot-2.2.1/.github/CODEOWNERS +13 -0
- rgpot-2.2.1/.github/actions/ensure-potctl/action.yml +30 -0
- rgpot-2.2.1/.github/actions/restore-ci-tools/action.yml +38 -0
- rgpot-2.2.1/.github/actions/setup-ci-tools/action.yml +134 -0
- rgpot-2.2.1/.github/dependabot.yml +10 -0
- rgpot-2.2.1/.github/workflows/ci-orchestrator.yml +489 -0
- rgpot-2.2.1/.github/workflows/ci_doc_commenter.yml +22 -0
- rgpot-2.2.1/.github/workflows/ci_docs.yml +46 -0
- rgpot-2.2.1/.github/workflows/cosmo-potctl.yml +214 -0
- rgpot-2.2.1/.github/workflows/coverage.yml +244 -0
- rgpot-2.2.1/.github/workflows/release-prepare.yml +81 -0
- rgpot-2.2.1/.github/workflows/release.yml +191 -0
- rgpot-2.2.1/.gitignore +355 -0
- rgpot-2.2.1/.lychee.toml +47 -0
- rgpot-2.2.1/.snapper.toml +8 -0
- rgpot-2.2.1/CHANGELOG.md +166 -0
- rgpot-2.2.1/CMakeLists.txt +321 -0
- rgpot-2.2.1/CODEOWNERS +13 -0
- rgpot-2.2.1/CODE_OF_CONDUCT.md +132 -0
- rgpot-2.2.1/Cargo.lock +1002 -0
- rgpot-2.2.1/Cargo.toml +10 -0
- rgpot-2.2.1/CppCore/.clang-format +148 -0
- rgpot-2.2.1/CppCore/examples/call_cuh2.cc +31 -0
- rgpot-2.2.1/CppCore/examples/eigen_call_cuh2.cc +32 -0
- rgpot-2.2.1/CppCore/examples/eigen_call_ljpot.cc +27 -0
- rgpot-2.2.1/CppCore/examples/xt_call_cuh2.cc +38 -0
- rgpot-2.2.1/CppCore/meson.build +359 -0
- rgpot-2.2.1/CppCore/rgpot/CPMDPot/CPMDPot.cc +497 -0
- rgpot-2.2.1/CppCore/rgpot/CPMDPot/CPMDPot.hpp +43 -0
- rgpot-2.2.1/CppCore/rgpot/CPMDPot/README.md +211 -0
- rgpot-2.2.1/CppCore/rgpot/CPMDPot/cpmd_c_abi.h +185 -0
- rgpot-2.2.1/CppCore/rgpot/CPMDPot/cpmd_c_abi_stub.c +185 -0
- rgpot-2.2.1/CppCore/rgpot/CPMDPot/cpmd_feature_table.inc +153 -0
- rgpot-2.2.1/CppCore/rgpot/CPMDPot/meson.build +38 -0
- rgpot-2.2.1/CppCore/rgpot/CuH2/CuH2Pot.cc +61 -0
- rgpot-2.2.1/CppCore/rgpot/CuH2/CuH2Pot.hpp +72 -0
- rgpot-2.2.1/CppCore/rgpot/CuH2/cuh2Utils.cc +141 -0
- rgpot-2.2.1/CppCore/rgpot/CuH2/cuh2Utils.hpp +91 -0
- rgpot-2.2.1/CppCore/rgpot/CuH2/meson.build +40 -0
- rgpot-2.2.1/CppCore/rgpot/CuH2/tmp.con +231 -0
- rgpot-2.2.1/CppCore/rgpot/CuH2/tmp_tiny.con +17 -0
- rgpot-2.2.1/CppCore/rgpot/ForceStructs.hpp +38 -0
- rgpot-2.2.1/CppCore/rgpot/LennardJones/LJPot.cc +92 -0
- rgpot-2.2.1/CppCore/rgpot/LennardJones/LJPot.hpp +55 -0
- rgpot-2.2.1/CppCore/rgpot/LennardJones/meson.build +8 -0
- rgpot-2.2.1/CppCore/rgpot/MetatomicPot/MetatomicConfig.hpp +30 -0
- rgpot-2.2.1/CppCore/rgpot/MetatomicPot/MetatomicDlopen.cc +176 -0
- rgpot-2.2.1/CppCore/rgpot/MetatomicPot/MetatomicDlopen.hpp +40 -0
- rgpot-2.2.1/CppCore/rgpot/MetatomicPot/MetatomicEngineAbi.cc +90 -0
- rgpot-2.2.1/CppCore/rgpot/MetatomicPot/MetatomicPot.cc +534 -0
- rgpot-2.2.1/CppCore/rgpot/MetatomicPot/MetatomicPot.hpp +69 -0
- rgpot-2.2.1/CppCore/rgpot/MetatomicPot/meson.build +91 -0
- rgpot-2.2.1/CppCore/rgpot/MetatomicPot/metatomic_c_abi.h +65 -0
- rgpot-2.2.1/CppCore/rgpot/MetatomicPot/vesin_compat.hpp +59 -0
- rgpot-2.2.1/CppCore/rgpot/NWChemPot/DynLib.hpp +110 -0
- rgpot-2.2.1/CppCore/rgpot/NWChemPot/NWChemPot.cc +409 -0
- rgpot-2.2.1/CppCore/rgpot/NWChemPot/NWChemPot.hpp +53 -0
- rgpot-2.2.1/CppCore/rgpot/NWChemPot/README.md +160 -0
- rgpot-2.2.1/CppCore/rgpot/NWChemPot/meson.build +42 -0
- rgpot-2.2.1/CppCore/rgpot/NWChemPot/nwchem_c_abi.h +58 -0
- rgpot-2.2.1/CppCore/rgpot/NWChemPot/nwchem_c_abi_stub.c +40 -0
- rgpot-2.2.1/CppCore/rgpot/PotHelpers.cc +47 -0
- rgpot-2.2.1/CppCore/rgpot/PotHelpers.hpp +103 -0
- rgpot-2.2.1/CppCore/rgpot/Potential.hpp +198 -0
- rgpot-2.2.1/CppCore/rgpot/PotentialCache.cc +128 -0
- rgpot-2.2.1/CppCore/rgpot/PotentialCache.hpp +106 -0
- rgpot-2.2.1/CppCore/rgpot/TBLitePot/TBLitePot.cc +142 -0
- rgpot-2.2.1/CppCore/rgpot/TBLitePot/TBLitePot.hpp +49 -0
- rgpot-2.2.1/CppCore/rgpot/TBLitePot/meson.build +8 -0
- rgpot-2.2.1/CppCore/rgpot/XTBPot/XTBPot.cc +126 -0
- rgpot-2.2.1/CppCore/rgpot/XTBPot/XTBPot.hpp +49 -0
- rgpot-2.2.1/CppCore/rgpot/XTBPot/meson.build +8 -0
- rgpot-2.2.1/CppCore/rgpot/abi/ProfileLoader.hpp +185 -0
- rgpot-2.2.1/CppCore/rgpot/base_types.hpp +39 -0
- rgpot-2.2.1/CppCore/rgpot/pot_types.hpp +37 -0
- rgpot-2.2.1/CppCore/rgpot/rpc/Potentials.capnp +2447 -0
- rgpot-2.2.1/CppCore/rgpot/rpc/ase_calculator.py +179 -0
- rgpot-2.2.1/CppCore/rgpot/rpc/ase_helpers.py +130 -0
- rgpot-2.2.1/CppCore/rgpot/rpc/capnp_compile.py +21 -0
- rgpot-2.2.1/CppCore/rgpot/rpc/meson.build +86 -0
- rgpot-2.2.1/CppCore/rgpot/rpc/pot_bridge.cc +180 -0
- rgpot-2.2.1/CppCore/rgpot/rpc/pot_bridge.h +67 -0
- rgpot-2.2.1/CppCore/rgpot/rpc/py_comp_multiprocess.py +222 -0
- rgpot-2.2.1/CppCore/rgpot/rpc/py_mpi_comp.py +236 -0
- rgpot-2.2.1/CppCore/rgpot/rpc/py_parclient.py +224 -0
- rgpot-2.2.1/CppCore/rgpot/rpc/pyclient.py +80 -0
- rgpot-2.2.1/CppCore/rgpot/rpc/server.cpp +311 -0
- rgpot-2.2.1/CppCore/rgpot/types/AtomMatrix.hpp +156 -0
- rgpot-2.2.1/CppCore/rgpot/types/adapters/capnp/capnp_adapter.hpp +132 -0
- rgpot-2.2.1/CppCore/rgpot/types/adapters/eigen.hpp +84 -0
- rgpot-2.2.1/CppCore/rgpot/types/adapters/xtensor.hpp +85 -0
- rgpot-2.2.1/CppCore/rgpot/units.cc +540 -0
- rgpot-2.2.1/CppCore/rgpot/units.hpp +80 -0
- rgpot-2.2.1/CppCore/tests/BridgeStressTest.cc +167 -0
- rgpot-2.2.1/CppCore/tests/CPMDPotMessageAbiTest.cc +46 -0
- rgpot-2.2.1/CppCore/tests/CacheTest.cc +147 -0
- rgpot-2.2.1/CppCore/tests/CapnpAdapterTest.cc +70 -0
- rgpot-2.2.1/CppCore/tests/CuH2PotTest.cc +43 -0
- rgpot-2.2.1/CppCore/tests/InvarianceTest.cc +93 -0
- rgpot-2.2.1/CppCore/tests/MetatomicPotTest.cc +492 -0
- rgpot-2.2.1/CppCore/tests/NWChemPotMessageAbiTest.cc +95 -0
- rgpot-2.2.1/CppCore/tests/NWChemPotTest.cc +275 -0
- rgpot-2.2.1/CppCore/tests/ProfileLoaderTest.cc +156 -0
- rgpot-2.2.1/CppCore/tests/TBLitePotTest.cc +71 -0
- rgpot-2.2.1/CppCore/tests/UnitsTest.cc +126 -0
- rgpot-2.2.1/CppCore/tests/XTBPotTest.cc +75 -0
- rgpot-2.2.1/CppCore/tests/cpmdc_fake_engine.cc +399 -0
- rgpot-2.2.1/CppCore/tests/cuh2UtilsTest.cc +64 -0
- rgpot-2.2.1/CppCore/tests/data/lj38/lennard-jones.pt +0 -0
- rgpot-2.2.1/CppCore/tests/nwchemc_fake_engine.c +44 -0
- rgpot-2.2.1/CppCore/tests/test_cpmd_abi_main.c +51 -0
- rgpot-2.2.1/CppCore/tests/test_cpmd_dlopen_contract.py +132 -0
- rgpot-2.2.1/CppCore/tests/test_nwchem_abi_main.c +33 -0
- rgpot-2.2.1/CppCore/tests/test_nwchem_dlopen_contract.py +96 -0
- rgpot-2.2.1/CppCore/tests/test_rpc_schema_sync.py +39 -0
- rgpot-2.2.1/LICENSE +21 -0
- rgpot-2.2.1/PKG-INFO +233 -0
- rgpot-2.2.1/README.md +200 -0
- rgpot-2.2.1/SECURITY.md +31 -0
- rgpot-2.2.1/branding/logo/rgpot_logo.webp +0 -0
- rgpot-2.2.1/branding/logo/rgpot_logo_dark.webp +0 -0
- rgpot-2.2.1/branding/logo/rgpot_logo_light.webp +0 -0
- rgpot-2.2.1/branding/logo/rgpot_notext.svg +1 -0
- rgpot-2.2.1/branding/logo/rgpot_notext_dark.webp +0 -0
- rgpot-2.2.1/branding/logo/rgpot_notext_light.webp +0 -0
- rgpot-2.2.1/ci/gha/README.md +176 -0
- rgpot-2.2.1/ci/gha/build.ncl +176 -0
- rgpot-2.2.1/ci/gha/check-drift.sh +29 -0
- rgpot-2.2.1/ci/gha/ci_doc_commenter.ncl +34 -0
- rgpot-2.2.1/ci/gha/ci_docs.ncl +46 -0
- rgpot-2.2.1/ci/gha/cosmo_potctl.ncl +232 -0
- rgpot-2.2.1/ci/gha/docs_quality.ncl +95 -0
- rgpot-2.2.1/ci/gha/export-plan.sh +41 -0
- rgpot-2.2.1/ci/gha/format.sh +12 -0
- rgpot-2.2.1/ci/gha/gen.sh +30 -0
- rgpot-2.2.1/ci/gha/lib/pins.ncl +32 -0
- rgpot-2.2.1/ci/gha/lib/steps.ncl +168 -0
- rgpot-2.2.1/ci/gha/plan.ncl +123 -0
- rgpot-2.2.1/ci/gha/potentials.ncl +194 -0
- rgpot-2.2.1/ci/gha/prek.ncl +70 -0
- rgpot-2.2.1/ci/gha/release.ncl +194 -0
- rgpot-2.2.1/ci/gha/release_prepare.ncl +76 -0
- rgpot-2.2.1/ci/gha/towncrier.ncl +44 -0
- rgpot-2.2.1/ci/gha/workflow.ncl +3 -0
- rgpot-2.2.1/codecov.yml +78 -0
- rgpot-2.2.1/cog.toml +68 -0
- rgpot-2.2.1/docs/export.el +25 -0
- rgpot-2.2.1/docs/newsfragments/+metatomic-engine-dlopen.added.md +2 -0
- rgpot-2.2.1/docs/newsfragments/+metatomic-strict-determinism.added.md +9 -0
- rgpot-2.2.1/docs/newsfragments/+pip-metatomic-dlopen.added.md +1 -0
- rgpot-2.2.1/docs/newsfragments/+pip-rgpot-wheel.added.md +1 -0
- rgpot-2.2.1/docs/newsfragments/+pip-rpath-repair-hook.added.md +3 -0
- rgpot-2.2.1/docs/newsfragments/.gitkeep +0 -0
- rgpot-2.2.1/docs/newsfragments/47.added.md +1 -0
- rgpot-2.2.1/docs/newsfragments/README.md +50 -0
- rgpot-2.2.1/docs/orgmode/_static/eon_min_landscape.png +0 -0
- rgpot-2.2.1/docs/orgmode/_static/pes_double_well.png +0 -0
- rgpot-2.2.1/docs/orgmode/changelog.org +15 -0
- rgpot-2.2.1/docs/orgmode/code_of_conduct.org +9 -0
- rgpot-2.2.1/docs/orgmode/contributing/developer/faq.org +55 -0
- rgpot-2.2.1/docs/orgmode/contributing/developer/index.org +122 -0
- rgpot-2.2.1/docs/orgmode/contributing/developer/release.org +204 -0
- rgpot-2.2.1/docs/orgmode/contributing/developer/testing.org +90 -0
- rgpot-2.2.1/docs/orgmode/contributing/index.org +41 -0
- rgpot-2.2.1/docs/orgmode/howto/eindir-anneal.org +86 -0
- rgpot-2.2.1/docs/orgmode/howto/embedding.org +123 -0
- rgpot-2.2.1/docs/orgmode/howto/eon-rgpot.org +71 -0
- rgpot-2.2.1/docs/orgmode/howto/integration.org +414 -0
- rgpot-2.2.1/docs/orgmode/index.org +88 -0
- rgpot-2.2.1/docs/orgmode/reference/architecture.org +320 -0
- rgpot-2.2.1/docs/orgmode/tutorials/molecular-global-optimization.org +197 -0
- rgpot-2.2.1/docs/orgmode/tutorials/quickstart.org +87 -0
- rgpot-2.2.1/docs/source/Doxyfile_base.cfg +2930 -0
- rgpot-2.2.1/docs/source/Doxyfile_potlib.cfg +97 -0
- rgpot-2.2.1/docs/source/_static/custom.css +290 -0
- rgpot-2.2.1/docs/source/_static/rgpot_logo_dark.webp +0 -0
- rgpot-2.2.1/docs/source/_static/rgpot_logo_light.webp +0 -0
- rgpot-2.2.1/docs/source/_static/rgpot_notext_dark.webp +0 -0
- rgpot-2.2.1/docs/source/_static/rgpot_notext_light.webp +0 -0
- rgpot-2.2.1/docs/source/_templates/partials/extra-head.html +13 -0
- rgpot-2.2.1/docs/source/_templates/partials/site-foot.html +73 -0
- rgpot-2.2.1/docs/source/conf.py +108 -0
- rgpot-2.2.1/docs/source/doxyrest-config.lua +12 -0
- rgpot-2.2.1/docs/style_guide.org +122 -0
- rgpot-2.2.1/include/rgpot/errors.hpp +80 -0
- rgpot-2.2.1/include/rgpot/potential.hpp +253 -0
- rgpot-2.2.1/include/rgpot/rgpot.hpp +33 -0
- rgpot-2.2.1/include/rgpot/rpc_client.hpp +137 -0
- rgpot-2.2.1/include/rgpot/types.hpp +229 -0
- rgpot-2.2.1/meson.build +383 -0
- rgpot-2.2.1/meson_options.txt +14 -0
- rgpot-2.2.1/pixi.lock +19482 -0
- rgpot-2.2.1/pixi.toml +236 -0
- rgpot-2.2.1/potctl/Cargo.toml +27 -0
- rgpot-2.2.1/potctl/README.md +77 -0
- rgpot-2.2.1/potctl/cosmo/README.md +106 -0
- rgpot-2.2.1/potctl/cosmo/aarch64-unknown-linux-cosmo.json +42 -0
- rgpot-2.2.1/potctl/cosmo/x86_64-unknown-linux-cosmo.json +43 -0
- rgpot-2.2.1/potctl/src/ci.rs +1520 -0
- rgpot-2.2.1/potctl/src/cosmo.rs +1318 -0
- rgpot-2.2.1/potctl/src/cosmo_ld.rs +18 -0
- rgpot-2.2.1/potctl/src/lockstep.rs +375 -0
- rgpot-2.2.1/potctl/src/main.rs +354 -0
- rgpot-2.2.1/prek.toml +100 -0
- rgpot-2.2.1/pyproject.toml +81 -0
- rgpot-2.2.1/python/bind/bind_module.cpp +175 -0
- rgpot-2.2.1/python/meson.build +75 -0
- rgpot-2.2.1/python/rgpot/__init__.py +65 -0
- rgpot-2.2.1/readme_src.org +154 -0
- rgpot-2.2.1/rgpot-core/Cargo.lock +946 -0
- rgpot-2.2.1/rgpot-core/Cargo.toml +42 -0
- rgpot-2.2.1/rgpot-core/README.md +45 -0
- rgpot-2.2.1/rgpot-core/README.org +47 -0
- rgpot-2.2.1/rgpot-core/build.rs +102 -0
- rgpot-2.2.1/rgpot-core/cbindgen.toml +34 -0
- rgpot-2.2.1/rgpot-core/include/rgpot.h +426 -0
- rgpot-2.2.1/rgpot-core/schema/Potentials.capnp +2447 -0
- rgpot-2.2.1/rgpot-core/src/c_api/mod.rs +36 -0
- rgpot-2.2.1/rgpot-core/src/c_api/potential.rs +362 -0
- rgpot-2.2.1/rgpot-core/src/c_api/rpc.rs +103 -0
- rgpot-2.2.1/rgpot-core/src/c_api/types.rs +160 -0
- rgpot-2.2.1/rgpot-core/src/eindir.rs +533 -0
- rgpot-2.2.1/rgpot-core/src/lib.rs +69 -0
- rgpot-2.2.1/rgpot-core/src/potential.rs +337 -0
- rgpot-2.2.1/rgpot-core/src/rpc/client.rs +188 -0
- rgpot-2.2.1/rgpot-core/src/rpc/mod.rs +42 -0
- rgpot-2.2.1/rgpot-core/src/rpc/server.rs +206 -0
- rgpot-2.2.1/rgpot-core/src/status.rs +167 -0
- rgpot-2.2.1/rgpot-core/src/tensor.rs +659 -0
- rgpot-2.2.1/rgpot-core/src/types.rs +180 -0
- rgpot-2.2.1/scripts/ase_anneal_compare.sh +54 -0
- rgpot-2.2.1/scripts/check_codecov_config.sh +38 -0
- rgpot-2.2.1/scripts/cpmd_inprocess_vs_subprocess_timing.sh +33 -0
- rgpot-2.2.1/scripts/org_to_md.sh +57 -0
- rgpot-2.2.1/scripts/patches/doxyrest/doxyrest.py +515 -0
- rgpot-2.2.1/scripts/patches/doxyrest/enum_class_fix.patch +5 -0
- rgpot-2.2.1/scripts/patches/doxyrest/readme.org +5 -0
- rgpot-2.2.1/scripts/pes_double_well.sh +27 -0
- rgpot-2.2.1/scripts/rgpot_build_wheel.sh +19 -0
- rgpot-2.2.1/scripts/rgpot_repair_wheel.sh +72 -0
- rgpot-2.2.1/scripts/run_coverage_cpp.sh +69 -0
- rgpot-2.2.1/scripts/run_coverage_fortran.sh +94 -0
- rgpot-2.2.1/scripts/run_coverage_python.sh +59 -0
- rgpot-2.2.1/scripts/run_coverage_rust.sh +40 -0
- rgpot-2.2.1/subprojects/eigen.wrap +11 -0
- rgpot-2.2.1/subprojects/fmt.wrap +12 -0
- rgpot-2.2.1/subprojects/fortcuh2/.gitignore +40 -0
- rgpot-2.2.1/subprojects/fortcuh2/LICENSE +29 -0
- rgpot-2.2.1/subprojects/fortcuh2/eam_dat.f90 +30 -0
- rgpot-2.2.1/subprojects/fortcuh2/eam_isoc.f90 +33 -0
- rgpot-2.2.1/subprojects/fortcuh2/eamroutines.f90 +609 -0
- rgpot-2.2.1/subprojects/fortcuh2/main.f90 +80 -0
- rgpot-2.2.1/subprojects/fortcuh2/meson.build +47 -0
- rgpot-2.2.1/subprojects/fortcuh2/readme.md +10 -0
- rgpot-2.2.1/subprojects/fortcuh2/tmp.con +231 -0
- rgpot-2.2.1/subprojects/fortcuh2.wrap +6 -0
- rgpot-2.2.1/subprojects/packagefiles/fortcuh2/meson.build +52 -0
- rgpot-2.2.1/subprojects/potentials-schema.wrap +5 -0
- rgpot-2.2.1/subprojects/xxhash.wrap +13 -0
- rgpot-2.2.1/tests/ase_vs_anneal.py +166 -0
- rgpot-2.2.1/tests/con_relax_demo.py +75 -0
- rgpot-2.2.1/tests/cpmd_params.py +352 -0
- rgpot-2.2.1/tests/eon_min_landscape.py +101 -0
- rgpot-2.2.1/tests/nwchem_params.py +66 -0
- rgpot-2.2.1/tests/pes_double_well.py +125 -0
- rgpot-2.2.1/tests/rpc_integ.py +315 -0
- rgpot-2.2.1/tests/test_cpmd_params.py +322 -0
- rgpot-2.2.1/tests/test_nwchem_params.py +141 -0
- rgpot-2.2.1/tests/test_rgpot_metatomic_dlopen.py +118 -0
- rgpot-2.2.1/tests/test_rgpot_pip_core.py +104 -0
- rgpot-2.2.1/tests/test_rpc_e2e_c_abi.py +196 -0
- rgpot-2.2.1/tests/test_rpc_integ_cpmd.py +101 -0
- rgpot-2.2.1/tests/test_rpc_integ_nwchem.py +61 -0
- rgpot-2.2.1/towncrier.toml +49 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Release / publish surfaces — require maintainer eyes on PRs that touch the cut path.
|
|
2
|
+
# (GitHub only enforces CODEOWNERS when branch protection enables it.)
|
|
3
|
+
|
|
4
|
+
/cog.toml @HaoZeke
|
|
5
|
+
/towncrier.toml @HaoZeke
|
|
6
|
+
/potctl/ @HaoZeke
|
|
7
|
+
/Cargo.toml @HaoZeke
|
|
8
|
+
/.github/actions/ @HaoZeke
|
|
9
|
+
/.github/workflows/release.yml @HaoZeke
|
|
10
|
+
/.github/workflows/release-prepare.yml @HaoZeke
|
|
11
|
+
/.github/workflows/towncrier.yml @HaoZeke
|
|
12
|
+
/docs/newsfragments/ @HaoZeke
|
|
13
|
+
/SECURITY.md @HaoZeke
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Restore prebuilt portable/fat potctl for this runner OS (from ci-tools matrix job).
|
|
2
|
+
# Artifact name must include runner.os (ci-tools builds Linux musl vs macOS lipo fat separately;
|
|
3
|
+
# one binary cannot span Linux and Darwin, but within each OS it is as portable as Rust allows).
|
|
4
|
+
name: Ensure potctl
|
|
5
|
+
description: >
|
|
6
|
+
Download OS-matched ci-tools artifact (musl Linux or fat macOS potctl) and run preflight.
|
|
7
|
+
|
|
8
|
+
inputs:
|
|
9
|
+
artifact-prefix:
|
|
10
|
+
# runner.os is appended in the restore step (not valid in input description expressions).
|
|
11
|
+
description: Prefix before runner OS suffix (e.g. ci-tools-sha becomes ci-tools-sha-Linux or ci-tools-sha-macOS)
|
|
12
|
+
required: false
|
|
13
|
+
default: ci-tools
|
|
14
|
+
preflight:
|
|
15
|
+
description: Run potctl ci preflight after install
|
|
16
|
+
required: false
|
|
17
|
+
default: "true"
|
|
18
|
+
|
|
19
|
+
runs:
|
|
20
|
+
using: composite
|
|
21
|
+
steps:
|
|
22
|
+
- name: Restore potctl (${{ runner.os }} portable/fat artifact)
|
|
23
|
+
uses: ./.github/actions/restore-ci-tools
|
|
24
|
+
with:
|
|
25
|
+
artifact-name: ${{ inputs.artifact-prefix }}-${{ runner.os }}
|
|
26
|
+
|
|
27
|
+
- name: potctl ci preflight
|
|
28
|
+
if: inputs.preflight == 'true'
|
|
29
|
+
shell: bash
|
|
30
|
+
run: potctl ci preflight
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Download a ci-tools artifact produced by setup-ci-tools (upload-artifact=true)
|
|
2
|
+
# and put its bin/ on PATH. No cargo/rust required on this runner.
|
|
3
|
+
name: Restore CI tools
|
|
4
|
+
description: Download staged ci-tools artifact and add bin/ to PATH
|
|
5
|
+
|
|
6
|
+
inputs:
|
|
7
|
+
artifact-name:
|
|
8
|
+
description: Artifact name uploaded by setup-ci-tools
|
|
9
|
+
required: false
|
|
10
|
+
default: ci-tools
|
|
11
|
+
|
|
12
|
+
runs:
|
|
13
|
+
using: composite
|
|
14
|
+
steps:
|
|
15
|
+
- name: Download ci-tools artifact
|
|
16
|
+
uses: actions/download-artifact@v4
|
|
17
|
+
with:
|
|
18
|
+
name: ${{ inputs.artifact-name }}
|
|
19
|
+
path: ${{ runner.temp }}/ci-tools
|
|
20
|
+
|
|
21
|
+
- name: Put ci-tools on PATH
|
|
22
|
+
shell: bash
|
|
23
|
+
run: |
|
|
24
|
+
set -euo pipefail
|
|
25
|
+
PREFIX="${RUNNER_TEMP}/ci-tools"
|
|
26
|
+
if [ ! -d "${PREFIX}/bin" ]; then
|
|
27
|
+
echo "error: ${PREFIX}/bin missing after artifact download" >&2
|
|
28
|
+
ls -laR "${PREFIX}" 2>/dev/null || true
|
|
29
|
+
exit 1
|
|
30
|
+
fi
|
|
31
|
+
chmod -R a+rX "${PREFIX}"
|
|
32
|
+
# binaries must be executable after artifact round-trip
|
|
33
|
+
find "${PREFIX}/bin" -type f -exec chmod a+x {} +
|
|
34
|
+
echo "CI_TOOLS_PREFIX=${PREFIX}" >> "$GITHUB_ENV"
|
|
35
|
+
echo "${PREFIX}/bin" >> "$GITHUB_PATH"
|
|
36
|
+
ls -la "${PREFIX}/bin"
|
|
37
|
+
command -v potctl || test -x "${PREFIX}/bin/potctl"
|
|
38
|
+
"${PREFIX}/bin/potctl" --help | head -2 || true
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
# Build/install repo CI tools (potctl) into ci-tools/bin.
|
|
2
|
+
# Portable/fat builds:
|
|
3
|
+
# Linux — x86_64-unknown-linux-musl when available (static-ish, runs across distros);
|
|
4
|
+
# falls back to host triple with -C target-feature=+crt-static when feasible.
|
|
5
|
+
# macOS — universal fat binary (aarch64-apple-darwin + x86_64-apple-darwin via lipo).
|
|
6
|
+
# Upload uses artifact-name (caller should include runner.os so restore picks the right file).
|
|
7
|
+
name: Setup CI tools
|
|
8
|
+
description: >
|
|
9
|
+
Build portable/fat potctl into ci-tools/bin; optional cog; optional artifact upload.
|
|
10
|
+
|
|
11
|
+
inputs:
|
|
12
|
+
install-cog:
|
|
13
|
+
description: Install cocogitto 7 into ci-tools/bin (cargo install --root)
|
|
14
|
+
required: false
|
|
15
|
+
default: "false"
|
|
16
|
+
upload-artifact:
|
|
17
|
+
description: Upload ci-tools/ as a GHA artifact for other jobs
|
|
18
|
+
required: false
|
|
19
|
+
default: "false"
|
|
20
|
+
artifact-name:
|
|
21
|
+
description: Artifact name when upload-artifact is true (include OS, e.g. ci-tools-sha-Linux)
|
|
22
|
+
required: false
|
|
23
|
+
default: ci-tools
|
|
24
|
+
potctl-features:
|
|
25
|
+
description: Extra cargo features for potctl (usually empty)
|
|
26
|
+
required: false
|
|
27
|
+
default: ""
|
|
28
|
+
|
|
29
|
+
runs:
|
|
30
|
+
using: composite
|
|
31
|
+
steps:
|
|
32
|
+
- name: Rust toolchain (stable + cross targets)
|
|
33
|
+
uses: dtolnay/rust-toolchain@stable
|
|
34
|
+
with:
|
|
35
|
+
targets: ${{ runner.os == 'macOS' && 'aarch64-apple-darwin,x86_64-apple-darwin' || 'x86_64-unknown-linux-musl' }}
|
|
36
|
+
|
|
37
|
+
- name: musl linker (Linux portable build)
|
|
38
|
+
if: runner.os == 'Linux'
|
|
39
|
+
shell: bash
|
|
40
|
+
run: |
|
|
41
|
+
set -euo pipefail
|
|
42
|
+
# musl target needs a musl-capable linker on the runner
|
|
43
|
+
if ! command -v musl-gcc >/dev/null 2>&1 && ! command -v x86_64-linux-musl-gcc >/dev/null 2>&1; then
|
|
44
|
+
sudo apt-get update -qq
|
|
45
|
+
sudo apt-get install -y -qq musl-tools
|
|
46
|
+
fi
|
|
47
|
+
musl-gcc --version | head -1 || true
|
|
48
|
+
|
|
49
|
+
- name: Rust cache (workspace / potctl)
|
|
50
|
+
uses: Swatinem/rust-cache@v2
|
|
51
|
+
with:
|
|
52
|
+
workspaces: ". -> target"
|
|
53
|
+
# Include OS so macOS/linux caches do not collide
|
|
54
|
+
shared-key: potctl-ci-tools-${{ runner.os }}
|
|
55
|
+
cache-targets: true
|
|
56
|
+
cache-all-crates: false
|
|
57
|
+
|
|
58
|
+
- name: Prepare ci-tools prefix
|
|
59
|
+
shell: bash
|
|
60
|
+
run: |
|
|
61
|
+
set -euo pipefail
|
|
62
|
+
PREFIX="${RUNNER_TEMP}/ci-tools"
|
|
63
|
+
mkdir -p "${PREFIX}/bin"
|
|
64
|
+
echo "CI_TOOLS_PREFIX=${PREFIX}" >> "$GITHUB_ENV"
|
|
65
|
+
echo "${PREFIX}/bin" >> "$GITHUB_PATH"
|
|
66
|
+
|
|
67
|
+
- name: Build portable potctl
|
|
68
|
+
shell: bash
|
|
69
|
+
run: |
|
|
70
|
+
set -euo pipefail
|
|
71
|
+
PREFIX="${CI_TOOLS_PREFIX:-${RUNNER_TEMP}/ci-tools}"
|
|
72
|
+
FEATURES_ARGS=()
|
|
73
|
+
if [ -n "${{ inputs.potctl-features }}" ]; then
|
|
74
|
+
FEATURES_ARGS=(--features "${{ inputs.potctl-features }}")
|
|
75
|
+
fi
|
|
76
|
+
OUT=""
|
|
77
|
+
case "${RUNNER_OS:-}" in
|
|
78
|
+
macOS)
|
|
79
|
+
# Fat/universal: arm64 + x86_64 in one Mach-O (runs on Apple Silicon and Intel runners).
|
|
80
|
+
echo "Building macOS fat potctl (aarch64 + x86_64)..."
|
|
81
|
+
cargo build -q -p potctl --release --target aarch64-apple-darwin "${FEATURES_ARGS[@]+"${FEATURES_ARGS[@]}"}"
|
|
82
|
+
cargo build -q -p potctl --release --target x86_64-apple-darwin "${FEATURES_ARGS[@]+"${FEATURES_ARGS[@]}"}"
|
|
83
|
+
lipo -create -output "${PREFIX}/bin/potctl" \
|
|
84
|
+
target/aarch64-apple-darwin/release/potctl \
|
|
85
|
+
target/x86_64-apple-darwin/release/potctl
|
|
86
|
+
lipo -info "${PREFIX}/bin/potctl"
|
|
87
|
+
OUT="${PREFIX}/bin/potctl"
|
|
88
|
+
;;
|
|
89
|
+
Linux)
|
|
90
|
+
# musl: single static-linked binary, portable across glibc/musl hosts (same arch).
|
|
91
|
+
if rustup target list --installed | grep -qx 'x86_64-unknown-linux-musl' \
|
|
92
|
+
|| rustup target add x86_64-unknown-linux-musl 2>/dev/null; then
|
|
93
|
+
echo "Building Linux musl potctl (portable)..."
|
|
94
|
+
export RUSTFLAGS="${RUSTFLAGS:-} -C target-feature=+crt-static"
|
|
95
|
+
cargo build -q -p potctl --release --target x86_64-unknown-linux-musl "${FEATURES_ARGS[@]+"${FEATURES_ARGS[@]}"}"
|
|
96
|
+
install -m 0755 target/x86_64-unknown-linux-musl/release/potctl "${PREFIX}/bin/potctl"
|
|
97
|
+
else
|
|
98
|
+
echo "musl target unavailable; host triple release build"
|
|
99
|
+
cargo build -q -p potctl --release "${FEATURES_ARGS[@]+"${FEATURES_ARGS[@]}"}"
|
|
100
|
+
install -m 0755 target/release/potctl "${PREFIX}/bin/potctl"
|
|
101
|
+
fi
|
|
102
|
+
OUT="${PREFIX}/bin/potctl"
|
|
103
|
+
file "$OUT" || true
|
|
104
|
+
ldd "$OUT" 2>/dev/null || echo "(static or non-ELF check skipped)"
|
|
105
|
+
;;
|
|
106
|
+
*)
|
|
107
|
+
cargo build -q -p potctl --release "${FEATURES_ARGS[@]+"${FEATURES_ARGS[@]}"}"
|
|
108
|
+
install -m 0755 target/release/potctl "${PREFIX}/bin/potctl"
|
|
109
|
+
OUT="${PREFIX}/bin/potctl"
|
|
110
|
+
;;
|
|
111
|
+
esac
|
|
112
|
+
"$OUT" --version 2>/dev/null || "$OUT" --help | head -2
|
|
113
|
+
echo "potctl installed -> $OUT (portable/fat build for ${RUNNER_OS:-unknown})"
|
|
114
|
+
|
|
115
|
+
- name: Install cocogitto (cog) into ci-tools
|
|
116
|
+
if: inputs.install-cog == 'true'
|
|
117
|
+
shell: bash
|
|
118
|
+
run: |
|
|
119
|
+
set -euo pipefail
|
|
120
|
+
PREFIX="${CI_TOOLS_PREFIX:-${RUNNER_TEMP}/ci-tools}"
|
|
121
|
+
if [ ! -x "${PREFIX}/bin/cog" ]; then
|
|
122
|
+
cargo install --locked --root "$PREFIX" cocogitto --version 7.0.0 \
|
|
123
|
+
|| cargo install --locked --root "$PREFIX" cocogitto
|
|
124
|
+
fi
|
|
125
|
+
cog --version
|
|
126
|
+
|
|
127
|
+
- name: Upload ci-tools artifact
|
|
128
|
+
if: inputs.upload-artifact == 'true'
|
|
129
|
+
uses: actions/upload-artifact@v4
|
|
130
|
+
with:
|
|
131
|
+
name: ${{ inputs.artifact-name }}
|
|
132
|
+
path: ${{ runner.temp }}/ci-tools
|
|
133
|
+
if-no-files-found: error
|
|
134
|
+
retention-days: 3
|