Skip to content

Commit 30b547f

Browse files
committed
[ci] add amplify.yml
1 parent 6e1646e commit 30b547f

File tree

1 file changed

+65
-0
lines changed

1 file changed

+65
-0
lines changed

amplify.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
version: 1
2+
3+
frontend:
4+
phases:
5+
preBuild:
6+
commands:
7+
- echo "preBuild enable corepack and prepare pnpm"
8+
- corepack enable
9+
- corepack prepare pnpm@latest --activate
10+
- node -v
11+
- npm -v
12+
- pnpm -v || true
13+
- echo "Install JS dependencies (root of monorepo)"
14+
- pnpm install --frozen-lockfile
15+
16+
- |
17+
if ! command -v cargo >/dev/null 2>&1; then
18+
echo "Installing rustup & cargo toolchain (stable)"
19+
curl https://sh.rustup.rs -sSf | sh -s -- -y
20+
source $HOME/.cargo/env
21+
else
22+
echo "cargo already available"
23+
fi
24+
25+
- |
26+
if ! command -v wasm-bindgen >/dev/null 2>&1; then
27+
echo "Installing wasm-bindgen-cli"
28+
cargo install wasm-bindgen-cli --version 0.2.105 || true
29+
fi
30+
- |
31+
if ! command -v wasm-snip >/dev/null 2>&1; then
32+
echo "Installing wasm-snip"
33+
cargo install --git https://github.com/r58playz/wasm-snip || true
34+
fi
35+
36+
build:
37+
commands:
38+
- echo "Build Dreamland"
39+
- cd external/dreamland
40+
- pnpm install --frozen-lockfile
41+
- pnpm build
42+
- cd -
43+
- echo "1) Build Scramjet core"
44+
- cd packages/scramjet/packages/core
45+
46+
- echo "Pack core package"
47+
- pnpm pack
48+
- cd -
49+
50+
- echo "2) Build frontend"
51+
52+
- pnpm build
53+
- VITE_PUTER_BRANDING=1 VITE_ISOLATION_ORIGIN="https://puter.zone" pnpm build:chrome
54+
55+
# No tests, no artifact collection steps per request.
56+
57+
cache:
58+
paths:
59+
- ~/.pnpm-store/**/*
60+
- node_modules/**/*
61+
- packages/**/node_modules/**/*
62+
- packages/scramjet/packages/core/rewriter/wasm/out/**/*
63+
- packages/scramjet/packages/core/dist/**/*
64+
- $HOME/.cargo/**/*
65+
- $HOME/.rustup/**/*

0 commit comments

Comments
 (0)