Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
3918 commits
Select commit Hold shift + click to select a range
75505ee
add mintshell instruction
SeHor05 Jul 30, 2024
f1bda5f
update
SeHor05 Aug 4, 2024
1e52db0
update
SeHor05 Aug 5, 2024
ed0fea6
tvm-debugger tool
SilkovAlexander Aug 13, 2024
ade5c2a
Fixed self address + ecc
SilkovAlexander Aug 14, 2024
89fb21b
fix fmt
SilkovAlexander Aug 14, 2024
8563e1e
version up
elasticLove1 Aug 15, 2024
647daaa
Merge pull request #21 from tvmlabs/alexanders/node-225-move-vm-test-…
elasticLove1 Aug 15, 2024
91a64c8
Update CHANGELOG.md
elasticLove1 Aug 15, 2024
44e44e6
Merge tag 'main' into dapp-id
SeHor05 Aug 15, 2024
fa422de
Add instruction: mint ecc, convert ecc to shell and reward calculate
SeHor05 Aug 16, 2024
0ccf507
update formula in reward instruction
SeHor05 Aug 19, 2024
f0b7d6a
update formula
SeHor05 Aug 19, 2024
4d324bd
version up+changelog
elasticLove1 Aug 19, 2024
a45495d
Merge pull request #23 from tvmlabs/update/reward
elasticLove1 Aug 19, 2024
eed0c4c
Merge remote-tracking branch 'origin/main' into dapp-id
SeHor05 Aug 19, 2024
bac7254
update toml
SeHor05 Aug 19, 2024
d7bae32
add some logs
SeHor05 Aug 20, 2024
313bcc2
small fix
SeHor05 Aug 20, 2024
b04a217
fix with stateinit
SeHor05 Aug 20, 2024
9c42dae
burn credit
SeHor05 Aug 20, 2024
bdd3f7d
delete junk
SeHor05 Aug 20, 2024
7cb9e6d
fix with ext deploy
SeHor05 Aug 20, 2024
1971eed
update
SeHor05 Aug 20, 2024
b3e0341
fix
SeHor05 Aug 21, 2024
35f22aa
burn credit token
SeHor05 Aug 21, 2024
9bb9c2d
update burn
SeHor05 Aug 21, 2024
6609e9d
try
SeHor05 Aug 21, 2024
468f276
try
SeHor05 Aug 21, 2024
a80b94a
try
SeHor05 Aug 21, 2024
212100d
fix
SeHor05 Aug 21, 2024
81c0729
fmt
SeHor05 Aug 21, 2024
3c8f817
fix
SeHor05 Aug 21, 2024
af3cb4c
fix
SeHor05 Aug 21, 2024
32406a1
fix with bounce
SeHor05 Aug 21, 2024
af59c96
fix bounced
SeHor05 Aug 21, 2024
02518b4
Merge branch 'dapp-id' into serhii/mintshell
SeHor05 Aug 22, 2024
4fa03e8
update version
SeHor05 Aug 23, 2024
ecdc8d8
Update CHANGELOG.md
elasticLove1 Aug 23, 2024
19b1967
update max_value into MAX
SeHor05 Aug 23, 2024
314eed0
Merge branch 'dapp-id' of github.com:tvmlabs/tvm-sdk into dapp-id
SeHor05 Aug 23, 2024
462f4d4
fix clippy warnings
awnion Aug 23, 2024
8989c81
cargo clippy --fix
awnion Aug 23, 2024
826f990
cargo clippy manual fixes
awnion Aug 23, 2024
3182c0c
Merge pull request #22 from tvmlabs/dapp-id
elasticLove1 Aug 23, 2024
c6f8886
Merge branch 'dapp-id' into serhii/mintshell
SeHor05 Aug 26, 2024
e19297a
Merge tag 'main' into serhii/mintshell
SeHor05 Aug 26, 2024
e0f88e9
fix import
SeHor05 Aug 26, 2024
e2d3e6c
renaming
elasticLove1 Aug 26, 2024
d81b805
abi spec update
elasticLove1 Aug 26, 2024
54e119b
abi links update
elasticLove1 Aug 26, 2024
33c06d8
update message struct
SeHor05 Aug 26, 2024
bc9f560
update message
SeHor05 Aug 26, 2024
c2c6c3b
GITBOOK-1: No subject
elasticLove1 Aug 26, 2024
9f561d7
?
SeHor05 Aug 26, 2024
53c733b
update serialize
SeHor05 Aug 27, 2024
17ac651
update serialize
SeHor05 Aug 27, 2024
f50336a
update serialize
SeHor05 Aug 27, 2024
cec1982
fix return
SeHor05 Aug 27, 2024
9178d75
CLI reference
elasticLove1 Aug 27, 2024
cec8e30
Summary upd
elasticLove1 Aug 27, 2024
a779d93
GITBOOK-2: No subject
elasticLove1 Aug 27, 2024
d1c54d7
tools
SilkovAlexander Aug 27, 2024
a622c97
fmt
SilkovAlexander Aug 29, 2024
42be622
Merge pull request #24 from tvmlabs/dapp_id
elasticLove1 Aug 29, 2024
6b71950
GITBOOK-3: No subject
elasticLove1 Aug 29, 2024
d18fd78
GITBOOK-4: No subject
elasticLove1 Aug 30, 2024
5727d24
GITBOOK-5: No subject
elasticLove1 Aug 30, 2024
573a364
GITBOOK-6: No subject
elasticLove1 Aug 31, 2024
2052183
Merge tag 'main' into serhii/mintshell
SeHor05 Sep 4, 2024
85c8f2a
Set code salt cell
SilkovAlexander Sep 6, 2024
4bf926a
Merge branch 'feature/set_code_salt' into mintshell
SeHor05 Sep 6, 2024
f39fc1d
update exchange shell
SeHor05 Sep 6, 2024
1671c59
update
SeHor05 Sep 6, 2024
9845dd9
update message struct
SeHor05 Sep 6, 2024
347c207
update
SeHor05 Sep 7, 2024
b5482ec
update
SeHor05 Sep 7, 2024
d7d7896
fix
SeHor05 Sep 7, 2024
ecfbeff
fix
SeHor05 Sep 7, 2024
528890c
add log
SeHor05 Sep 7, 2024
e1ca657
update
SeHor05 Sep 7, 2024
dfd1710
update
SeHor05 Sep 7, 2024
100326b
update
SeHor05 Sep 7, 2024
358c0e6
update mintshell
SeHor05 Sep 7, 2024
81ea51f
return message struct
SeHor05 Sep 9, 2024
a74671e
fix
SeHor05 Sep 9, 2024
b0dad4d
fix
SeHor05 Sep 9, 2024
8846d8d
GITBOOK-8: No subject
elasticLove1 Sep 10, 2024
e81aa0c
GITBOOK-9: No subject
elasticLove1 Sep 10, 2024
b80b758
GITBOOK-10: No subject
elasticLove1 Sep 10, 2024
fd6595a
GITBOOK-11: No subject
elasticLove1 Sep 10, 2024
650cadc
GITBOOK-12: No subject
elasticLove1 Sep 10, 2024
d1c33f1
Add minstake instruction
SeHor05 Sep 10, 2024
c14abfb
Update CHANGELOG.md
elasticLove1 Sep 10, 2024
1731797
GITBOOK-13: No subject
elasticLove1 Sep 11, 2024
0641568
Set code salt cell
SilkovAlexander Sep 6, 2024
4ad3242
fmt
SilkovAlexander Sep 11, 2024
c71d227
Merge pull request #28 from tvmlabs/feature/set_code_salt_cell
elasticLove1 Sep 11, 2024
0d9d396
Update CHANGELOG.md
elasticLove1 Sep 11, 2024
257fc3b
add logs
SeHor05 Sep 11, 2024
c8d86fd
Merge branch 'dapp_id' of github.com:tvmlabs/tvm-sdk into dapp_id
SeHor05 Sep 11, 2024
8ad4676
update
SeHor05 Sep 11, 2024
894ad34
update
SeHor05 Sep 11, 2024
c70e000
execute_calculate_validator_reward
SeHor05 Sep 11, 2024
06508e7
Update CHANGELOG.md
elasticLove1 Sep 11, 2024
081a61d
Merge pull request #29 from tvmlabs/dapp_id
elasticLove1 Sep 11, 2024
23dc214
Merge remote-tracking branch 'origin/main' into mintshell
SeHor05 Sep 11, 2024
1fe3798
Fix set src dapp id for messages
SilkovAlexander Sep 12, 2024
58f4495
Increase version
SilkovAlexander Sep 12, 2024
0e1ecb7
update
SeHor05 Sep 12, 2024
008fccf
update
SeHor05 Sep 12, 2024
e7cac36
update
SeHor05 Sep 12, 2024
84fb66e
acc state
SeHor05 Sep 15, 2024
e3a59a1
Merge pull request #30 from tvmlabs/fixes/dapp_id
elasticLove1 Sep 16, 2024
f29f7fc
Merge remote-tracking branch 'origin/main' into mintshell
SeHor05 Sep 17, 2024
8695b1b
fmt
SeHor05 Sep 17, 2024
d226cb7
update
SeHor05 Sep 18, 2024
141ea52
update
SeHor05 Sep 18, 2024
34edec0
small fixes
SeHor05 Sep 18, 2024
b97c72d
update
SeHor05 Sep 19, 2024
54f275b
fmt
SeHor05 Sep 19, 2024
b6102a5
update
SeHor05 Sep 19, 2024
600e871
u128 -> u64
SeHor05 Sep 19, 2024
a36a7af
update
SeHor05 Sep 19, 2024
16d7401
update
SeHor05 Sep 19, 2024
48d9178
GITBOOK-14: No subject
elasticLove1 Sep 19, 2024
a441023
Merge pull request #32 from tvmlabs/gitbook
elasticLove1 Sep 19, 2024
d874a15
Update README.md
elasticLove1 Sep 19, 2024
c8f1723
update
SeHor05 Sep 20, 2024
19aaf79
update CHANGELOG
SeHor05 Sep 20, 2024
5add785
update formula
SeHor05 Sep 20, 2024
41fdb1e
update
SeHor05 Sep 20, 2024
14abf0e
update
SeHor05 Sep 20, 2024
11db5ee
Merge pull request #31 from tvmlabs/mintshell
elasticLove1 Sep 20, 2024
287f06e
Serhii/fix read from cell (#33)
SeHor05 Sep 24, 2024
a3bbca4
improve rawreserve (#34)
SeHor05 Oct 2, 2024
cb2a6cd
Serhii/bugs (#38)
SeHor05 Oct 7, 2024
c0254ee
Serhii/bugs (#39)
SeHor05 Oct 8, 2024
ca35791
dapp_id -> optional (#40)
SeHor05 Oct 11, 2024
8c840f7
Serhii/accept (#42)
SeHor05 Oct 14, 2024
200a179
Vergrth16 base (#37)
alinaT95 Oct 21, 2024
c5243a0
feat: add tvm-debugger json output (#43)
ilyar Oct 24, 2024
149c026
Gitbook (#46)
elasticLove1 Oct 30, 2024
9b6a0d5
Serhii/new revert (#45)
SeHor05 Oct 31, 2024
64b07b5
Renamed ton units to vmshell units (#47)
Oxydixi Nov 4, 2024
633c3b2
Fix transaction_executor (#48)
SeHor05 Dec 16, 2024
8b39f18
revert version to 2.3.1
elasticLove1 Dec 16, 2024
064711e
Fix src dapp id for out messages (#53)
SilkovAlexander Dec 18, 2024
fac418a
delete some flags from reserve (#55)
SeHor05 Dec 23, 2024
f50dfa1
Fixed build error of the tvm_debugger (cargo build inside tvm_debugge…
melsomino Dec 26, 2024
99f1368
Sync message processing in processing.send_message (#60)
elasticLove1 Feb 6, 2025
0309875
fmt
SeHor05 Feb 19, 2025
761c895
Serhii/minstake reward (#59)
SeHor05 Feb 19, 2025
3c0f034
hot fix
SeHor05 Feb 21, 2025
f2a3330
v2.6.0.an: External cell in ShardAccounts (#62)
mnogoborec Feb 26, 2025
3904c74
Vrgth fixes and tests (#49)
alinaT95 Feb 26, 2025
19c6ee2
Feature/tvm execute deadline (#61)
melsomino Feb 27, 2025
8a710e4
Handling WRONG_PRODUCER/THREAD_MISMATCH errors (#67)
sauin Feb 28, 2025
da531b2
fmt
elasticLove1 Feb 28, 2025
070e235
Update Cargo.lock
elasticLove1 Feb 28, 2025
0f72dc9
Artemzhdanov/node 1127 add these functions to tvm debugger cli api fo…
Artem-Zhdanov Mar 3, 2025
d4fd78e
rename tvm_exit_code to exit_code
sauin Mar 7, 2025
4b4caeb
Restore feature "reformat"
Artem-Zhdanov Mar 7, 2025
9e4e7c7
Add default-features = false
Artem-Zhdanov Mar 10, 2025
e020b08
retry on WRONG_PRODUCER or MISMATCH_THREAD
sauin Mar 11, 2025
36999d3
Merge pull request #77 from tvmlabs/selivanov/node-1224-update-error-…
elasticLove1 Mar 11, 2025
4441002
Merge pull request #76 from tvmlabs/selivanov/node-1234-infinite-mess…
elasticLove1 Mar 11, 2025
b27b49f
version up + changelog
elasticLove1 Mar 11, 2025
5a2b14d
Merge pull request #75 from tvmlabs/artemzhdanov/node-1133-research-w…
elasticLove1 Mar 11, 2025
917a4ff
ok
elasticLove1 Mar 11, 2025
b384c32
Merge pull request #78 from tvmlabs/v2.9.0-rc.an
elasticLove1 Mar 11, 2025
ce08d32
bump version
Artem-Zhdanov Mar 12, 2025
34f7bd5
Update Cargo.lock
elasticLove1 Mar 12, 2025
a2b64e4
taplo
Artem-Zhdanov Mar 12, 2025
4079d37
Merge pull request #79 from tvmlabs/remove_auto_code_generation
elasticLove1 Mar 12, 2025
b9ae5c4
add generator of the api.json
sauin Mar 12, 2025
5c562d9
Merge branch 'main' into selivanov/node-1232-fix-rebuild-modulestsupd…
sauin Mar 12, 2025
dcc0733
change the type of the thread_id parameter in send_message
sauin Mar 17, 2025
a38f8cc
update err message
sauin Mar 17, 2025
0716c81
bump up the version
sauin Mar 17, 2025
065a8a4
update changelog
sauin Mar 18, 2025
4f6a770
upd
sauin Mar 18, 2025
add9285
fix due to codereview
sauin Mar 18, 2025
a958de4
taplo format
elasticLove1 Mar 21, 2025
ae68668
Merge pull request #82 from tvmlabs/selivanov/node-1232-fix-rebuild-m…
elasticLove1 Mar 21, 2025
36a9489
Support contract return in send message (#83)
sauin Mar 28, 2025
8366937
Feature/boc reader (#84)
melsomino Apr 25, 2025
74e0925
Send messages directly to bmbp endpoint from the client (#86)
sauin Apr 30, 2025
d7f7d50
Use port from redirect response (#88)
sauin May 5, 2025
b3b840c
Make gosh feature default (#90)
alinaT95 May 12, 2025
10a6946
Bm reward (#91)
SeHor05 May 21, 2025
95cc215
Feature/node 1618 support bm token in sdk (#93)
sauin May 28, 2025
a31855a
add burn instruction (#94)
SeHor05 May 28, 2025
87f8aa9
Feature/burn (#95)
SeHor05 May 29, 2025
bbd2589
CI with new rust (#96)
awnion Jun 5, 2025
8e42955
Feature/node 1645 authenticate ext in msgsrc and bm tokenverifying ke…
sauin Jun 9, 2025
8c87bf5
Feature: Instruction that executes wasm component binaries (#100)
ignaty8 Jun 12, 2025
f5adacf
Feature/wasm gas metering (#101)
ignaty8 Jun 17, 2025
c16a9a3
Fix wasm cargo tests (#103)
ignaty8 Jun 20, 2025
bd9ccd7
Feature: wasm hash loading (#106)
ignaty8 Jun 23, 2025
436524c
Fix: Changed wasm gas usage (#107)
ignaty8 Jun 25, 2025
4c7d368
Feature/node 1774 add account module to sdk with 1 function get accou…
Artem-Zhdanov Jun 27, 2025
14c816c
Feat/tls wasm triple instruction (#108)
ignaty8 Jun 28, 2025
9bc4344
Feature: Add GitHub Actions workflow for tvm-cli release process
awnion Jun 29, 2025
fd82eb0
Feature: Add concurrency control to lint and test workflow
awnion Jun 29, 2025
d31b2d6
Merge pull request #110 from tvmlabs/feature/ci-release
awnion Jun 29, 2025
c3ad04b
CI: Append run number to tag name in release workflow (#113)
awnion Jul 4, 2025
641ab35
Fix/wasm invalid hash panic (#112)
ignaty8 Jul 4, 2025
72738ae
CI: Refactor release job: now it doesn't require matrix (#114)
awnion Jul 4, 2025
943d900
Bash installer for TVM binaries (#102)
awnion Jul 4, 2025
475b106
Feature/node 1836 re generate apijson and make account function avail…
Artem-Zhdanov Jul 7, 2025
a7c8374
bump version (#116)
Artem-Zhdanov Jul 7, 2025
e8ea71f
Feature/node 1944 error in sdk 2183 (#121)
Artem-Zhdanov Jul 24, 2025
5187ddd
Fix version handling in build_download_pattern function (#124)
awnion Jul 29, 2025
5ae6436
BK/BM endpoints refactoring (#125)
elasticLove1 Jul 30, 2025
703a183
Refactor release workflow to improve version handling and prerelease …
awnion Jul 30, 2025
c4ca69f
Feat/wasm io libs (#120)
ignaty8 Aug 4, 2025
6cda114
Refactor/fee (#105)
SeHor05 Aug 5, 2025
253621a
Update CHANGELOG.md
elasticLove1 Aug 5, 2025
f9aa465
Feature/wasm external bins feature (#128)
ignaty8 Aug 6, 2025
656b315
v2.20.2 (#130)
elasticLove1 Aug 11, 2025
3fca670
Feature/wasm determinism plug (#131)
ignaty8 Aug 14, 2025
5f6c748
Feature: optimize merkle update (#134)
SilkovAlexander Aug 14, 2025
7a96773
Tests/wasm extra determinism (#136)
ignaty8 Aug 20, 2025
c603cb7
Prerelease 2.21.0 (#138)
awnion Aug 22, 2025
142094d
Add dapp_id (#142)
Artem-Zhdanov Aug 25, 2025
465427b
Speed up write boc (#145)
SilkovAlexander Aug 27, 2025
ef07aae
dapp id fixes (#151)
SilkovAlexander Sep 18, 2025
a7cbe7a
Feature/NODE-2085 fix bug with extract expires (#141)
fburtyka Sep 19, 2025
4d96a6d
Refactor/bkbmmv (#155)
SeHor05 Sep 22, 2025
d3e4dc5
Refactor/rmv (#157)
SeHor05 Sep 23, 2025
2e47bba
Fix/bocdepth (#153)
ignaty8 Sep 25, 2025
298d250
feature/node-2239-remove-hardcoded-root-facebook-cert-from-wasm-tls_c…
fburtyka Sep 25, 2025
9fffbf7
Feature/node 2258 remove full shard state balance from valueflow (#160)
melsomino Sep 27, 2025
49be3fc
Fixed termination deadline (#161)
SilkovAlexander Sep 30, 2025
4b86963
Add leaf cert subject check and some error codes in certs checking (#…
fburtyka Oct 1, 2025
ddc0d1c
fix tests (#162)
sauin Oct 4, 2025
ce9462d
Fix tls wasm test (#163)
alinaT95 Oct 4, 2025
2076922
2 args, not 3 for VRGRTH16 (#164)
alinaT95 Oct 6, 2025
530e31d
Replace `bloom` with `fastbloom` (#165)
awnion Oct 10, 2025
c1aea69
Fix/debugger (#149)
ignaty8 Oct 13, 2025
50857fb
Feature/node 2045 tvm cli updates (#169)
sauin Oct 15, 2025
c0f805b
version up 2.24.0
elasticLove1 Oct 15, 2025
dc33b2c
Fixes for mv rewards (#170)
SilkovAlexander Oct 16, 2025
ac73c36
Remove repair block seq no + add engine version (#172)
SilkovAlexander Oct 17, 2025
d4d9393
Feature/node 2069 Multifactor flow test (#148)
alinaT95 Oct 23, 2025
dcd86a4
Fix facebook tls wasm test (#171)
alinaT95 Oct 30, 2025
71c2fc7
Update all test data in unit tests for VERGRTH16 (#167)
alinaT95 Oct 31, 2025
dcc8ecb
Fix/rewards (#173)
SeHor05 Nov 4, 2025
f85fd80
Rebuild docs
Artem-Zhdanov Nov 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 5 additions & 0 deletions .gitbook.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
root: ./docs/

structure:
readme: ../README.md
summary: ./SUMMARY.md
Binary file added .gitbook/assets/scr1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .gitbook/assets/ton-sdk-blue.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .gitbook/assets/ton-sdk.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
218 changes: 218 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,218 @@
name: Release tvm-cli

on:
push:
# NOTE: if tag has -rc or -rc<digit> in it, it will be considered a release candidate
# and will trigger prerelease true
tags:
- 'v[0-9]+.[0-9]+.[0-9]+.an'
- 'v[0-9]+.[0-9]+.[0-9]+-rc.an'
- 'v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+.an'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: write

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- suffix: macos-arm64
target: aarch64-apple-darwin
os: macos-15
zigbuild: false

# - suffix: macos-amd64
# target: x86_64-apple-darwin
# os: macos-13
# zigbuild: false

- suffix: linux-musl-arm64
target: aarch64-unknown-linux-musl
os: ubuntu-24.04-arm
zigbuild: true

- suffix: linux-musl-amd64
target: x86_64-unknown-linux-musl
os: ubuntu-24.04
zigbuild: true

- suffix: arm64
target: aarch64-unknown-linux-gnu
os: ubuntu-24.04-arm
zigbuild: false

- suffix: x86_64
target: x86_64-unknown-linux-gnu
os: ubuntu-24.04
zigbuild: false

name: Build ${{ matrix.target }}

env:
CARGO_TERM_COLOR: always
SCCACHE_GHA_VERSION: ${{ vars.SCCACHE_GHA_VERSION || 1 }}
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: sccache
CMAKE_C_COMPILER_LAUNCHER: sccache
CMAKE_CXX_COMPILER_LAUNCHER: sccache

steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Set VERSION
id: version
run: |
echo "VERSION=$(cat version.json | jq -r .version)" >> "$GITHUB_OUTPUT"

- name: Configure sccache
uses: mozilla-actions/sccache-action@v0.0.9

- name: Setup cargo cache
uses: actions/cache@v4
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: builder-${{ runner.os }}-cargo

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}

- name: Install Linux tools
if: startsWith(matrix.os, 'ubuntu-')
env:
packages: >-
build-essential
cmake
curl
jq
clang
librocksdb-dev
protobuf-compiler
python3-pip
run: |
sudo apt update -yq
sudo apt install -yq $packages
pip3 install ziglang
[[ -f ~/.cargo/bin/cargo-zigbuild ]] || cargo install cargo-zigbuild

- name: Install MacOS tools
if: startsWith(matrix.os, 'macos-')
run: |
brew install protobuf jq

- name: Build Binary
env:
CARGO_INCREMENTAL: 0
CARGO_NET_RETRY: 10
RUST_BACKTRACE: full
RUSTUP_MAX_RETRIES: 10
run: |
cargo update

for binary in tvm-cli tvm-debugger; do
if [[ "${{ matrix.zigbuild }}" == "true" ]]; then
cargo zigbuild -r --target ${{ matrix.target }} --bin "$binary"
else
cargo build -r --target ${{ matrix.target }} --bin "$binary"
fi
done
ls -lA target/${{ matrix.target }}/release

- name: List all binaries
run: |
mkdir artifacts-${{ matrix.suffix }}

for binary in tvm-cli tvm-debugger; do
mv target/${{ matrix.target }}/release/$binary artifacts-${{ matrix.suffix }}/$binary
done
ls -lA artifacts-${{ matrix.suffix }}

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
path: artifacts-${{ matrix.suffix }}/*
name: artifacts-${{ matrix.suffix }}
if-no-files-found: error
retention-days: 3

outputs:
version: ${{ steps.version.outputs.VERSION }}

release:
needs:
- build
runs-on: ubuntu-latest

env:
SUFFIXES: macos-arm64 linux-musl-arm64 linux-musl-amd64 arm64 x86_64

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Download all artifacts
uses: actions/download-artifact@v4

- name: Display structure of downloaded files
run: ls -R

- name: Make archives
run: |
set -e
version=$(echo "${{ github.ref_name }}" | sed 's/^v//')
for suffix in $SUFFIXES; do
chmod +x artifacts-"$suffix"/*
cd artifacts-"$suffix"
for file in *; do
tar -czvf "$file"-"$version"-"$suffix".tar.gz $file
done
cd ..
ls -lA artifacts-"$suffix"
done

- name: Set prerelease flag
id: prerelease
run: |
if [[ "${{ github.ref_name }}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+.an$ ]]; then
echo "PRERELEASE=false" >> $GITHUB_OUTPUT
else
echo "PRERELEASE=true" >> $GITHUB_OUTPUT
fi

- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TITLE: ${{ steps.prerelease.outputs.TITLE }}
PRERELEASE: ${{ steps.prerelease.outputs.PRERELEASE }}
run: |
TITLE="Version: ${{ github.ref_name }}"
EXISTS=$(gh api repos/${{ github.repository }}/releases/tags/${{ github.ref_name }} --silent && echo "true" || echo "false")

if [[ "$EXISTS" = "false" ]]; then
if [[ "$PRERELEASE" = "false" ]]; then
gh release create "${{ github.ref_name }}" --title "$TITLE"
else
gh release create "${{ github.ref_name }}" --title "$TITLE" --prerelease
fi
fi

- name: Upload to release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload "${{ github.ref_name }}" \
artifacts-*/**.tar.gz \
--clobber
34 changes: 34 additions & 0 deletions .github/workflows/rust.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
on: [push, pull_request]

name: Lint and Test

concurrency:
group: lint-and-test-${{ github.sha }}
cancel-in-progress: true

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
components: clippy, rustfmt
- run: |
cargo +nightly fmt --all -- --check
# Check formatting for each example
for manifest in $(find examples -name Cargo.toml); do
cargo +nightly fmt --manifest-path $manifest -- --check
done

## clippy is currently broken, require big refactor
# - run: cargo clippy -- -D warnings

test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo test -r --lib
22 changes: 19 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
# will have compiled files and executables
target/

# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
Cargo.lock
# Vim temporary files
*.swp

# These are backup files generated by rustfmt
**/*.rs.bk
Expand All @@ -13,7 +12,24 @@ Cargo.lock
*.pdb
*.exe
*.rlib
build/

# IDE files
.idea
.vscode
.DS_Store
/tvm_client/**/*.a
/tvm_client/**/*.so
/tvm_client/**/*.gz
/tvm_client/**/*.dylib
/tvm_client/client/bin/
/tvm_client/client/build/
/tvm_client/src/build_info.json
/examples/c/libtvm_client.dylib
/tools/node_modules/
/tools/**/*.map
/tools/**/*.js
/tools/**/*.d.ts
/tools/**/*.tsbuildinfo
/tools/package-lock.json
/**/clion-log.txt
Loading
Loading