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

🔖 Release 0.1.10 #83

Merged
merged 11 commits into from
Oct 4, 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
3 changes: 0 additions & 3 deletions .eslintignore

This file was deleted.

24 changes: 0 additions & 24 deletions .eslintrc.yml

This file was deleted.

6 changes: 3 additions & 3 deletions .github/workflows/publish-bolt-crates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:

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

- name: install essentials
run: |
Expand Down Expand Up @@ -82,7 +82,7 @@ jobs:
- name: Use Node ${{ matrix.node }}
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 21

- name: Cache node dependencies
uses: actions/cache@v4
Expand Down Expand Up @@ -115,7 +115,7 @@ jobs:
- name: Use Node ${{ matrix.node }}
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 21

- name: Cache node dependencies
uses: actions/cache@v3
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/publish-bolt-sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:

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

- name: install essentials
run: |
Expand Down Expand Up @@ -82,7 +82,7 @@ jobs:
- name: Use Node ${{ matrix.node }}
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 21

- name: Cache node dependencies
uses: actions/cache@v4
Expand Down Expand Up @@ -115,7 +115,7 @@ jobs:
- name: Use Node ${{ matrix.node }}
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 21

- name: Cache node dependencies
uses: actions/cache@v3
Expand Down Expand Up @@ -180,7 +180,6 @@ jobs:

- name: npm publish
run: |
npm install --global eslint@^8.33.0
npm install
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
npm set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/publish-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,43 +22,43 @@ jobs:
build:
- {
NAME: linux-x64-glibc,
OS: ubuntu-20.04,
OS: ubuntu-latest,
TOOLCHAIN: stable,
TARGET: x86_64-unknown-linux-gnu,
}
- {
NAME: linux-x86-glibc,
OS: ubuntu-22.04,
OS: ubuntu-latest,
TOOLCHAIN: stable,
TARGET: i686-unknown-linux-gnu,
}
- {
NAME: linux-arm64-glibc,
OS: ubuntu-20.04,
OS: ubuntu-latest,
TOOLCHAIN: stable,
TARGET: aarch64-unknown-linux-gnu,
}
- {
NAME: win32-x64-msvc,
OS: windows-2022,
OS: windows-latest,
TOOLCHAIN: stable,
TARGET: x86_64-pc-windows-msvc,
}
- {
NAME: win32-x86-msvc,
OS: windows-2022,
OS: windows-latest,
TOOLCHAIN: stable,
TARGET: i686-pc-windows-msvc,
}
- {
NAME: darwin-x64,
OS: macos-11,
OS: macos-latest,
TOOLCHAIN: stable,
TARGET: x86_64-apple-darwin,
}
- {
NAME: darwin-arm64,
OS: macos-11,
OS: macos-latest,
TOOLCHAIN: stable,
TARGET: aarch64-apple-darwin,
}
Expand Down
131 changes: 29 additions & 102 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@ env:
solana_version: v1.18.15

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

- uses: actions/cache@v4
name: cache solana cli
name: Cache Solana CLI
id: cache-solana
with:
path: |
Expand All @@ -28,120 +29,70 @@ jobs:
with:
node-version: 21

- name: install essentials
- name: Install Essentials
run: |
sudo apt-get update
sudo apt-get install -y pkg-config build-essential libudev-dev
npm install --global yarn

- name: Cache node dependencies
- name: Cache Node Dependencies
uses: actions/cache@v3
with:
path: "**/node_modules"
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}

- name: install node_modules
- name: Install Node Modules
run: |
export PATH="/home/runner/.local/share/solana/install/active_release/bin:$PATH"
yarn --frozen-lockfile --network-concurrency 2

- name: install rust
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: rustfmt

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

- name: install solana
- name: Install Solana
if: steps.cache-solana.outputs.cache-hit != 'true'
run: |
sh -c "$(curl -sSfL https://release.solana.com/${{ env.solana_version }}/install)"
export PATH="$HOME/.local/share/solana/install/active_release/bin:$PATH"
solana --version

clippy-lint:
needs: install
lint:
needs: setup
runs-on: ubuntu-latest

strategy:
matrix:
task: [clippy, yarn]
steps:
- uses: actions/checkout@v4
- name: Cache rust
- name: Cache Rust
uses: Swatinem/rust-cache@v2
- name: Check Rust version
run: rustc --version
- name: Run fmt
run: cargo fmt -- --check --verbose
- name: Run clippy
run: cargo clippy -- --deny=warnings

yarn-lint:
needs: install
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node ${{ matrix.node }}
uses: actions/setup-node@v4
with:
node-version: 20

- name: Cache node dependencies
uses: actions/cache@v4
with:
path: "**/node_modules"
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}

- name: Run lint
run: yarn lint
- name: Run Lint
run: |
if [ "${{ matrix.task }}" == "clippy" ]; then
cargo fmt -- --check --verbose
cargo clippy -- --deny=warnings
else
prettier -v
yarn lint
fi

test:
needs: [clippy-lint, yarn-lint]
needs: lint
runs-on: ubuntu-latest

steps:
- 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@v4
with:
node-version: 20

- name: Cache node dependencies
uses: actions/cache@v3
with:
path: "**/node_modules"
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}

- name: install node_modules
run: |
export PATH="/home/runner/.local/share/solana/install/active_release/bin:$PATH"
yarn --frozen-lockfile

- uses: actions/cache@v4
name: cache solana cli
id: cache-solana
with:
path: |
~/.cache/solana/
~/.local/share/solana/
key: solana-${{ runner.os }}-v0000-${{ env.solana_version }}

- name: setup solana
- name: Setup Environment
run: |
export PATH="/home/runner/.local/share/solana/install/active_release/bin:$PATH"
solana --version
solana-keygen new --silent --no-bip39-passphrase

- name: Set deployments keys
- name: Set Deployment Keys
run: |
mkdir -p target/deploy
echo ${{ secrets.WORLD }} > target/deploy/world-keypair.json
Expand All @@ -153,35 +104,11 @@ 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
- name: Run Build and Tests
run: |
export PATH="/home/runner/.local/share/solana/install/active_release/bin:$PATH"
cargo install --path cli --force --locked
bolt build

- name: Generate lib
run: |
cd clients/bolt-sdk
yarn install && yarn build
cd ../..

- name: run tests
run: |
export PATH="/home/runner/.local/share/solana/install/active_release/bin:$PATH"
cargo install --path cli --force --locked
bolt test

- name: Install the Bolt CLI and create & build a new project
shell: bash
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
cargo add --package test-project --path "../crates/bolt-lang" || true # Overrides the version with the local version
cargo add --package movement --path "../crates/bolt-lang" || true # -
cargo add --package position --path "../crates/bolt-lang" || true # -
cargo update
yarn add file:../clients/bolt-sdk/ -D # Overrides the bolt ts SDK with the local version
bolt build
bolt test
11 changes: 11 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.anchor
.bolt
.DS_Store
target
node_modules
dist
build
test-ledger
target
clients/bolt-sdk/lib
tests/bolt.ts
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@

## [0.1.10] - 2024-10-04

### 👷 CI/CD

### ♻️ Refactor

## [0.1.8] - 2024-06-27

### ✨️ Features
Expand Down
Loading
Loading