Skip to content

Commit 8a39a53

Browse files
committed
✨ Release v0.0.1
1 parent 4ec7118 commit 8a39a53

File tree

60 files changed

+10293
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+10293
-0
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: "[Bug]"
5+
labels: bug
6+
assignees: tiago18c, murlokito
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
16+
17+
**Expected behavior**
18+
A clear and concise description of what you expected to happen.
19+
20+
**Screenshots**
21+
If applicable, add screenshots to help explain your problem.
22+
23+
**Desktop (please complete the following information):**
24+
- OS: [e.g. iOS]
25+
- Browser [e.g. chrome, safari]
26+
- Version [e.g. 22]
27+
28+
**Smartphone (please complete the following information):**
29+
- Device: [e.g. iPhone6]
30+
- OS: [e.g. iOS8.1]
31+
- Browser [e.g. stock browser, safari]
32+
- Version [e.g. 22]
33+
34+
**Additional context**
35+
Add any other context about the problem here.

.github/ISSUE_TEMPLATE/custom.md

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
name: Custom issue template
3+
about: Describe this issue template's purpose here.
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.github/pull_request_template.md

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
2+
> ⚠️ NOTE: Use notes like this to emphasize something important about the PR.
3+
>
4+
> This could include other PRs this PR is built on top of; API breaking changes; reasons for why the PR is on hold; or anything else you would like to draw attention to.
5+
6+
| Status | Type | ⚠️ Core Change | Issue |
7+
| :---: | :---: | :---: | :--: |
8+
| Ready/Hold | Feature/Bug/Tooling/Refactor/Hotfix | Yes/No | [Link](<Issue link here>) |
9+
10+
## Problem
11+
12+
_What problem are you trying to solve?_
13+
14+
15+
## Solution
16+
17+
_How did you solve the problem?_
18+
19+
20+
## Before & After Screenshots
21+
22+
_Insert screenshots of example code output_
23+
24+
**BEFORE**:
25+
[insert screenshot here]
26+
27+
**AFTER**:
28+
[insert screenshot here]
29+
30+
31+
## Other changes (e.g. bug fixes, small refactors)
32+
33+
34+
## Deploy Notes
35+
36+
_Notes regarding deployment of the contained body of work. These should note any
37+
new dependencies, new scripts, etc._
38+
39+
**New scripts**:
40+
41+
- `script` : script details
42+
43+
**New dependencies**:
44+
45+
- `dependency` : dependency details
+159
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
name: Publish Bolt Lang
2+
on:
3+
release:
4+
types: [published]
5+
workflow_dispatch:
6+
7+
env:
8+
solana_version: v1.17.0
9+
anchor_version: 0.29.0
10+
11+
jobs:
12+
install:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v3
16+
17+
- uses: actions/cache@v3
18+
name: cache solana cli
19+
id: cache-solana
20+
with:
21+
path: |
22+
~/.cache/solana/
23+
~/.local/share/solana/
24+
key: solana-${{ runner.os }}-v0000-${{ env.solana_version }}
25+
26+
- uses: actions/setup-node@v3
27+
with:
28+
node-version: 20
29+
30+
- name: install essentials
31+
run: |
32+
sudo apt-get update
33+
sudo apt-get install -y pkg-config build-essential libudev-dev
34+
35+
- name: Cache node dependencies
36+
uses: actions/cache@v3
37+
with:
38+
path: '**/node_modules'
39+
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
40+
41+
- name: install node_modules
42+
run: |
43+
export PATH="/home/runner/.local/share/solana/install/active_release/bin:$PATH"
44+
yarn --frozen-lockfile --network-concurrency 2
45+
46+
- uses: dtolnay/rust-toolchain@stable
47+
with:
48+
toolchain: stable
49+
50+
- name: Cache rust
51+
uses: Swatinem/rust-cache@v2
52+
53+
- name: install solana
54+
if: steps.cache-solana.outputs.cache-hit != 'true'
55+
run: |
56+
sh -c "$(curl -sSfL https://release.solana.com/${{ env.solana_version }}/install)"
57+
export PATH="$HOME/.local/share/solana/install/active_release/bin:$PATH"
58+
solana --version
59+
60+
clippy-lint:
61+
needs: install
62+
runs-on: ubuntu-latest
63+
64+
steps:
65+
- uses: actions/checkout@v3
66+
- name: Cache rust
67+
uses: Swatinem/rust-cache@v2
68+
- name: Run fmt
69+
run: cargo fmt -- --check
70+
- name: Run clippy
71+
run: cargo clippy -- --deny=warnings
72+
73+
yarn-lint:
74+
needs: install
75+
runs-on: ubuntu-latest
76+
steps:
77+
- uses: actions/checkout@v3
78+
- name: Use Node ${{ matrix.node }}
79+
uses: actions/setup-node@v3
80+
with:
81+
node-version: 20
82+
83+
- name: Cache node dependencies
84+
uses: actions/cache@v3
85+
with:
86+
path: '**/node_modules'
87+
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
88+
89+
- name: Run lint
90+
run: yarn lint
91+
92+
test-and-publish:
93+
needs: [clippy-lint, yarn-lint]
94+
runs-on: ubuntu-latest
95+
96+
steps:
97+
- uses: actions/checkout@v3
98+
99+
- name: Use Node ${{ matrix.node }}
100+
uses: actions/setup-node@v3
101+
with:
102+
node-version: 20
103+
104+
- name: Cache node dependencies
105+
uses: actions/cache@v3
106+
with:
107+
path: '**/node_modules'
108+
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
109+
- name: install node_modules
110+
run: |
111+
export PATH="/home/runner/.local/share/solana/install/active_release/bin:$PATH"
112+
yarn --frozen-lockfile
113+
114+
- uses: actions/cache@v3
115+
name: cache solana cli
116+
id: cache-solana
117+
with:
118+
path: |
119+
~/.cache/solana/
120+
~/.local/share/solana/
121+
key: solana-${{ runner.os }}-v0000-${{ env.solana_version }}
122+
123+
- name: setup solana
124+
run: |
125+
export PATH="/home/runner/.local/share/solana/install/active_release/bin:$PATH"
126+
solana --version
127+
solana-keygen new --silent --no-bip39-passphrase
128+
129+
- name: Set deployments keys
130+
run: |
131+
mkdir -p target/deploy
132+
echo ${{ secrets.WORLD }} > target/deploy/world-keypair.json
133+
echo ${{ secrets.BOLT_COMPONENT }} > target/deploy/bolt_component-keypair.json
134+
echo ${{ secrets.BOLT_SYSTEM }} > target/deploy/bolt_system-keypair.json
135+
echo ${{ secrets.COMPONENT_POSITION }} > target/deploy/component_position-keypair.json
136+
echo ${{ secrets.COMPONENT_VELOCITY }} > target/deploy/component_velocity-keypair.json
137+
echo ${{ secrets.SYSTEM_APPLY_VELOCITY }} > target/deploy/system_apply_velocity-keypair.json
138+
echo ${{ secrets.SYSTEM_FLY }} > target/deploy/system_fly-keypair.json
139+
echo ${{ secrets.SYSTEM_SIMPLE_MOVEMENT }} > target/deploy/system_simple_movement-keypair.json
140+
141+
- name: run tests
142+
run: |
143+
export PATH="/home/runner/.local/share/solana/install/active_release/bin:$PATH"
144+
ls node_modules/.bin
145+
npm i -g @coral-xyz/anchor-cli@${{ env.anchor_version }} ts-mocha typescript
146+
anchor test
147+
148+
- name: cargo publish
149+
run: |
150+
cargo publish --manifest-path=crates/bolt-lang/attribute/account/Cargo.toml --token ${CRATES_TOKEN}
151+
cargo publish --manifest-path=crates/bolt-lang/attribute/component/Cargo.toml --token ${CRATES_TOKEN}
152+
cargo publish --manifest-path=crates/bolt-lang/attribute/component-deserialize/Cargo.toml --token ${CRATES_TOKEN}
153+
cargo publish --manifest-path=crates/bolt-lang/attribute/system/Cargo.toml --token ${CRATES_TOKEN}
154+
cargo publish --manifest-path=programs/bolt-system/Cargo.toml --token ${CRATES_TOKEN}
155+
cargo publish --manifest-path=programs/bolt-component/Cargo.toml --token ${CRATES_TOKEN}
156+
cargo publish --manifest-path=programs/world/Cargo.toml --token ${CRATES_TOKEN}
157+
cargo publish --manifest-path=crates/bolt-lang/Cargo.toml --token ${CRATES_TOKEN}
158+
env:
159+
CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }}

0 commit comments

Comments
 (0)