Skip to content

Commit

Permalink
Base 1 commit
Browse files Browse the repository at this point in the history
  • Loading branch information
raghu0891 committed Dec 9, 2024
1 parent 16f98ff commit 38bb860
Show file tree
Hide file tree
Showing 101 changed files with 11,220 additions and 7,285 deletions.
2 changes: 1 addition & 1 deletion .github/actions/build-gauntlet/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ runs:
uses: actions/[email protected]

- name: Get Tool Versions
uses: goplugin/[email protected]
uses: smartcontractkit/[email protected]
id: tool-versions

- name: Setup Node ${{ steps.tool-versions.outputs.nodejs_version }}
Expand Down
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@
Example:
- https://github.com/goplugin/ccip/pull/7777777
- https://github.com/smartcontractkit/ccip/pull/7777777
-->
4 changes: 2 additions & 2 deletions .github/workflows/dependency-updates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ jobs:
reviewers: aalu1418
run: |
make upgrade-solana-image
image=$(curl https://api.github.com/repos/solana-labs/solana/releases/latest | jq -r '.tag_name')
image=$(curl https://api.github.com/repos/anza-xyz/agave/releases/latest | jq -r '.tag_name')
# outputs
echo "name=bump/solana-$image" >> "$GITHUB_OUTPUT"
echo "prTitle=[automated] bump solana image to $image" >> "$GITHUB_OUTPUT"
echo "prBody=Latest Solana mainnet release is [$image](https://github.com/solana-labs/solana/releases/latest)" >> "$GITHUB_OUTPUT"
echo "prBody=Latest Solana mainnet release is [$image](https://github.com/anza-xyz/agave/releases/latest)" >> "$GITHUB_OUTPUT"
echo "commitString=[automated] bump solana dependencies" >> "$GITHUB_OUTPUT"
secrets: inherit
E2E-Testing-Dependencies:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/e2e_custom_cl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ jobs:
steps:
- name: Collect Metrics
id: collect-gha-metrics
uses: goplugin/push-gha-metrics-action@v1
uses: smartcontractkit/push-gha-metrics-action@v1
with:
basic-auth: ${{ secrets.GRAFANA_CLOUD_BASIC_AUTH }}
hostname: ${{ secrets.GRAFANA_CLOUD_HOST }}
Expand Down Expand Up @@ -273,7 +273,7 @@ jobs:
steps:
- name: Collect Metrics
id: collect-gha-metrics
uses: goplugin/push-gha-metrics-action@dea9b546553cb4ca936607c2267a09c004e4ab3f # v3.0.0
uses: smartcontractkit/push-gha-metrics-action@dea9b546553cb4ca936607c2267a09c004e4ab3f # v3.0.0
with:
id: solana-e2e-smoke
org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }}
Expand Down Expand Up @@ -355,7 +355,7 @@ jobs:
steps:
- name: Collect Metrics
id: collect-gha-metrics
uses: goplugin/push-gha-metrics-action@dea9b546553cb4ca936607c2267a09c004e4ab3f # v3.0.0
uses: smartcontractkit/push-gha-metrics-action@dea9b546553cb4ca936607c2267a09c004e4ab3f # v3.0.0
with:
id: solana-e2e-program-upgrade
org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e_testnet_daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ jobs:
steps:
- name: Collect Metrics
id: collect-gha-metrics
uses: goplugin/push-gha-metrics-action@dea9b546553cb4ca936607c2267a09c004e4ab3f # v3.0.0
uses: smartcontractkit/push-gha-metrics-action@dea9b546553cb4ca936607c2267a09c004e4ab3f # v3.0.0
with:
id: solana-e2e-daily
org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/gauntlet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
nodejs_version: ${{ steps.tool-versions.outputs.nodejs_version }}
steps:
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- uses: goplugin/[email protected]
- uses: smartcontractkit/[email protected]
id: tool-versions

