ARM技术william hill官网
直播中

jf_84491108

2年用户 1520经验值
擅长:嵌入式技术
私信 关注
[经验]

【触觉智能 Purple Pi开发板试用】 GitHub Actions 在线编译 qmsd by jf_84491108

https://github.com/wireless-tag-com/8ms-sigmastar提供了本地编译Purple Pi R1 qmsd的教程。

但本地编译需要一台安装了Linux或在虚拟机中安装了Linux的主机,在更新Linux和安装依赖库时往往因网络原因导致依赖库安装不完整,需要更换安装源等,但即使换源安装完依赖库,在编译过程中可能还会遇到各种由换源安装导致的稀奇古怪的bug,费时费力。而利用GitHub Actions 在线编译则往往是一个比较好的替代选择。

在线编译步骤如下:

1.png
(1)https://github.com/页面点击绿色New按钮打开新建项目页面

2.png
(2)输入项目名称 Repository name,如PurPle-Pi-R1-qmsd-GithubActions,点击绿色Creat repository按钮新建项目

3.png
(3)点击creat a new file链接打开新建文件页面

4.png
(4)文件名框中输入.github/workflows/8ms-sigmastar-ssd201-qmsd.yml,文本框中输入如下代码:

name: 8ms-sigmastar-ssd20x-qmsd 云编译

on: 
  repository_dispatch:
  workflow_dispatch:
  release:
    types: [published]
  push:
    tags:
    - 'v*'   
jobs:
  build:
    runs-on: ubuntu-20.04
    if: github.event.repository.owner.id == github.event.sender.id

    steps:
    - name: Checkout
      uses: actions/checkout@main
    - name: Initialization environment
      env:
        DEBIAN_FRONTEND: noninteractive
      run: |
        sudo apt-get update && sudo apt-get full-upgrade -y && sudo apt-get upgrade -y && sudo apt-get autoremove -y
        sudo apt-get install subversion build-essential libncurses5-dev zlib1g-dev gawk git ccache gettext libssl-dev xsltproc libxml-parser-perl gengetopt default-jre-headless ocaml-nox sharutils texinfo git gcc g++ make
        sudo apt install -y ack antlr3 asciidoc autoconf automake autopoint binutils bison build-essential \
           bzip2 ccache cmake cpio curl device-tree-compiler fastjar flex gawk gettext gcc-multilib g++-multilib \
           git gperf haveged help2man intltool libc6-dev-i386 libelf-dev libglib2.0-dev libgmp3-dev libltdl-dev \
           libmpc-dev libmpfr-dev libncurses5-dev libncursesw5-dev libreadline-dev libssl-dev libtool lrzsz \
           mkisofs msmtp nano ninja-build p7zip p7zip-full patch pkgconf python2.7 python3 python3-pip libpython3-dev qemu-utils \
           rsync scons squashfs-tools subversion swig texinfo uglifyjs upx-ucl unzip vim wget xmlto xxd zlib1g-dev
        sudo apt install build-essential ccache ecj fastjar file g++ gawk \
           gettext git java-propose-classpath libelf-dev libncurses5-dev \
           libncursesw5-dev libssl-dev python python2.7-dev python3 unzip wget \
           python-distutils-extra python3-setuptools python3-dev rsync subversion \
           swig time xsltproc zlib1g-dev
        sudo apt-get install lib32ncurses5-dev lib32z1-dev
        sudo apt-get install gcc-arm* 
        sudo dpkg --add-architecture i386
        sudo apt-get update
        sudo apt-get install zlib1g:i386 libstdc++6:i386 libc6:i386 libc6-dev-i386           
    - name: Clone source code
      run: |
        cd ~
        git clone https://github.com/wireless-tag-com/8ms-sigmastar.git
        cd /opt
        wget https://github.com/LV36/openwrt-ssd20x-toolchian/releases/download/2018.08/wt-gcc-arm-8.2-2018.08-x86_64-arm-linux-gnueabihf.tag.gz
        tar -xvf wt-gcc-arm-8.2-2018.08-x86_64-arm-linux-gnueabihf.tag.gz
        sudo chmod 777 ~/.profile
        echo -e '\nexport PATH=/opt/gcc-arm-8.2-2018.08-x86_64-arm-linux-gnueabihf/bin:$PATH\n' >> ~/.profile
        source ~/.profile
        arm-linux-gnueabihf-gcc --version       
    - name: Build Firmware
      run: |
        cd ~/8ms-sigmastar
        make CHIP=ssd20x
        ls
        cd ~/8ms-sigmastar/bin
        ls
        tar -czvf 8ms-sigmastar-ssd20x-qmsd.tar.gz ~/8ms-sigmastar/bin/qmsd-demo
    - name : Upload packages
      uses: actions/upload-artifact@main
      if: always()
      with:
        name: 8ms-sigmastar-ssd20x-qmsd
        path: ~/8ms-sigmastar/bin/qmsd-demo/

5.png
(5)点击绿色Commit new file按钮提交修改

6.png
(6)点击Actions打开Actions页面

7.png
(7)单击选中8ms-sigmastar-ssd20x-qmsd 云编译

8.png
(8)点击Run workflow展开下拉列表

8.png
(9)点击绿色Run workflow按钮开始进行在线编译

10.png
(10)大约6分钟后,在线编译完成,点击绿色对号8ms-sigmastar-ssd20x-qmsd 云编译进入详情页

11.png
(11)点击8ms-sigmastar-ssd20x-qmsd下载在线编译获得的qmsd文件

编译结果:*附件:8ms-sigmastar-ssd20x-qmsd.zip

回帖(2)

dianzi

2022-11-2 22:01:29
感谢分享
举报

dianzi

2022-11-2 22:03:10
GitHub Actions 在线编译功能 看着很实用呀   速度看着也可以啊
举报

更多回帖

发帖
×
20
完善资料,
赚取积分