| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- name: wasm
- on:
- push:
- paths:
- - '.github/workflows/wasm.yml'
- # - 'lua/**'
- # - 'luat/**'
- # - 'components/**'
- - 'bsp/sysp/**'
- workflow_dispatch:
- jobs:
- build:
- runs-on: ubuntu-20.04
- steps:
- - uses: actions/checkout@v1
- - name: prepare software
- run: |
- sudo apt-get update
- sudo apt-get install git gcc-multilib libc6 libgcc1 libstdc++5 libstdc++6 libsdl-dev p7zip-full -y
- sudo apt-get install libncurses5-dev -y
- - name: make
- run: |
- cd ..
- git clone https://github.com/emscripten-core/emsdk.git
- cd emsdk
- ./emsdk install latest
- ./emsdk activate latest
- source ./emsdk_env.sh
- cd ../LuatOS/bsp/sysp/build
- emcmake cmake ..
- emmake make -j16
- mkdir ../../../luatosfw
- mv *.html ../../../luatosfw
- mv luatos.* ../../../luatosfw
- - name: Upload artifact
- uses: actions/upload-artifact@v1
- with:
- name: wasm
- path: luatosfw
- - name: report if failure
- if: always()
- env:
- STATUS: ${{ job.status }}
- MQTTADDR: ${{ secrets.MQTTADDR }}
- MQTTPORT: ${{ secrets.MQTTPORT }}
- MQTTTOPIC: ${{ secrets.MQTTTOPIC }}
- DD_APPKEY: ${{ secrets.DD_APPKEY }}
- DD_APPSECRET: ${{ secrets.DD_APPSECRET }}
- DD_NOTIFY_LIST: ${{ secrets.DD_NOTIFY_LIST }}
- DD_API_TOKEN: ${{ secrets.DD_API_TOKEN }}
- DD_API_SEND: ${{ secrets.DD_API_SEND }}
- run: |
- sudo pip3 install paho_mqtt gitpython requests
- cd tools
- if [ "$STATUS" = "failure" ];then python3 ciNotify.py $MQTTADDR $MQTTPORT $MQTTTOPIC "https://github.com/openLuat/LuatOS/actions/runs/$GITHUB_RUN_ID" "wasm" "$DD_APPKEY" "$DD_APPSECRET" "$DD_NOTIFY_LIST" "$DD_API_TOKEN" "$DD_API_SEND"; fi
|