gauntlet_build:
Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:
steps:
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- name: Install Nix
uses: cachix/install-nix-action@8887e596b4ee1134dae06b98d573bd674693f47c # v26
uses: cachix/install-nix-action@3715ab1a11cac9e991980d7b4a28d80c7ebdd8f9 # nix:v2.24.6
with:
nix_path: nixpkgs=channel:nixos-unstable
extra_nix_config: "sandbox = false"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- name: Checkout sources
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- name: Install Nix
uses: cachix/install-nix-action@8887e596b4ee1134dae06b98d573bd674693f47c # v26
uses: cachix/install-nix-action@3715ab1a11cac9e991980d7b4a28d80c7ebdd8f9 # nix:v2.24.6
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: golangci-lint
Expand All @@ -34,7 +34,7 @@ jobs:
- name: Checkout sources
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- name: Install Nix
uses: cachix/install-nix-action@8887e596b4ee1134dae06b98d573bd674693f47c # v26
uses: cachix/install-nix-action@3715ab1a11cac9e991980d7b4a28d80c7ebdd8f9 # nix:v2.24.6
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: golangci-lint
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/integration-tests-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
steps:
- name: Collect Metrics
id: collect-gha-metrics
uses: goplugin/push-gha-metrics-action@dea9b546553cb4ca936607c2267a09c004e4ab3f # v3.0.0
uses: smartcontractkit/push-gha-metrics-action@dea9b546553cb4ca936607c2267a09c004e4ab3f # v3.0.0
with:
id: solana-e2e-publish
org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nix-packages-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5

- name: Install Nix
uses: cachix/install-nix-action@8887e596b4ee1134dae06b98d573bd674693f47c # v26
uses: cachix/install-nix-action@3715ab1a11cac9e991980d7b4a28d80c7ebdd8f9 # nix:v2.24.6
with:
nix_path: nixpkgs=channel:nixos-unstable
extra_nix_config: "sandbox = false"
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/open-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ jobs:
go-version-file: "go.mod"
check-latest: true
cache: true
- uses: cachix/install-nix-action@3715ab1a11cac9e991980d7b4a28d80c7ebdd8f9 # nix:v2.24.6
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Run changes
id: run
run: ${{ inputs.run }}
Expand Down Expand Up @@ -69,7 +72,7 @@ jobs:
- name: Setup GitHub Token
if: '!steps.check.outputs.skip'
id: token
uses: goplugin/.github/actions/setup-github-token@ef78fa97bf3c77de6563db1175422703e9e6674f # [email protected]
uses: smartcontractkit/.github/actions/setup-github-token@ef78fa97bf3c77de6563db1175422703e9e6674f # [email protected]
with:
aws-role-arn: ${{ secrets.AWS_OIDC_PLUGIN_SOLANA_CICD_TOKEN_ISSUER_ROLE_ARN }}
aws-lambda-url: ${{ secrets.AWS_RELENG_TEAM_GATI_LAMBDA_URL }}
Expand All @@ -83,4 +86,5 @@ jobs:
branch: ${{ steps.run.outputs.name }}
reviewers: ${{ inputs.reviewers }}
body: ${{ steps.run.outputs.prBody }}
labels: "AUTO: Upstream Updates"
token: ${{ steps.token.outputs.access-token }}
4 changes: 2 additions & 2 deletions .github/workflows/relay.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ on:
jobs:
relay_run_unit_tests:
name: Relay Run Unit Tests
runs-on: ubuntu-latest
runs-on: ubuntu-latest-8cores-32GB
steps:
- name: Collect Metrics
id: collect-gha-metrics
uses: goplugin/push-gha-metrics-action@dea9b546553cb4ca936607c2267a09c004e4ab3f # v3.0.0
uses: smartcontractkit/push-gha-metrics-action@dea9b546553cb4ca936607c2267a09c004e4ab3f # v3.0.0
with:
id: solana-relay-unit
org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }}
Expand Down
106 changes: 52 additions & 54 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,103 +22,101 @@ jobs:
id: psversion
uses: ./.github/actions/projectserum_version

