|
| 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 | + |
| 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 | + |
| 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 | + |
| 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