Skip to content

Commit 3a0b429

Browse files
committed
feat(ci): separate prep-crypto-wasm job
Signed-off-by: 0x009922 <43530070+0x009922@users.noreply.github.com>
1 parent 36d1b0a commit 3a0b429

File tree

3 files changed

+24
-1
lines changed

3 files changed

+24
-1
lines changed

.github/workflows/pull-request.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,29 @@ on:
33
pull_request:
44
branches: [main]
55
jobs:
6+
prep-crypto-wasm:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v4
10+
- uses: actions-rust-lang/setup-rust-toolchain@v1
11+
with:
12+
cache: 'false'
13+
- uses: jetli/wasm-pack-action@v0.4.0
14+
- uses: denoland/setup-deno@v2
15+
with:
16+
deno-version: v2.x
17+
- uses: actions/cache@v4
18+
name: prep-cache
19+
with:
20+
path: |
21+
prep/crypto-wasm
22+
key: ${{ runner.os }}-{{ hashFiles('crypto-wasm/*') }}
23+
- name: Build packages
24+
if: steps.prep-cache.outputs.cache-hit != 'true'
25+
run: deno task prep:crypto-wasm
26+
627
check:
28+
if: false
729
runs-on: ubuntu-latest
830
steps:
931
- uses: actions/checkout@v3

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ v8-compile-cache-0
99
.idea
1010
.vscode
1111

12+
/prep
1213
/.iroha
1314
/packages/crypto*/wasm-target
1415
**/*_generated_.ts

etc/task-prep-crypto-wasm.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const WASM_PACK_OUT_NAME = 'iroha_crypto'
99
const PROJECT_DIR = resolveFromRoot('crypto-wasm')
1010

1111
function wasmPackOutDir(target: 'node' | 'web') {
12-
return resolveFromRoot(`crypto-wasm/target/pkg-${target}`)
12+
return resolveFromRoot(`prep/crypto-wasm/pkg-${target}`)
1313
}
1414

1515
async function runCargoBuild(): Promise<{ hash: string }> {

0 commit comments

Comments
 (0)