-
Notifications
You must be signed in to change notification settings - Fork 28
ccip repo layout #1170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
ccip repo layout #1170
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| name: Aggregator CI | ||
|
|
||
| on: | ||
| push: | ||
| paths: | ||
| - 'v2/aggregator/**' | ||
| pull_request: | ||
| paths: | ||
| - 'v2/aggregator/**' | ||
|
|
||
| defaults: | ||
| run: | ||
| working-directory: v2/aggregator | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| lint-and-test: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Set up Go | ||
| uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5 | ||
| with: | ||
| go-version-file: v2/aggregator/go.mod | ||
|
|
||
| - name: Install just | ||
| uses: extractions/setup-just@69d82fb0233557aec017ef13706851d0694e0f1d # v2.0.0 | ||
|
|
||
| - name: Install protoc | ||
| run: | | ||
| PROTOC_VERSION="32.0" | ||
| curl -LO "https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip" | ||
| sudo unzip -o protoc-${PROTOC_VERSION}-linux-x86_64.zip -d /usr/local bin/protoc | ||
| sudo unzip -o protoc-${PROTOC_VERSION}-linux-x86_64.zip -d /usr/local 'include/*' | ||
| rm protoc-${PROTOC_VERSION}-linux-x86_64.zip | ||
| protoc --version | ||
|
|
||
| - name: Install protoc-gen-go | ||
| run: go install google.golang.org/protobuf/cmd/protoc-gen-go@latest | ||
|
|
||
| - name: Install protoc-gen-go-grpc | ||
| run: go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest | ||
|
|
||
| - name: Install buf | ||
| uses: bufbuild/buf-setup-action@a47c93e0b1648d5651a065437926377d060baa99 | ||
| with: | ||
| github_token: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Install golangci-lint | ||
| uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 | ||
| with: | ||
| version: latest | ||
| working-directory: v2/aggregator | ||
| args: --help # Just install, don't run yet | ||
|
|
||
| - name: Run lint | ||
| run: just lint | ||
|
|
||
| - name: Run proto-check | ||
| run: just proto-check | ||
|
|
||
| - name: Run tests | ||
| run: just test | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| name: Devenv Tidy | ||
| on: | ||
| push: | ||
|
|
||
| defaults: | ||
| run: | ||
| working-directory: v2/build/devenv | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| devenv-tidy: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | ||
| with: | ||
| fetch-depth: 0 | ||
| - name: Set up Go with module caching | ||
| uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5 | ||
| with: | ||
| go-version-file: v2/build/devenv/go.mod | ||
| - name: Verify go.mod and go.sum | ||
| run: | | ||
| go mod tidy | ||
| if ! git diff --exit-code -- go.mod go.sum; then | ||
| echo "❌ go.mod or go.sum has uncommitted changes after go mod tidy" | ||
| echo "Please run: go mod tidy" | ||
| git diff -- go.mod go.sum | ||
| exit 1 | ||
| fi | ||
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| name: End-to-end CCV Test (EVM Testnets) | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
|
|
||
| defaults: | ||
| run: | ||
| working-directory: build/devenv | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }}-${{ github.sha }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| e2e: | ||
| permissions: | ||
| id-token: write | ||
| contents: read | ||
| runs-on: ubuntu24.04-16cores-64GB | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | ||
| with: | ||
| fetch-depth: 0 | ||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1 | ||
| - name: Install Just | ||
| uses: extractions/setup-just@e33e0265a09d6d736e2ee1e0eb685ef1de4669ff # v3 | ||
| with: | ||
| just-version: '1.40.0' | ||
| - name: Build Docker images with Just | ||
| run: just build-docker-dev-ci | ||
| env: | ||
| DOCKER_BUILDKIT: 1 | ||
| - name: List built images | ||
| run: docker images | ||
| - name: Set up Go with module caching | ||
| uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5 | ||
| with: | ||
| go-version-file: build/devenv/go.mod | ||
| cache: true | ||
| - name: Cache Go modules | ||
| uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4 | ||
| with: | ||
| path: | | ||
| ~/.cache/go-build | ||
| ~/go/pkg/mod | ||
| key: ${{ runner.os }}-go-${{ hashFiles('go.sum') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-go- | ||
| - name: Download Go dependencies | ||
| run: | | ||
| go mod download | ||
| - name: Run CCV environment | ||
| env: | ||
| ETH_FUJI_PRIVATE_KEY: ${{ secrets.ETH_FUJI_PRIVATE_KEY }} | ||
| run: | | ||
| case "${{ inputs.network }}" in | ||
| eth_fuji) | ||
| PRIVATE_KEY=$ETH_FUJI_PRIVATE_KEY | ||
| ;; | ||
| *) | ||
| echo "Unknown network: ${{ inputs.network }}" | ||
| exit 1 | ||
| ;; | ||
| esac | ||
| cd cmd/ccv && go install . && cd - | ||
| PRIVATE_KEY=${PRIVATE_KEY} ccv env.toml,env-fuji-fantom.toml | ||
| - name: Run Soak Test | ||
| working-directory: build/devenv/tests/e2e | ||
| run: go test -timeout 2h -v -run TestSoak | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| name: End-to-end CCV Test | ||
|
|
||
| on: | ||
| push: | ||
|
|
||
| defaults: | ||
| run: | ||
| working-directory: v2/build/devenv | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }}-${{ github.sha }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| e2e: | ||
| permissions: | ||
| id-token: write | ||
| contents: read | ||
| runs-on: ubuntu24.04-16cores-64GB | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | ||
| with: | ||
| fetch-depth: 0 | ||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1 | ||
| - name: Install Just | ||
| uses: extractions/setup-just@e33e0265a09d6d736e2ee1e0eb685ef1de4669ff # v3 | ||
| with: | ||
| just-version: '1.40.0' | ||
| - name: Configure AWS credentials using OIDC | ||
| uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2 | ||
| with: | ||
| role-to-assume: ${{ secrets.CCV_IAM_ROLE }} | ||
| aws-region: us-east-1 | ||
| - name: Authenticate to ECR Public | ||
| id: login-ecr-public | ||
| uses: aws-actions/amazon-ecr-login@062b18b96a7aff071d4dc91bc00c4c1a7945b076 # v2.0.1 | ||
| with: | ||
| registry-type: public | ||
| - name: Build Docker images with Just | ||
| run: just build-docker-dev-ci | ||
| env: | ||
| DOCKER_BUILDKIT: 1 | ||
| - name: List built images | ||
| run: docker images | ||
| - name: Set up Go with module caching | ||
| uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5 | ||
| with: | ||
| go-version-file: v2/build/devenv/go.mod | ||
| cache: true | ||
| - name: Cache Go modules | ||
| uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4 | ||
| with: | ||
| path: | | ||
| ~/.cache/go-build | ||
| ~/go/pkg/mod | ||
| key: ${{ runner.os }}-go-${{ hashFiles('go.sum') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-go- | ||
| - name: Download Go dependencies | ||
| run: | | ||
| go mod download | ||
| - name: Run CCV environment | ||
| run: | | ||
| cd cmd/ccv && go install . && cd - | ||
| ccv u env.toml | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| name: Services CCV Tests | ||
|
|
||
| on: | ||
| push: | ||
|
|
||
| defaults: | ||
| run: | ||
| working-directory: build/devenv | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }}-${{ github.sha }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| e2e: | ||
| permissions: | ||
| id-token: write | ||
| contents: read | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | ||
| with: | ||
| fetch-depth: 0 | ||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1 | ||
| - name: Install Just | ||
| uses: extractions/setup-just@e33e0265a09d6d736e2ee1e0eb685ef1de4669ff # v3 | ||
| with: | ||
| just-version: '1.40.0' | ||
| - name: Configure AWS credentials using OIDC | ||
| uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2 | ||
| with: | ||
| role-to-assume: ${{ secrets.CCV_IAM_ROLE }} | ||
| aws-region: us-east-1 | ||
| - name: Authenticate to ECR Public | ||
| id: login-ecr-public | ||
| uses: aws-actions/amazon-ecr-login@062b18b96a7aff071d4dc91bc00c4c1a7945b076 # v2.0.1 | ||
| with: | ||
| registry-type: public | ||
| - name: Build Docker images with Just | ||
| run: just build-docker-dev-ci | ||
| env: | ||
| DOCKER_BUILDKIT: 1 | ||
| - name: List built images | ||
| run: docker images | ||
| - name: Set up Go with module caching | ||
| uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5 | ||
| with: | ||
| go-version-file: build/devenv/go.mod | ||
| cache: true | ||
| - name: Cache Go modules | ||
| uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4 | ||
| with: | ||
| path: | | ||
| ~/.cache/go-build | ||
| ~/go/pkg/mod | ||
| key: ${{ runner.os }}-go-${{ hashFiles('go.sum') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-go- | ||
| - name: Download Go dependencies | ||
| run: | | ||
| go mod download | ||
| - name: Run CCV environment | ||
| run: | | ||
| go test -v -run TestService ./... | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| # Detect the system architecture | ||
| ARCH := `uname -m` | ||
|
|
||
| # Find 'protoc' download URL based on the architecture | ||
| PROTOC_ZIP := if ARCH == 'x86_64' { | ||
| "protoc-32.0-linux-x86_64.zip" | ||
| } else if ARCH == 'arm64' { | ||
| "protoc-32.0-osx-aarch_64.zip" | ||
| } else { | ||
| error("Unsupported architecture: " + ARCH) | ||
| } | ||
| PROTOC_URL := "https://github.com/protocolbuffers/protobuf/releases/download/v32.0/"+PROTOC_ZIP | ||
| PROTOC_BIN := env('PROTOC_BIN', '/usr/local/bin/protoc') | ||
|
|
||
| # Default: show available recipes | ||
| default: | ||
| just --list | ||
|
|
||
| # Run go mod tidy across all submodules | ||
| tidy: | ||
| gomods tidy | ||
|
|
||
| install-protoc: | ||
| @echo "Downloading and installing protoc for {{ARCH}}..." | ||
| curl -OL "{{PROTOC_URL}}" | ||
| sudo unzip -o "{{PROTOC_ZIP}}" -d /usr/local bin/protoc | ||
| sudo unzip -o "{{PROTOC_ZIP}}" -d /usr/local 'include/*' | ||
| rm -f "{{PROTOC_ZIP}}" | ||
| sudo chmod +x "{{PROTOC_BIN}}" | ||
| @echo "Installed protoc version:" | ||
| "{{PROTOC_BIN}}" --version | ||
| go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.36.8 | ||
| go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.5.1 | ||
|
|
||
| proto: | ||
| @just ./aggregator/proto |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| # Chainlink CCV | ||
|
|
||
| ## Getting started | ||
|
|
||
| Run all the services in local environment, install [Nix](https://github.com/DeterminateSystems/nix-installer) and run | ||
| ```bash | ||
| nix develop | ||
| just clean-docker-dev # needed in case you have old JD image | ||
| just build-docker-dev | ||
| ``` | ||
| Then enter the `ccv` shell and run `up` | ||
| ```bash | ||
| ccv sh | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| tmp/ |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.