Skip to content

Commit 7ef51d7

Browse files
nazreenshankars99
andauthored
chore(examples/solana): bump up anchor version (#1686)
Signed-off-by: shankar <shankar@layerzerolabs.org> Co-authored-by: Shankar Subramanian <shankar@layerzerolabs.org>
1 parent 057f68d commit 7ef51d7

53 files changed

Lines changed: 21209 additions & 16799 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.changeset/chilled-years-tan.md‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"@layerzerolabs/oapp-solana-example": patch
3+
"@layerzerolabs/oft-solana-example": patch
4+
"@layerzerolabs/lzapp-migration-example": patch
5+
---
6+
7+
bump up versions for anchor, solana, rust

‎.devcontainer/devcontainer.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "LayerZero Devtools",
3-
"image": "ghcr.io/layerzero-labs/devtools-dev-base:main",
3+
"image": "ghcr.io/layerzero-labs/devtools-dev-base:shankar-ci-upgrade",
44
"mounts": ["type=volume,target=${containerWorkspaceFolder}/node_modules"],
55
"runArgs": ["--env-file", ".env"],
66
"features": {

‎.dockerignore‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,21 @@ docker-*.yaml
2121
# Dependencies & deployments
2222
**/node_modules
2323

24-
# Build files & cache
24+
# Build files & cache
2525
**/deployments
2626
**/dist
2727
**/artifacts
2828
**/cache
2929
**/out
30+
**/.turbo
31+
**/coverage
32+
**/tmp
33+
**/temp
34+
35+
# Keep tests/ for specific builds but exclude heavy files
36+
tests/**/node_modules/
37+
tests/**/.turbo/
38+
tests/**/coverage/
3039

3140
# Metadata
3241
*.md

‎.github/USAGE.md‎

Lines changed: 64 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,67 @@ This also means we need to select the right image for the user's architecture.
2020

2121
We can do this by using the `matrix` keyword in the workflow.
2222

23-
Original image: <https://github.com/LayerZero-Labs/devtools/pkgs/container/devtools-dev-base/304693620>
23+
Original image: <https://github.com/LayerZero-Labs/devtools/pkgs/container/devtools-dev-base/304693620>
24+
25+
# Docker images guide (base and node images)
26+
27+
- **When to use**: Any time you modify a stage in `Dockerfile` that produces an image used in CI:
28+
- `base` → `ghcr.io/layerzero-labs/devtools-dev-base`
29+
- `node-evm-hardhat` → `ghcr.io/layerzero-labs/devtools-dev-node-evm-hardhat`
30+
- `node-ton-my-local-ton` → `ghcr.io/layerzero-labs/devtools-dev-node-ton-my-local-ton`
31+
- `node-aptos-local-testnet` → `ghcr.io/layerzero-labs/devtools-dev-node-aptos-local-testnet`
32+
- `node-initia-localnet` → `ghcr.io/layerzero-labs/devtools-dev-node-initia-localnet`
33+
- `node-solana-test-validator` → `ghcr.io/layerzero-labs/devtools-dev-node-solana-test-validator`
34+
35+
- **Overview**: Build and publish the changed image(s) from your branch, temporarily point CI to those branch tags, merge, then repoint CI back to `:main`.
36+
37+
## Step-by-step
38+
39+
1. **Edit the Dockerfile**
40+
- Update the relevant stage(s) inside `Dockerfile` for the image(s) you’re changing.
41+
42+
2. **Push changes to a feature branch**
43+
- Open a PR as usual.
44+
45+
3. **Build image(s) for your branch**
46+
- In GitHub Actions, run the workflow "Build base development images" against your branch (file: `.github/workflows/reusable-publish-docker.yaml`).
47+
- This builds all images (base and nodes) for both `linux/amd64` and `linux/arm64` and publishes a multi-arch manifest with tags:
48+
- **branch tag** (normalized from your branch name)
49+
- **commit SHA**
50+
- **latest** (only on default branch)
51+
52+
4. **Temporarily point CI to your branch image(s)**
53+
- Replace `:main` with your branch tag only for the image(s) you changed.
54+
- Files to update:
55+
- `.github/workflows/reusable-publish.yaml`
56+
- If you changed the `base` image: `jobs.publish.container.image`
57+
- `.github/workflows/reusable-test.yaml`
58+
- If you changed the `base` image:
59+
- `jobs.build.container.image`
60+
- `jobs.test.env.DEVTOOLS_BASE_IMAGE`
61+
- `jobs.test-user.env.DEVTOOLS_BASE_IMAGE`
62+
- If you changed node image(s), update the matching env var(s):
63+
- `DEVTOOLS_EVM_NODE_IMAGE`
64+
- `DEVTOOLS_TON_NODE_IMAGE`
65+
- `DEVTOOLS_APTOS_NODE_IMAGE`
66+
- `DEVTOOLS_INITIA_NODE_IMAGE`
67+
- `DEVTOOLS_SOLANA_NODE_IMAGE`
68+
- Example replacement:
69+
- From: `ghcr.io/layerzero-labs/devtools-dev-base:main`
70+
- To: `ghcr.io/layerzero-labs/devtools-dev-base:<your-branch-tag>`
71+
- Note: the branch tag is derived from your branch name (slashes and unsafe chars are normalized). If unsure, confirm the exact tag in the GHCR package page or in the "Inspect image" step of the publish workflow.
72+
73+
5. **Validate CI on the PR**
74+
- Ensure all checks pass while using the branch-tagged base image.
75+
76+
6. **Merge to `main`**
77+
- After merge, re-run "Build base development images" on `main` to publish updated `:main` (and `:latest`) multi-arch image(s) for all affected targets.
78+
79+
7. **Revert workflow image references to `:main`**
80+
- Open a small follow-up PR that restores all temporary replacements back to `:main` for every image you switched in Step 4.
81+
82+
## Tips
83+
84+
- You can quickly locate references with a search for `ghcr.io/layerzero-labs/devtools-dev-`.
85+
- Switch only the images you changed; leave the rest on `:main`.
86+

‎.github/workflows/actions/install-dependencies/action.yaml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ runs:
2828
# Install the dependencies and run the post-install scripts
2929
- name: Install Dependencies
3030
shell: bash
31-
run: pnpm install --frozen-lockfile --offline
31+
# --no-optional: Skip optional native deps (utf-8-validate, bufferutil) to avoid node-gyp build failures in CI
32+
run: pnpm install --frozen-lockfile --offline --no-optional
3233

3334
# Rebuild native bindings
3435
- name: Rebuild NPM packages

‎.github/workflows/reusable-publish.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131

3232
# We'll run the job on the prebuilt base image
3333
container:
34-
image: ghcr.io/layerzero-labs/devtools-dev-base:main
34+
image: ghcr.io/layerzero-labs/devtools-dev-base:shankar-ci-upgrade
3535

3636
steps:
3737
- name: Checkout repo

‎.github/workflows/reusable-test.yaml‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838

3939
# We'll run the job on the prebuilt base image
4040
container:
41-
image: ghcr.io/layerzero-labs/devtools-dev-base:main
41+
image: ghcr.io/layerzero-labs/devtools-dev-base:shankar-ci-upgrade
4242

4343
steps:
4444
- name: Checkout repo
@@ -107,11 +107,11 @@ jobs:
107107
JEST_TIMEOUT: 60_000 # Increase timeout for ARM builds
108108
TEST_TIMEOUT: 600_000 # 10 minutes timeout for long-running tests
109109
# We'll use the prebuilt base image
110-
DEVTOOLS_BASE_IMAGE: ghcr.io/layerzero-labs/devtools-dev-base:main
110+
DEVTOOLS_BASE_IMAGE: ghcr.io/layerzero-labs/devtools-dev-base:shankar-ci-upgrade
111111
# And the prebuilt hardhat EVM node image
112-
DEVTOOLS_EVM_NODE_IMAGE: ghcr.io/layerzero-labs/devtools-dev-node-evm-hardhat:main
112+
DEVTOOLS_EVM_NODE_IMAGE: ghcr.io/layerzero-labs/devtools-dev-node-evm-hardhat:shankar-ci-upgrade
113113
# And the prebuilt TON node image
114-
DEVTOOLS_TON_NODE_IMAGE: ghcr.io/layerzero-labs/devtools-dev-node-ton-my-local-ton:main
114+
DEVTOOLS_TON_NODE_IMAGE: ghcr.io/layerzero-labs/devtools-dev-node-ton-my-local-ton:shankar-ci-upgrade
115115
# Provided we have good quality Solana RPCs, we can enable Solana tests
116116
#
117117
# FIXME The Solana tests need to be ported to either use a stable deployment
@@ -176,17 +176,17 @@ jobs:
176176
LAYERZERO_EXAMPLES_REPOSITORY_URL: https://github.com/${{ github.repository }}.git
177177
LAYERZERO_EXAMPLES_REPOSITORY_REF: ${{ github.ref }}
178178
# We'll use the prebuilt base image
179-
DEVTOOLS_BASE_IMAGE: ghcr.io/layerzero-labs/devtools-dev-base:main
179+
DEVTOOLS_BASE_IMAGE: ghcr.io/layerzero-labs/devtools-dev-base:shankar-ci-upgrade
180180
# And the prebuilt hardhat EVM node image
181-
DEVTOOLS_EVM_NODE_IMAGE: ghcr.io/layerzero-labs/devtools-dev-node-evm-hardhat:main
181+
DEVTOOLS_EVM_NODE_IMAGE: ghcr.io/layerzero-labs/devtools-dev-node-evm-hardhat:shankar-ci-upgrade
182182
# Using the local Aptos testnet node
183-
DEVTOOLS_APTOS_NODE_IMAGE: ghcr.io/layerzero-labs/devtools-dev-node-aptos-local-testnet:main
183+
DEVTOOLS_APTOS_NODE_IMAGE: ghcr.io/layerzero-labs/devtools-dev-node-aptos-local-testnet:shankar-ci-upgrade
184184
# Using the local TON node - i do not know if this is working
185-
DEVTOOLS_TON_NODE_IMAGE: ghcr.io/layerzero-labs/devtools-dev-node-ton-my-local-ton:main
185+
DEVTOOLS_TON_NODE_IMAGE: ghcr.io/layerzero-labs/devtools-dev-node-ton-my-local-ton:shankar-ci-upgrade
186186
# Using the local Initia node
187-
DEVTOOLS_INITIA_NODE_IMAGE: ghcr.io/layerzero-labs/devtools-dev-node-initia-localnet:main
187+
DEVTOOLS_INITIA_NODE_IMAGE: ghcr.io/layerzero-labs/devtools-dev-node-initia-localnet:shankar-ci-upgrade
188188
# Using the local Solana test validator - may fail due to RPC issues
189-
DEVTOOLS_SOLANA_NODE_IMAGE: ghcr.io/layerzero-labs/devtools-dev-node-solana-test-validator:main
189+
DEVTOOLS_SOLANA_NODE_IMAGE: ghcr.io/layerzero-labs/devtools-dev-node-solana-test-validator:shankar-ci-upgrade
190190

191191

192192
# We'll collect the docker compose logs from all containers on failure

0 commit comments

Comments
 (0)