@@ -2,36 +2,9 @@ name: copy-artifacts
22on : [push]
33jobs :
44 copy-artifacts :
5- runs-on : ubuntu-latest
6- steps :
7- - uses : actions/checkout@v6
8- - uses : nixbuild/nix-quick-install-action@v30
9- with :
10- nix_conf : |
11- keep-env-derivations = true
12- keep-outputs = true
13- - name : Restore and save Nix store
14- uses : nix-community/cache-nix-action@v7
15- with :
16- primary-key : nix-${{ runner.os }}-${{ hashFiles('**/*.nix', '**/flake.lock') }}
17- restore-prefixes-first-match : nix-${{ runner.os }}-
18- gc-max-store-size-linux : 1G
19- - name : Install soldeer dependencies
20- if : hashFiles('soldeer.lock') != ''
21- run : nix develop github:rainlanguage/rainix#sol-shell -c forge soldeer install
22- - name : Regenerate meta files
23- run : nix run .#rainlang-prelude
24- - name : Regenerate pointer artifacts
25- run : nix develop github:rainlanguage/rainix#sol-shell -c forge script ./script/BuildPointers.sol
26- - name : Build Solidity
27- run : nix develop github:rainlanguage/rainix#sol-shell -c forge build
28- - name : Copy forge artifacts into committed location
29- run : nix develop github:rainlanguage/rainix#sol-shell -c forge script ./script/CopyArtifacts.sol --ffi
30- - name : Format (so generated artifacts match committed style)
31- run : nix develop github:rainlanguage/rainix#sol-shell -c forge fmt
32- - name : Assert committed artifacts match freshly built
33- run : |
34- if ! git diff --exit-code; then
35- echo "::error::Committed meta/pointer/abi artifacts are stale. Run rainlang-prelude, BuildPointers.sol, CopyArtifacts.sol, forge fmt, and commit."
36- exit 1
37- fi
5+ # Shared reusable (rainix#201): build from committed sources and assert the
6+ # committed meta/pointer/abi artifacts are still current. Includes the
7+ # Cachix substitution + 8G GC cap; no prelude (committing the artifacts is
8+ # what removes the need for one). secrets: inherit carries CACHIX_AUTH_TOKEN.
9+ uses : rainlanguage/rainix/.github/workflows/rainix-copy-artifacts.yaml@main
10+ secrets : inherit
0 commit comments