Skip to content

Commit

Permalink
Merge branch 'main' into add-install-instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
MegaRedHand authored Jan 22, 2025
2 parents 48bfe65 + aaf434d commit 1691c70
Show file tree
Hide file tree
Showing 12 changed files with 612 additions and 69 deletions.
29 changes: 27 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ jobs:
with:
version: ${{ env.KURTOSIS_VERSION }}

- name: Cache Docker images
uses: ScribeMD/[email protected]
with:
key: docker-${{ runner.os }}-${{ hashFiles('Makefile', 'examples', 'src/config/default_config.yaml') }}

- name: Run Package with default args
run: |
kurtosis run ./kurtosis_package
Expand All @@ -50,6 +55,11 @@ jobs:
with:
version: ${{ env.KURTOSIS_VERSION }}

- name: Cache Docker images
uses: ScribeMD/[email protected]
with:
key: docker-${{ runner.os }}-${{ hashFiles('Makefile', 'examples', 'src/config/default_config.yaml') }}

- name: Run example '${{ matrix.example }}'
run: make ${{ matrix.example }}

Expand All @@ -66,6 +76,11 @@ jobs:
with:
version: ${{ env.KURTOSIS_VERSION }}

- name: Cache Docker images
uses: ScribeMD/[email protected]
with:
key: docker-${{ runner.os }}-${{ env.KURTOSIS_VERSION }}

- name: Kurtosis Lint
run: make kurtosis_lint

Expand Down Expand Up @@ -120,6 +135,11 @@ jobs:
with:
go-version: ${{ env.GO_VERSION }}

- name: Cache Docker images
uses: ScribeMD/[email protected]
with:
key: docker-${{ runner.os }}-${{ hashFiles('Makefile', 'examples', 'src/config/default_config.yaml') }}

- name: Run go test
run: make test

Expand All @@ -144,14 +164,19 @@ jobs:

- name: Install devnet
run: make install


- name: Cache Docker images
uses: ScribeMD/[email protected]
with:
key: docker-${{ runner.os }}-a294978-${{ hashFiles('examples/eigenda.yaml') }}

- name: Checkout EigenDA repo
uses: actions/checkout@v4
with:
repository: Layr-Labs/eigenda
path: eigenda/
ref: a294978e346fe9d7ede0f1a57012c36f64f1212a

- name: Download SRS points
run: |
cd eigenda/
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ HELLO_WORLD_REF:=4626e206fd119b26ebe98935b256daa7256e863b

examples/hello-world-avs:
@echo "Cloning hello-world-avs repo..."
@mkdir -p examples/hello-world-avs
@cd examples/hello-world-avs && \
@mkdir -p $@
@cd $@ && \
git init . && \
git remote add origin https://github.com/Layr-Labs/hello-world-avs.git && \
git fetch --depth 1 origin $(HELLO_WORLD_REF) && \
Expand Down
35 changes: 16 additions & 19 deletions cmd/avs-devnet/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,51 +16,48 @@ func main() {
app.Name = "avs-devnet"
app.Usage = "start an AVS devnet"
app.Version = version
app.Flags = append(app.Flags, &flags.KurtosisPackageFlag)

app.Commands = append(app.Commands, &cli.Command{
Name: "init",
Usage: "Initialize a devnet configuration file",
Args: true,
ArgsUsage: "[<config-file>]",
Flags: []cli.Flag{},
ArgsUsage: "[<file-name>]",
Action: cmds.InitCmd,
})

app.Commands = append(app.Commands, &cli.Command{
Name: "start",
Usage: "Start devnet from configuration file",
Args: true,
ArgsUsage: "[<config-file>]",
Flags: []cli.Flag{},
Action: cmds.StartCmd,
ArgsUsage: "[<file-name>]",
Flags: []cli.Flag{
&flags.DevnetNameFlag,
&flags.KurtosisPackageFlag,
},
Action: cmds.StartCmd,
})

app.Commands = append(app.Commands, &cli.Command{
Name: "stop",
Usage: "Stop devnet from configuration file",
Args: true,
ArgsUsage: "[<config-file>]",
Flags: []cli.Flag{},
Action: cmds.StopCmd,
Name: "stop",
Usage: "Stop devnet from configuration file",
Flags: []cli.Flag{&flags.DevnetNameFlag},
Action: cmds.StopCmd,
})

app.Commands = append(app.Commands, &cli.Command{
Name: "get-address",
Usage: "Get a devnet contract or EOA address",
Args: true,
ArgsUsage: "<contract-name>...",
Flags: []cli.Flag{&flags.ConfigFilePathFlag},
Flags: []cli.Flag{&flags.DevnetNameFlag},
Action: cmds.GetAddress,
})

app.Commands = append(app.Commands, &cli.Command{
Name: "get-ports",
Usage: "Get the published ports on the devnet",
Args: true,
ArgsUsage: "[<config-file>]",
Flags: []cli.Flag{},
Action: cmds.GetPorts,
Name: "get-ports",
Usage: "Get the published ports on the devnet",
Flags: []cli.Flag{&flags.DevnetNameFlag},
Action: cmds.GetPorts,
})

if err := app.Run(os.Args); err != nil {
Expand Down
Loading

0 comments on commit 1691c70

Please sign in to comment.