Skip to content

Commit

Permalink
Remove submodule programs and use workspace inheritance deps (#283)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChewingGlass authored Jun 19, 2023
1 parent 9a2ea32 commit afca645
Show file tree
Hide file tree
Showing 39 changed files with 310 additions and 303 deletions.
12 changes: 0 additions & 12 deletions .github/actions/build-anchor/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,6 @@ runs:
~/.cargo/registry/cache/
~/.cargo/git/db/
key: cargo-${{ runner.os }}-cargo-build-${{ hashFiles('**/Cargo.lock') }}-2
- name: Cache Deps Builds
uses: actions/cache@v2
id: cache-cargo-deps-builds
with:
path: |
./deps/metaplex-program-library
./deps/solana-program-library
./deps/clockwork
key: deps-${{ runner.os }}-build-${{ hashFiles('./deps/**/Cargo.lock') }}
- run: ~/.cargo/bin/anchor run build-deps
shell: bash
if: steps.cache-cargo-deps-builds.outputs.cache-hit != 'true'
- name: Cache Anchor Build
uses: actions/cache@v2
id: cache-anchor-build
Expand Down
3 changes: 0 additions & 3 deletions .github/actions/upload-bpf/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,6 @@ runs:
./deps/solana-program-library
./deps/clockwork
key: deps-${{ runner.os }}-build-${{ hashFiles('./deps/**/Cargo.lock') }}
- run: ~/.cargo/bin/anchor run build-deps
shell: bash
if: steps.cache-cargo-deps-builds.outputs.cache-hit != 'true'
- run: ${{ inputs.testing == 'true' && 'TESTING=true' || '' }} ~/.cargo/bin/anchor build -p $PROGRAM ${{ inputs.devnet == 'true' && '-- --features devnet' || '' }}
shell: bash
env:
Expand Down
9 changes: 0 additions & 9 deletions .gitmodules

This file was deleted.

39 changes: 10 additions & 29 deletions Anchor.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,46 +40,27 @@ wallet = "~/.config/solana/id.json"

[scripts]
test = "yarn run ts-mocha -p ./tsconfig.test.json -t 1000000 tests/**/*.ts"
build-deps = "anchor run build-metadata && anchor run build-bubblegum && anchor run build-noop && anchor run build-account-compression && anchor run build-clockwork"
build-metadata = "cd deps/metaplex-program-library/token-metadata/program && pwd && cargo build-bpf && cd ../../../../"
build-bubblegum = "pushd deps/metaplex-program-library && pwd && anchor build -p mpl_bubblegum && popd"
build-noop = "pushd deps/solana-program-library/account-compression/programs/noop && pwd && cargo build-bpf && popd"
build-account-compression = "pushd deps/solana-program-library/account-compression/programs/account-compression && pwd && cargo build-bpf && popd"
build-clockwork = "pushd deps/clockwork && ./scripts/build-all.sh . && popd"

[test]
startup_wait = 20000

[test.validator]
url = "https://api.mainnet-beta.solana.com"

[[test.genesis]]
address = "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"
program = "./deps/metaplex-program-library/token-metadata/target/deploy/mpl_token_metadata.so"

[[test.genesis]]
address = "BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY"
program = "deps/metaplex-program-library/bubblegum/program/target/deploy/mpl_bubblegum.so"

[[test.genesis]]
address = "noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV"
program = "./deps/solana-program-library/account-compression/target/deploy/spl_noop.so"
[[test.validator.clone]]
address = "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s" # token-metadata

[[test.genesis]]
address = "cmtDvXumGCrqC1Age74AVPhSRVXJMd8PJS91L8KbNCK"
program = "./deps/solana-program-library/account-compression/target/deploy/spl_account_compression.so"
[[test.validator.clone]]
address = "BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY" # bubblegum

[[test.genesis]]
address = "F8dKseqmBoAkHx3c58Lmb9TgJv5qeTf3BbtZZSEzYvUa"
program = "./deps/clockwork/lib/clockwork_network_program.so"
[[test.validator.clone]]
address = "noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV" # noop

[[test.genesis]]
address = "CLoCKyJ6DXBJqqu2VWx9RLbgnwwR6BMHHuyasVmfMzBh"
program = "./deps/clockwork/lib/clockwork_thread_program.so"
[[test.validator.clone]]
address = "cmtDvXumGCrqC1Age74AVPhSRVXJMd8PJS91L8KbNCK" # account compression

[[test.genesis]]
address = "E7p5KFo8kKCDm6BUnWtnVFkQSYh6ZA6xaGAuvpv8NXTa"
program = "./deps/clockwork/lib/clockwork_webhook_program.so"
[[test.validator.clone]]
address = "CLoCKyJ6DXBJqqu2VWx9RLbgnwwR6BMHHuyasVmfMzBh" # clockwork

[[test.validator.clone]]
address = "hgovkRU6Ghe1Qoyb54HdSLdqN7VtxaifBzRmh9jtd3S" # spl governance program
Expand Down
Loading

0 comments on commit afca645

Please sign in to comment.