| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- name: air640w
- on:
- push:
- paths:
- - '.github/workflows/air640w.yml'
- - 'lua/**'
- - 'luat/**'
- - 'components/**'
- - 'bsp/air640w/**'
- workflow_dispatch:
- jobs:
- build:
- runs-on: ubuntu-20.04
- steps:
- - uses: actions/checkout@v1
- - name: prepare software
- run: |
- cd ..
- sudo apt-get update
- sudo apt-get install git gcc-multilib libc6 libgcc1 libstdc++5 libstdc++6 libsdl-dev scons p7zip-full -y
- sudo apt-get install libncurses5-dev -y
- sudo pip install requests
- wget -q https://github.com/openLuat/LuatOS/releases/download/v0.0.1/gcc-arm-none-eabi-6-2017-q2-update-linux.tar.bz2
- sudo tar xjf gcc-arm-none-eabi-6-2017-q2-update-linux.tar.bz2 -C /opt
- /opt/gcc-arm-none-eabi-6-2017-q2-update/bin/arm-none-eabi-gcc --version
- - name: clone rtt
- run: |
- git clone https://github.com/RT-Thread/rt-thread.git ~/work/action/rt-thread
- cd ~/work/action/rt-thread
- - name: prepare packages
- run: |
- cd bsp/air640w/rtt
- export RTT_EXEC_PATH=/opt/gcc-arm-none-eabi-6-2017-q2-update/bin
- export RTT_ROOT=~/work/action/rt-thread
- echo | scons --menuconfig
- source ~/.env/env.sh
- wget https://github.com/openLuat/LuatOS/releases/download/v0.0.1/packages-640w.7z
- 7z x packages-640w.7z
- chmod 755 -R packages/wm_libraries-latest/Tools/
- - name: make
- run: |
- cd bsp/air640w/rtt
- export RTT_EXEC_PATH=/opt/gcc-arm-none-eabi-6-2017-q2-update/bin
- export RTT_ROOT=~/work/action/rt-thread
- source ~/.env/env.sh
- scons -j2
- - name: Upload artifact
- uses: actions/upload-artifact@v1
- with:
- name: air640w
- path: bsp/air640w/rtt/Bin
- - 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" "$DD_APPKEY" "$DD_APPSECRET" "$DD_NOTIFY_LIST" "$DD_API_TOKEN" "$DD_API_SEND"; fi
|