Skip to content

Commit 345475d

Browse files
authored
Support Iroha 2.0.0-rc.1 + move to Deno & JSR (#199)
1 parent 9cf6215 commit 345475d

File tree

326 files changed

+15464
-24123
lines changed

Some content is hidden

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

326 files changed

+15464
-24123
lines changed

.changeset/README.md

Lines changed: 0 additions & 8 deletions
This file was deleted.

.changeset/config.json

Lines changed: 0 additions & 9 deletions
This file was deleted.

.eslintignore

Lines changed: 0 additions & 8 deletions
This file was deleted.

.eslintrc.js

Lines changed: 0 additions & 59 deletions
This file was deleted.

.github/workflows/pull-request.yml

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
name: Unified CI/CD
2+
on:
3+
pull_request:
4+
branches: [main]
5+
push:
6+
branches: [main]
7+
env:
8+
IROHA_GIT: https://github.com/0x009922/iroha.git
9+
IROHA_REV: 5302-expose-signature-payload
10+
jobs:
11+
prep-crypto-wasm:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
- uses: actions/cache@v4
16+
id: prep-cache
17+
with:
18+
path: |
19+
prep/crypto-wasm
20+
key: ${{ runner.os }}-${{ hashFiles('crypto-wasm/*') }}
21+
- uses: actions-rust-lang/setup-rust-toolchain@v1
22+
if: steps.prep-cache.outputs.cache-hit != 'true'
23+
with:
24+
cache: 'false'
25+
toolchain: 'nightly-2024-09-09,stable'
26+
target: 'wasm32-unknown-unknown'
27+
components: rust-src
28+
- uses: jetli/[email protected]
29+
if: steps.prep-cache.outputs.cache-hit != 'true'
30+
with:
31+
version: 'v0.13.1'
32+
- uses: denoland/setup-deno@v2
33+
if: steps.prep-cache.outputs.cache-hit != 'true'
34+
with:
35+
deno-version: v2.x
36+
- name: Build packages
37+
if: steps.prep-cache.outputs.cache-hit != 'true'
38+
run: deno task prep:crypto-wasm
39+
40+
prep-iroha:
41+
runs-on: ubuntu-latest
42+
steps:
43+
- uses: actions/checkout@v4
44+
- uses: actions/cache@v4
45+
id: prep-cache
46+
with:
47+
path: |
48+
prep/iroha
49+
key: ${{ runner.os }}-${{ env.IROHA_GIT }}-${{ env.IROHA_REV }}
50+
- uses: actions-rust-lang/setup-rust-toolchain@v1
51+
if: steps.prep-cache.outputs.cache-hit != 'true'
52+
with:
53+
toolchain: 'nightly-2024-09-09'
54+
target: 'wasm32-unknown-unknown'
55+
components: rust-src
56+
cache: 'false'
57+
- uses: denoland/setup-deno@v2
58+
if: steps.prep-cache.outputs.cache-hit != 'true'
59+
with:
60+
deno-version: v2.x
61+
- name: Prepare Iroha artifacts
62+
if: steps.prep-cache.outputs.cache-hit != 'true'
63+
run: |
64+
deno task prep:iroha --git $IROHA_GIT --git-rev $IROHA_REV
65+
deno task prep:iroha:build
66+
67+
check:
68+
needs: ['prep-crypto-wasm', 'prep-iroha']
69+
runs-on: ubuntu-latest
70+
steps:
71+
- uses: actions/checkout@v3
72+
- uses: actions/cache/restore@v4
73+
with:
74+
fail-on-cache-miss: true
75+
key: ${{ runner.os }}-${{ env.IROHA_GIT }}-${{ env.IROHA_REV }}
76+
path: |
77+
prep/iroha
78+
- uses: actions/cache/restore@v4
79+
with:
80+
fail-on-cache-miss: true
81+
key: ${{ runner.os }}-${{ hashFiles('crypto-wasm/*') }}
82+
path: |
83+
prep/crypto-wasm
84+
- uses: denoland/setup-deno@v2
85+
with:
86+
deno-version: v2.x
87+
- uses: actions/setup-node@v4
88+
with:
89+
node-version: 22
90+
- name: Enable pnpm via Corepack
91+
run: |
92+
echo "Before: corepack version => $(corepack --version || echo 'not installed')"
93+
npm install -g corepack@latest
94+
echo "After : corepack version => $(corepack --version)"
95+
corepack enable pnpm
96+
- name: Deno install
97+
run: deno task install
98+
- name: Deno check
99+
run: deno task check:all
100+
- name: Deno lint, fmt
101+
run: |
102+
deno lint
103+
deno fmt --check
104+
- name: Test
105+
run: deno task test
106+
107+
publish:
108+
if: github.event_name == 'push'
109+
needs: [check]
110+
runs-on: ubuntu-latest
111+
steps:
112+
- uses: actions/checkout@v3
113+
- uses: actions/cache/restore@v4
114+
with:
115+
fail-on-cache-miss: true
116+
key: ${{ runner.os }}-${{ env.IROHA_GIT }}-${{ env.IROHA_REV }}
117+
path: |
118+
prep/iroha
119+
- uses: actions/cache/restore@v4
120+
with:
121+
fail-on-cache-miss: true
122+
key: ${{ runner.os }}-${{ hashFiles('crypto-wasm/*') }}
123+
path: |
124+
prep/crypto-wasm
125+
- uses: denoland/setup-deno@v2
126+
with:
127+
deno-version: v2.x
128+
- name: Publish
129+
run: deno task publish --token $JSR_TOKEN
130+
env:
131+
JSR_TOKEN: 'TODO'

.gitignore

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
1+
.vite
12
node_modules
23
.DS_Store
3-
dist
4-
dist-tsc
5-
/etc/api/tmp
6-
/docs/api
4+
75
esbuild-kit
86
v8-compile-cache-0
97

108
.pnpm-debug.log
119
.idea
10+
.vscode
11+
12+
/prep
13+
/.iroha
14+
/packages/crypto-target-*/wasm-target
15+
/packages/core/crypto/wasm-target
16+
**/*_generated_.ts
17+

.npmrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

.prettierignore

Lines changed: 0 additions & 7 deletions
This file was deleted.

.prettierrc.js

Lines changed: 0 additions & 51 deletions
This file was deleted.

.vscode/settings.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)