Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Add a working ecs example on project init #12

Merged
merged 17 commits into from
Jan 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 28 additions & 12 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ on:
pull_request:

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

jobs:
install:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/cache@v3
- uses: actions/cache@v4
name: cache solana cli
id: cache-solana
with:
Expand All @@ -22,7 +22,7 @@ jobs:
~/.local/share/solana/
key: solana-${{ runner.os }}-v0000-${{ env.solana_version }}

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 20

Expand All @@ -42,7 +42,8 @@ jobs:
export PATH="/home/runner/.local/share/solana/install/active_release/bin:$PATH"
yarn --frozen-lockfile --network-concurrency 2

- uses: dtolnay/rust-toolchain@stable
- name: install rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable

Expand All @@ -61,7 +62,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Cache rust
uses: Swatinem/rust-cache@v2
- name: Run fmt
Expand All @@ -73,14 +74,14 @@ jobs:
needs: install
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use Node ${{ matrix.node }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 20

- name: Cache node dependencies
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
Expand All @@ -93,10 +94,18 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: install rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable

- name: Cache rust
uses: Swatinem/rust-cache@v2

- uses: actions/checkout@v4

- name: Use Node ${{ matrix.node }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 20

Expand All @@ -110,7 +119,7 @@ jobs:
export PATH="/home/runner/.local/share/solana/install/active_release/bin:$PATH"
yarn --frozen-lockfile

- uses: actions/cache@v3
- uses: actions/cache@v4
name: cache solana cli
id: cache-solana
with:
Expand Down Expand Up @@ -144,6 +153,13 @@ jobs:
npm i -g @coral-xyz/anchor-cli@${{ env.anchor_version }} ts-mocha typescript
anchor test

- name: Install the Bolt CLI and create & build a new project
run: |
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

- uses: actions/upload-artifact@v3
if: always()
with:
Expand Down
80 changes: 42 additions & 38 deletions Cargo.lock

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

4 changes: 3 additions & 1 deletion cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ path = "src/bin/main.rs"
dev = []

[dependencies]
anchor-cli = { git = "https://github.com/coral-xyz/anchor.git", rev = "v0.29.0" }
anchor-cli = { git = "https://github.com/coral-xyz/anchor.git" }
anchor-client = { git = "https://github.com/coral-xyz/anchor.git" }
anyhow = "1.0.32"
heck = "0.4.0"
clap = { version = "4.2.4", features = ["derive"] }
syn = { version = "1.0.60", features = ["full", "extra-traits"] }
Loading
Loading