Skip to content

Commit 7c99dc8

Browse files
authored
Merge pull request #10 from Moros1138/test-branch
Add CI and Deployment
2 parents ccd3b36 + 284f565 commit 7c99dc8

File tree

2 files changed

+77
-8
lines changed

2 files changed

+77
-8
lines changed

.github/workflows/emscripten-build.yml

+7-8
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ name: Emscripten Build
33
on:
44
push:
55
branches:
6-
- main
7-
- test-branch
6+
- develop
87
pull_request:
98
branches:
9+
- develop
1010
- main
1111

1212
jobs:
@@ -16,6 +16,8 @@ jobs:
1616
steps:
1717
- name: Checkout source code
1818
uses: actions/checkout@v3
19+
with:
20+
submodules: 'recursive'
1921

2022
- name: Set up Python (required for Emscripten)
2123
uses: actions/setup-python@v4
@@ -31,14 +33,11 @@ jobs:
3133
source ./emsdk_env.sh
3234
shell: bash
3335

34-
- name: Configure the build
36+
- name: Build with Emscripten
3537
run: |
38+
source emsdk/emsdk_env.sh
3639
cd demo
3740
make emscripten
3841
shell: bash
3942

40-
- name: Upload build artifacts
41-
uses: actions/upload-artifact@v4
42-
with:
43-
name: build
44-
path: build/
43+
+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Emscripten Deploy
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout source code
14+
uses: actions/checkout@v3
15+
with:
16+
submodules: 'recursive'
17+
18+
- name: Set up Python (required for Emscripten)
19+
uses: actions/setup-python@v4
20+
with:
21+
python-version: '3.x'
22+
23+
- name: Install Emscripten SDK
24+
run: |
25+
git clone https://github.com/emscripten-core/emsdk.git
26+
cd emsdk
27+
./emsdk install latest
28+
./emsdk activate latest
29+
source ./emsdk_env.sh
30+
shell: bash
31+
32+
- name: Build with Emscripten
33+
run: |
34+
source emsdk/emsdk_env.sh
35+
cd demo
36+
make emscripten
37+
shell: bash
38+
39+
- name: Deploy Main Demo
40+
uses: appleboy/[email protected]
41+
with:
42+
host: ${{ secrets.REMOTE_SERVER_ADDR }}
43+
username: ${{ secrets.REMOTE_SERVER_USER }}
44+
key: ${{ secrets.REMOTE_SERVER_SSH_KEY }}
45+
port: ${{ secrets.REMOTE_SERVER_PORT }}
46+
source: "demo/demo.html,demo/demo.js,demo/demo.wasm,demo/demo.data"
47+
target: ${{ secrets.REMOTE_SERVER_DIRECTORY }}
48+
strip_components: 1
49+
50+
- name: Deploy Waveform Demo
51+
uses: appleboy/[email protected]
52+
with:
53+
host: ${{ secrets.REMOTE_SERVER_ADDR }}
54+
username: ${{ secrets.REMOTE_SERVER_USER }}
55+
key: ${{ secrets.REMOTE_SERVER_SSH_KEY }}
56+
port: ${{ secrets.REMOTE_SERVER_PORT }}
57+
source: "demo/demo_waveform.html,demo/demo_waveform.js,demo/demo_waveform.wasm,demo/demo_waveform.data"
58+
target: ${{ secrets.REMOTE_SERVER_DIRECTORY }}
59+
strip_components: 1
60+
61+
- name: Deploy Synthesis Demo
62+
uses: appleboy/[email protected]
63+
with:
64+
host: ${{ secrets.REMOTE_SERVER_ADDR }}
65+
username: ${{ secrets.REMOTE_SERVER_USER }}
66+
key: ${{ secrets.REMOTE_SERVER_SSH_KEY }}
67+
port: ${{ secrets.REMOTE_SERVER_PORT }}
68+
source: "demo/demo_synthesis.html,demo/demo_synthesis.js,demo/demo_synthesis.wasm,demo/demo_synthesis.data"
69+
target: ${{ secrets.REMOTE_SERVER_DIRECTORY }}
70+
strip_components: 1

0 commit comments

Comments
 (0)