diff --git a/build/builtin-actors/fetch-bundles.sh b/build/builtin-actors/fetch-bundles.sh index 58fb5c39d..bf4d44a55 100755 --- a/build/builtin-actors/fetch-bundles.sh +++ b/build/builtin-actors/fetch-bundles.sh @@ -58,10 +58,26 @@ fetch_bundle() { popd } +touch_bundles() { + ver=$1 + + if [ ! -e $ver ]; then + mkdir $ver + fi + + for net in mainnet caterpillarnet butterflynet calibrationnet devnet testing; do + touch $ver/builtin-actors-$net.car + done +} + if [ -n "$actors7_release" ]; then fetch v7 "$actors7_release" +else + touch_bundles v7 fi if [ -n "$actors8_release" ]; then fetch v8 "$actors8_release" +else + touch_bundles v8 fi diff --git a/build/builtin_actors_2k.go b/build/builtin_actors_2k.go new file mode 100644 index 000000000..1dfee49dc --- /dev/null +++ b/build/builtin_actors_2k.go @@ -0,0 +1,22 @@ +//go:build debug || 2k || testground +// +build debug 2k testground + +package build + +import ( + _ "embed" +) + +//go:embed builtin-actors/v8/builtin-actors-devnet.car +var actorsv8 []byte + +func BuiltinActorsV8Bundle() []byte { + return actorsv8 +} + +//go:embed builtin-actors/v7/builtin-actors-devnet.car +var actorsv7 []byte + +func BuiltinActorsV7Bundle() []byte { + return actorsv7 +} diff --git a/build/builtin_actors_butterfly.go b/build/builtin_actors_butterfly.go new file mode 100644 index 000000000..d3d76e8f9 --- /dev/null +++ b/build/builtin_actors_butterfly.go @@ -0,0 +1,22 @@ +//go:build butterflynet +// +build butterflynet + +package build + +import ( + _ "embed" +) + +//go:embed builtin-actors/v8/builtin-actors-butterflynet.car +var actorsv8 []byte + +func BuiltinActorsV8Bundle() []byte { + return actorsv8 +} + +//go:embed builtin-actors/v7/builtin-actors-butterflynet.car +var actorsv7 []byte + +func BuiltinActorsV7Bundle() []byte { + return actorsv7 +} diff --git a/build/builtin_actors.go b/build/builtin_actors_calibnet.go similarity index 54% rename from build/builtin_actors.go rename to build/builtin_actors_calibnet.go index 56bc5169a..d73760a77 100644 --- a/build/builtin_actors.go +++ b/build/builtin_actors_calibnet.go @@ -1,17 +1,20 @@ +//go:build calibnet +// +build calibnet + package build import ( _ "embed" ) -//go:embed builtin-actors/builtin-actors-v8.car +//go:embed builtin-actors/v8/builtin-actors-calibrationnet.car var actorsv8 []byte func BuiltinActorsV8Bundle() []byte { return actorsv8 } -//go:embed builtin-actors/builtin-actors-v7.car +//go:embed builtin-actors/v7/builtin-actors-calibrationnet.car var actorsv7 []byte func BuiltinActorsV7Bundle() []byte { diff --git a/build/builtin_actors_interop.go b/build/builtin_actors_interop.go new file mode 100644 index 000000000..8203e4b3d --- /dev/null +++ b/build/builtin_actors_interop.go @@ -0,0 +1,22 @@ +//go:build interopnet +// +build interopnet + +package build + +import ( + _ "embed" +) + +//go:embed builtin-actors/v8/builtin-actors-caterpillarnet.car +var actorsv8 []byte + +func BuiltinActorsV8Bundle() []byte { + return actorsv8 +} + +//go:embed builtin-actors/v7/builtin-actors-caterpillarnet.car +var actorsv7 []byte + +func BuiltinActorsV7Bundle() []byte { + return actorsv7 +} diff --git a/build/builtin_actors_mainnet.go b/build/builtin_actors_mainnet.go new file mode 100644 index 000000000..400ac7827 --- /dev/null +++ b/build/builtin_actors_mainnet.go @@ -0,0 +1,22 @@ +//go:build !debug && !2k && !testground && !calibnet && !nerpanet && !butterflynet && !interopnet +// +build !debug,!2k,!testground,!calibnet,!nerpanet,!butterflynet,!interopnet + +package build + +import ( + _ "embed" +) + +//go:embed builtin-actors/v8/builtin-actors-mainnet.car +var actorsv8 []byte + +func BuiltinActorsV8Bundle() []byte { + return actorsv8 +} + +//go:embed builtin-actors/v7/builtin-actors-mainnet.car +var actorsv7 []byte + +func BuiltinActorsV7Bundle() []byte { + return actorsv7 +}