Skip to content

Commit

Permalink
Feature: Add configurable component authority & Simplify the Componen…
Browse files Browse the repository at this point in the history
…ts/System API (#14)

* ✨ Simplify API & Fix IDL generation

* ✨ Component Authority owned by the world program

* ✨ Simplify Components & Systems API

* ✨ Simplify API for v0.1

* ✨ Add component_id macro for external account

* ✨ Refactor & Component authority

* 💚 Add build programs step

* 👷 Directly install Bolt CLI from source

* ♻️ Code Refactor

* ♻️ Refactor & Fix CI

* 👷 Update CI/CD

* 👷 Update CI

* 💚 Fix CI

* ✨ Update client SDK

* 🐛 Fix macros

* 🐛 Fix CLI

* 👷 Update tests workflow

* ⚡ Improve example and tests

* 🐛 Fix tests
  • Loading branch information
GabrielePicco authored Feb 20, 2024
1 parent a9372a9 commit 4661d15
Show file tree
Hide file tree
Showing 84 changed files with 1,745 additions and 841 deletions.
23 changes: 20 additions & 3 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
pull_request:

env:
solana_version: v1.18.0
solana_version: v1.18.1
anchor_version: 0.29.0

jobs:
Expand All @@ -30,6 +30,7 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install -y pkg-config build-essential libudev-dev
npm install --global yarn
- name: Cache node dependencies
uses: actions/cache@v3
Expand Down Expand Up @@ -146,10 +147,21 @@ jobs:
echo ${{ secrets.SYSTEM_FLY }} > target/deploy/system_fly-keypair.json
echo ${{ secrets.SYSTEM_SIMPLE_MOVEMENT }} > target/deploy/system_simple_movement-keypair.json
- name: run build
run: |
export PATH="/home/runner/.local/share/solana/install/active_release/bin:$PATH"
npm i -g @coral-xyz/anchor-cli@${{ env.anchor_version }} ts-mocha typescript
solana-test-validator > /dev/null &
sleep 5
solana airdrop -u l 100 tEsT3eV6RFCWs1BZ7AXTzasHqTtMnMLCB2tjQ42TDXD
anchor build
anchor idl build
anchor deploy
pkill -9 -f solana-test-validator
- name: run tests
run: |
export PATH="/home/runner/.local/share/solana/install/active_release/bin:$PATH"
ls node_modules/.bin
npm i -g @coral-xyz/anchor-cli@${{ env.anchor_version }} ts-mocha typescript
anchor test
Expand All @@ -158,7 +170,12 @@ jobs:
export PATH="/home/runner/.local/share/solana/install/active_release/bin:$PATH"
cargo install --path cli --force --locked
bolt init test-project --force
cd test-project && bolt build
cd test-project
cargo add --package position --path "../crates/bolt-lang" # Overrides the version with the local version
cargo add --package movement --path "../crates/bolt-lang" # -
yarn add file:../clients/bolt-sdk/ -D # Overrides the bolt ts SDK with the local version
bolt build
bolt test
- uses: actions/upload-artifact@v3
if: always()
Expand Down
8 changes: 4 additions & 4 deletions Anchor.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
[toolchain]

[features]
seeds = false
seeds = true
skip-lint = false

[programs.localnet]
bolt-component = "CmP2djJgABZ4cRokm4ndxuq6LerqpNHLBsaUv2XKEJua"
bolt-system = "7X4EFsDJ5aYTcEjKzJ94rD8FRKgQeXC89fkpeTS4KaqP"
component-position = "Fn1JzzEdyb55fsyduWS94mYHizGhJZuhvjX6DVvrmGbQ"
component-velocity = "CbHEFbSQdRN4Wnoby9r16umnJ1zWbULBHg4yqzGQonU1"
position = "Fn1JzzEdyb55fsyduWS94mYHizGhJZuhvjX6DVvrmGbQ"
velocity = "CbHEFbSQdRN4Wnoby9r16umnJ1zWbULBHg4yqzGQonU1"
system-apply-velocity = "6LHhFVwif6N9Po3jHtSmMVtPjF6zRfL3xMosSzcrQAS8"
system-fly = "BAQXfRwpNE43pdkeajsffA4rEkFQxwmUEDZKJjQHuvAN"
system-fly = "HT2YawJjkNmqWcLNfPAMvNsLdWwPvvvbKA5bpMw4eUpq"
system-simple-movement = "FSa6qoJXFBR3a7ThQkTAMrC15p6NkchPEjBdd4n6dXxA"
world = "WorLD15A7CrDwLcLy4fRqtaTb9fbd8o8iqiEMUDse2n"

Expand Down
113 changes: 86 additions & 27 deletions Cargo.lock

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

Loading

0 comments on commit 4661d15

Please sign in to comment.