Skip to content

Ship a rainix-copy-artifacts.yaml reusable workflow #169

@thedavidmeister

Description

@thedavidmeister

Sibling to #168 (shared Solidity library). Both rain.math.float and rain.interpreter (rainlang) currently maintain their own .github/workflows/copy-artifacts.yaml that rebuilds Solidity, extracts the deterministic ABI subset, and asserts git diff --exit-code. The structure is identical except for:

  • Whether a meta-build prelude runs first (rainlang needs it, float doesn't).
  • The contract list (lives in the repo's own script/lib/LibCopyArtifacts.sol).
  • The committed path (crates/float/abi/ vs crates/abi/).

What to ship

rainix-copy-artifacts.yaml reusable workflow that:

  1. Checks out the repo.
  2. Installs Nix + cache.
  3. Runs soldeer install (gated on soldeer.lock existing).
  4. Optionally runs a caller-provided prelude command (input prelude:, default empty).
  5. Compiles Solidity.
  6. Runs the caller's script/CopyArtifacts.sol (which uses the shared LibCopyArtifacts from Ship a shared LibCopyArtifacts in rainix #168).
  7. Formats.
  8. Asserts git diff --exit-code.

Caller usage shrinks to:

name: copy-artifacts
on: [push]
jobs:
  copy-artifacts:
    uses: rainlanguage/rainix/.github/workflows/rainix-copy-artifacts.yaml@main
    with:
      prelude: <meta-prelude-name>

Migration

Land #168 (shared Lib) and this reusable together, then port both rain.math.float and rain.interpreter to consume them. Leaving either repo on a local copy defeats the purpose.

Metadata

Metadata

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions