Skip to content

Commit a001cc3

Browse files
committed
add CI build
1 parent 87dada5 commit a001cc3

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/build.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: "Build"
2+
on:
3+
push:
4+
release:
5+
6+
jobs:
7+
build:
8+
name: cargo build
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- uses: actions-rust-lang/setup-rust-toolchain@v1
13+
with:
14+
target: wasm32-unknown-unknown
15+
toolchain: "1.81.0"
16+
rustflags: ""
17+
- run: apt update -y && apt install -y clang
18+
- run: echo $GITHUB_WORKSPACE
19+
- run: |
20+
pushd $GITHUB_WORKSPACE
21+
mkdir -p vendor2/protoc
22+
curl -L https://github.com/protocolbuffers/protobuf/releases/download/v25.6/protoc-25.6-linux-x86_64.zip > vendor2/protoc/protoc-25.6-linux-x86_64.zip
23+
pushd vendor2/protoc/
24+
unzip protoc-25.6-linux-x86_64.zip
25+
echo 'export PATH=$PATH:'$(pwd)"/bin" >> $GITHUB_PATH
26+
popd
27+
pushd vendor2/
28+
git clone https://github.com/v2fly/v2ray-core.git v2ray-core
29+
popd
30+
popd
31+
bash -c "env"
32+
33+
- run: cargo build --target wasm32-unknown-unknown
34+
- run: cargo install trunk --locked
35+
- run: trunk build --release true
36+
- uses: actions/upload-artifact@v4
37+
with:
38+
path: dist/

0 commit comments

Comments
 (0)