Skip to content

Commit

Permalink
Add Shank IDL to Program ELF (#81)
Browse files Browse the repository at this point in the history
* add small lib to include compressed idls in ELF

* use include-idl to write idl to asset program

* add CLI

* undo previous idl changes

* fix build process for cargo build vs cargo build-sbf

* clippy

* add node to workflow file

* update rust client tests to support custom build script

* Unused

* Add node action

* use features to gate deps properly

* fix target arch, force path spec

* solve clippy issues by specifying u8::from (issue introduced by adding dep on serde_json, couldn't solve by locking to prev serde_json :(

* fix compressed idl path
  • Loading branch information
ngundotra authored Jun 15, 2024
1 parent 4560c20 commit 97ff65a
Show file tree
Hide file tree
Showing 36 changed files with 3,058 additions and 3,261 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/build-programs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@ jobs:
version: ${{ inputs.solana || env.SOLANA_VERSION }}
cache: ${{ env.CACHE }}

- name: Install Node.js
uses: nifty-oss/actions/install-node-with-pnpm@v1
with:
version: ${{ env.NODE_VERSION }}
cache: ${{ env.CACHE }}
dependencies: true

- name: Cache program dependencies
if: env.CACHE == 'true'
uses: nifty-oss/actions/buildjet-cache-crate@v1
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,13 @@ jobs:
with:
toolchain: ${{ env.RUST_VERSION }}

- name: Install Node.js
uses: nifty-oss/actions/install-node-with-pnpm@v1
with:
version: ${{ env.NODE_VERSION }}
cache: ${{ env.CACHE }}
dependencies: true

- name: Cache program dependencies
if: env.CACHE == 'true'
uses: nifty-oss/actions/buildjet-cache-crate@v1
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/test-programs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ jobs:
version: ${{ env.SOLANA_VERSION }}
cache: ${{ env.CACHE }}

- name: Install Node.js
uses: nifty-oss/actions/install-node-with-pnpm@v1
with:
version: ${{ env.NODE_VERSION }}
cache: ${{ env.CACHE }}
dependencies: true

- name: Cache program dependencies
if: env.CACHE == 'true'
uses: nifty-oss/actions/buildjet-cache-crate@v1
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/test-rust-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,17 @@ jobs:
version: ${{ env.SOLANA_VERSION }}
cache: ${{ env.CACHE }}

- name: Install Node.js
uses: nifty-oss/actions/install-node-with-pnpm@v1
with:
version: ${{ env.NODE_VERSION }}
cache: ${{ env.CACHE }}
dependencies: true

- name: Cache Rust client test dependencies
uses: nifty-oss/actions/buildjet-cache-crate@v1
with:
folder: '.'
folder: "."
key: ${{ matrix.client }}-rust-client-test

- name: Download program builds
Expand Down
181 changes: 175 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ resolver = "2"
members = [
"clients/rust/asset",
"clients/rust/bridge",
"include-idl",
"include-idl-cli",
"programs/asset/interface",
"programs/asset/program",
"programs/asset/types",
Expand Down
Loading

0 comments on commit 97ff65a

Please sign in to comment.