rust_run_anchor_tests:
name: Rust Run Anchor Tests
build_wrapped_anchor_image:
name: build contract test image
runs-on: ubuntu-latest
needs: [get_projectserum_version]
steps:
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- name: Cache cargo registry
- name: cache docker build image
id: cache-image
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-v2-cargo-registry-${{ hashFiles('**/Cargo.lock') }}

- name: Cache cargo index
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: ~/.cargo/git
key: ${{ runner.os }}-v2-cargo-index-${{ hashFiles('**/Cargo.lock') }}
path: contracts/docker-build.tar
key: ${{ runner.os }}-docker-pnpm-build-${{ needs.get_projectserum_version.outputs.projectserum_version }}-${{ hashFiles('**/Cargo.lock') }}
- name: build & save image
if: steps.cache-image.outputs.cache-hit != 'true'
run: |
docker buildx build . -t plugin-solana:build --build-arg ANCHOR_CLI=${{ needs.get_projectserum_version.outputs.projectserum_version }}
docker save plugin-solana > docker-build.tar
rust_run_anchor_tests:
name: Rust Run Anchor Tests
runs-on: ubuntu-latest-8cores-32GB
needs: [get_projectserum_version, build_wrapped_anchor_image]
steps:
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- name: Cache cargo target dir
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: contracts/target
key: ${{ runner.os }}-v2-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}

- name: Cache hello-world target dir
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: contracts/examples/hello-world/target
key: ${{ runner.os }}-v2-cargo-build-target-hello-world-${{ hashFiles('**/Cargo.lock') }}
- name: cache docker build image
id: cache-image
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: contracts/docker-build.tar
key: ${{ runner.os }}-docker-pnpm-build-${{ needs.get_projectserum_version.outputs.projectserum_version }}-${{ hashFiles('**/Cargo.lock') }}
- name: load cached image
run: |
docker load --input docker-build.tar
- name: run tests
env:
psversion: ${{ needs.get_projectserum_version.outputs.projectserum_version }}
run: |
docker run -v "$(pwd)/../":/repo backpackapp/build:"${psversion}" bash -c "\
docker run -v "$(pwd)/../":/repo plugin-solana:build bash -c "\
set -eoux pipefail &&\
RUSTUP_HOME=\"/root/.rustup\" &&\
FORCE_COLOR=1 &&\
cd /repo/contracts &&\
solana-keygen new -o id.json --no-bip39-passphrase &&\
cd /repo/ts &&\
yarn install --frozen-lockfile &&\
yarn build &&\
pnpm install --frozen-lockfile &&\
pnpm build &&\
cd /repo/contracts &&\
yarn install --frozen-lockfile &&\
pnpm install --frozen-lockfile &&\
anchor test &&\
chmod -R 755 ./target &&\
cd /repo/contracts/examples/hello-world &&\
yarn install --frozen-lockfile &&\
anchor test"
# - run: solana-keygen new -o id.json --no-bip39-passphrase
# - name: Compile typescript client
# run: |
# cd ../ts
# yarn install --frozen-lockfile
# yarn build
# - name: anchor test contracts
# run: |
# yarn install --frozen-lockfile
# anchor test
# - name: anchor test hello-world
# run: |
# cd examples/hello-world
# yarn install --frozen-lockfile
# anchor test
pnpm install --frozen-lockfile &&\
anchor test &&\
chmod -R 755 ./target"
rust_lint:
name: Rust Lint
runs-on: ubuntu-latest
needs: [get_projectserum_version]
needs: [get_projectserum_version, build_wrapped_anchor_image]
steps:
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- name: Cache cargo registry
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-v2-cargo-registry-${{ hashFiles('**/Cargo.lock') }}

- name: Cache cargo index
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: ~/.cargo/git
key: ${{ runner.os }}-v2-cargo-index-${{ hashFiles('**/Cargo.lock') }}

- name: Cache cargo target dir
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: contracts/target
key: ${{ runner.os }}-v2-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}

