bluetoothlover_doc icon indicating copy to clipboard operation
bluetoothlover_doc copied to clipboard

[github][action] 学习action

Open supperthomas opened this issue 4 years ago • 41 comments

https://github.com/supperthomas/esp-idf-ci-action

supperthomas avatar Nov 30 '21 01:11 supperthomas

官方资料

  • 关于持续集成:https://docs.github.com/cn/actions/automating-builds-and-tests/about-continuous-integration
  • GitHub Actions 快速入门:https://docs.github.com/cn/actions/quickstart
  • 关于 GitHub 托管的运行器:https://docs.github.com/cn/actions/using-github-hosted-runners/about-github-hosted-runners

hyhkjiy avatar Nov 30 '21 02:11 hyhkjiy

image

supperthomas avatar Nov 30 '21 02:11 supperthomas

https://blog.csdn.net/alex_yangchuansheng/article/details/108313625

supperthomas avatar Nov 30 '21 03:11 supperthomas

创建 Docker 容器操作 https://docs.github.com/cn/actions/creating-actions/creating-a-docker-container-action

supperthomas avatar Nov 30 '21 05:11 supperthomas

图片

supperthomas avatar Dec 01 '21 12:12 supperthomas

ubuntu 原装软件 https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-README.md

supperthomas avatar Dec 01 '21 14:12 supperthomas

GitHub Actions 有一些自己的术语。

workflow (工作流程):持续集成一次运行的过程,就是一个 workflow。

job (任务):一个 workflow 由一个或多个 jobs 构成,含义是一次持续集成的运行,可以完成多个任务。

step(步骤):每个 job 由多个 step 构成,一步步完成。

action (动作):每个 step 可以依次执行一个或多个命令(action)。

supperthomas avatar Dec 01 '21 14:12 supperthomas

https://docs.github.com/cn/actions/learn-github-actions/understanding-github-actions 图片

supperthomas avatar Dec 01 '21 14:12 supperthomas

图片

supperthomas avatar Dec 01 '21 14:12 supperthomas

yml 语法 https://docs.github.com/cn/actions/learn-github-actions/understanding-github-actions

supperthomas avatar Dec 01 '21 14:12 supperthomas

图片

supperthomas avatar Dec 01 '21 15:12 supperthomas

要看懂action.yml 看下面这个连接比较管用 https://docs.github.com/cn/actions/learn-github-actions/workflow-syntax-for-github-actions#example

supperthomas avatar Dec 01 '21 15:12 supperthomas

图片

supperthomas avatar Dec 01 '21 15:12 supperthomas

所有的参考 https://github.com/actions/checkout https://github.com/actions

supperthomas avatar Dec 01 '21 15:12 supperthomas

github actionCI部署有两种方式

  1. 直接写action.yml(类似于dockerfile) 可复用性不是很强
  2. 直接写Dockerfile 做一个action然后调用 这个可复用性强,缺点是整合起来比较慢一些
  3. 直接调dockerhub中的image 这个github用起来比较方便,放到dockerhub中管理,缺点需要下载最新的github整合,也要写action.yml

如果想要节省时间:

  1. 使用dockerhub中的直接使用,然后进行github下载代码,然后根据toolchain进行编译

supperthomas avatar Dec 01 '21 15:12 supperthomas

还有个软件包的问题:

  1. menuconfig需要 如何能用命令行选择软件包。这个问题比较难解决?

supperthomas avatar Dec 01 '21 15:12 supperthomas

还有个软件包的问题:

1. menuconfig需要 如何能用命令行选择软件包。这个问题比较难解决?

哈哈,有办法了。。

supperthomas avatar Dec 01 '21 15:12 supperthomas

还有个软件包的问题:

1. menuconfig需要 如何能用命令行选择软件包。这个问题比较难解决?

哈哈,有办法了。。 分享一下吧😁

hyhkjiy avatar Dec 01 '21 18:12 hyhkjiy

还有个软件包的问题:

1. menuconfig需要 如何能用命令行选择软件包。这个问题比较难解决?

哈哈,有办法了。。 分享一下吧😁

可以先把.config弄好,然后拷贝覆盖进去

supperthomas avatar Dec 01 '21 20:12 supperthomas

https://club.rt-thread.org/ask/article/9683302d4d44f637.html

supperthomas avatar Sep 21 '22 12:09 supperthomas

Github Action 精华指南 https://zhuanlan.zhihu.com/p/164744104

supperthomas avatar Dec 01 '22 01:12 supperthomas

GitHub Actions 入门教程 https://www.ruanyifeng.com/blog/2019/09/getting-started-with-github-actions.html

supperthomas avatar Dec 01 '22 01:12 supperthomas

https://github.com/xqyjlj/xqyjlj

supperthomas avatar Dec 04 '22 15:12 supperthomas

travis 源码在这里 https://github.com/armink/UtestRunner , FlashDB 里也有用到 https://github.com/armink/FlashDB/blob/master/.travis.yml

supperthomas avatar Dec 15 '22 01:12 supperthomas

Intro to CI/CD Part 2: Getting Started with GitHub Actions | Digi-Key Electronics https://www.youtube.com/watch?v=8pyqbYDYkRs

supperthomas avatar Jan 17 '23 06:01 supperthomas

图片

github action token权限。

supperthomas avatar Jan 28 '23 08:01 supperthomas

     - name: Push to GitHub
        uses: EndBug/add-and-commit@v9
        with:
          message: "🎆 docs:  Update new data"

supperthomas avatar Jan 28 '23 08:01 supperthomas


nohup qemu-system-arm -M vexpress-a9 -smp cpus=2 -kernel rtthread.bin -nographic -sd sd.bin > cmd2.out 2>&1 &


supperthomas avatar Jan 28 '23 15:01 supperthomas

github action 缓存机制 https://github.com/a1012112796/rtt_ci_env https://github.com/a1012112796/rt-thread/blob/zzc/dev/ci_simple/.github/workflows/action.yml https://cloud.tencent.com/developer/article/1695206

supperthomas avatar Feb 07 '23 02:02 supperthomas

通过rtt_ci_env仓库的ci 来push对应的image到dockerhub的不同tag 然后通过rtthread里面的action来调用对应的image。这个其实耗时比较大。

supperthomas avatar Feb 07 '23 02:02 supperthomas