Skip to content

Commit

Permalink
Merge branch 'main' into add-install-script
Browse files Browse the repository at this point in the history
  • Loading branch information
MegaRedHand committed Jan 22, 2025
2 parents 915c8e1 + 9f28b30 commit 5eb52fc
Show file tree
Hide file tree
Showing 15 changed files with 621 additions and 120 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
25 changes: 0 additions & 25 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,32 +10,7 @@ env:
GO_VERSION: '1.22.4'

jobs:
lint:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v6
with:
working-directory: ./cli
version: latest

test:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Run go test
working-directory: ./cli
run: go test -v ./...

release:
needs: [lint, test]
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
Expand Down
9 changes: 6 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ fmt: kurtosis_fmt cli_fmt ## 🧹 Format all code

lint: kurtosis_lint cli_lint ## 🧹 Lint all code

test: ## 🧪 Run tests
test: examples/hello-world-avs ## 🧪 Run tests
# NOTE: we do this to avoid race conditions in the engine initialization
kurtosis engine start

go test -v -timeout 30m ./...


Expand Down Expand Up @@ -103,8 +106,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
2 changes: 2 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ To release a new version of the CLI, follow the steps below:
> [!WARNING]
> You need to have write permission to this repo to release a new version
- [ ] Check the last CI run on `main` succeeded.

- [ ] Checkout `main` and pull the latest changes:

```sh
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 5eb52fc

Please sign in to comment.