- name: cache docker build image
id: cache-image
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: contracts/docker-build.tar
key: ${{ runner.os }}-docker-pnpm-build-${{ needs.get_projectserum_version.outputs.projectserum_version }}-${{ hashFiles('**/Cargo.lock') }}
- name: load cached image
run: |
docker load --input docker-build.tar
- name: format contracts + artifacts
run: |
yarn install --frozen-lockfile
npm install -g pnpm
pnpm install --frozen-lockfile
cd ../ # back to root
make format-contracts
echo "run 'make format-contracts' if this fails"
git diff --stat --exit-code
- name: cargo check
env:
psversion: ${{ needs.get_projectserum_version.outputs.projectserum_version }}
run: |
docker run -v "$(pwd)/../":/repo backpackapp/build:"${psversion}" bash -c "\
docker run -v "$(pwd)/../":/repo plugin-solana:build bash -c "\
set -eoux pipefail &&\
RUSTUP_HOME=\"/root/.rustup\" &&\
FORCE_COLOR=1 &&\
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/soak.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
steps:
- name: Collect Metrics
id: collect-gha-metrics
uses: goplugin/push-gha-metrics-action@dea9b546553cb4ca936607c2267a09c004e4ab3f # v3.0.0
uses: smartcontractkit/push-gha-metrics-action@dea9b546553cb4ca936607c2267a09c004e4ab3f # v3.0.0
with:
id: solana-e2e-soak
org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sonar-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Check out Code
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- name: Parse tool-versions file
uses: goplugin/[email protected]
uses: smartcontractkit/[email protected]
id: tool-versions
outputs:
go-version: ${{ steps.tool-versions.outputs.golang_version }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/upstream-tracker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@ jobs:
echo "\`\`\`";
} >> output.md
gh issue create -a aalu1418 -t "Upstream Updates - $(date)" -l "[auto] Upstream Updates" -F output.md
gh issue create -a aalu1418 -t "Upstream Updates - $(date)" -l "AUTO: Upstream Updates" -F output.md
6 changes: 5 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,4 +149,8 @@ issues:
- path: test
text: "^G404:"
linters:
- gosec
- gosec
- path: _test.go
text: "G115:" # ignore integer overflow in test conversions
linters:
- gosec
5 changes: 2 additions & 3 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
nodejs 18.20.2
yarn 1.22.19
rust 1.59.0
golang 1.21.7
golangci-lint 1.55.2
pulumi 3.40.1
golang 1.22.5
golangci-lint 1.60.1
actionlint 1.6.22
shellcheck 0.8.0
helm 3.9.4
Expand Down
12 changes: 6 additions & 6 deletions CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@
# Please define less specific codeowner paths before more specific codeowner paths in order for the more specific rule to have priority

# global ownership
* @goplugin/bix-build
* @smartcontractkit/bix-build

# e2e test ownership
/integration-tests @goplugin/qa @goplugin/bix-build
/integration-tests @smartcontractkit/qa @smartcontractkit/bix-build

# gauntlet ownership
/gauntlet @goplugin/devx @goplugin/bix-build
/gauntlet @smartcontractkit/devx @smartcontractkit/bix-build

# relayer ownership
/pkg @goplugin/bix-build
/pkg @smartcontractkit/bix-build

# monitoring ownership
/pkg/monitoring @goplugin/realtime
/pkg/monitoring @smartcontractkit/realtime

# CI/CD
/.github/** @goplugin/releng
/.github/** @smartcontractkit/releng
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -130,4 +130,4 @@ upgrade-e2e-core-deps:

.PHONY: format-contracts
format-contracts:
cd ./contracts && cargo fmt && go fmt ./... && yarn format
cd ./contracts && cargo fmt && go fmt ./... && pnpm format
1 change: 1 addition & 0 deletions contracts/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
1 change: 1 addition & 0 deletions contracts/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pnpm-lock.yaml
Loading

0 comments on commit 38bb860

Please sign in to comment.