supperthomas / bluetoothlover_doc

this is about the learning station about friends.
https://supperthomas-wiki.readthedocs.io/
Apache License 2.0
44 stars 26 forks source link

[github][action] 学习action #259

Open supperthomas opened 2 years ago

supperthomas commented 2 years ago

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

hyhkjiy commented 2 years ago

官方资料

supperthomas commented 2 years ago

image

supperthomas commented 2 years ago

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

supperthomas commented 2 years ago

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

supperthomas commented 2 years ago

图片

supperthomas commented 2 years ago

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

supperthomas commented 2 years ago

GitHub Actions 有一些自己的术语。

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

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

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

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

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

supperthomas commented 2 years ago

图片

supperthomas commented 2 years ago

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

supperthomas commented 2 years ago

图片

supperthomas commented 2 years ago

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

supperthomas commented 2 years ago

图片

supperthomas commented 2 years ago

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

supperthomas commented 2 years ago

github actionCI部署有两种方式

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

如果想要节省时间:

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

还有个软件包的问题:

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

还有个软件包的问题:

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

哈哈,有办法了。。

hyhkjiy commented 2 years ago

还有个软件包的问题:

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

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

supperthomas commented 2 years ago

还有个软件包的问题:

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

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

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

supperthomas commented 2 years ago

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

supperthomas commented 1 year ago

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

supperthomas commented 1 year ago

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

supperthomas commented 1 year ago

https://github.com/xqyjlj/xqyjlj

supperthomas commented 1 year ago

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

supperthomas commented 1 year ago

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

supperthomas commented 1 year ago

图片

github action token权限。

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

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

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 commented 1 year ago

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

supperthomas commented 1 year ago

rt-thread : apt-get install tool 需要30秒, 安装gcc需要20秒。 每个bsp都需要这时间。 不过一个bsp搞完差不多也就2分钟时间,还是挺快的。

supperthomas commented 1 year ago

参考机制 https://github.com/zephyrproject-rtos/docker-image/pkgs/container/ci

supperthomas commented 1 year ago

github 关于package 文档 https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry

supperthomas commented 1 year ago
        echo CONFIG_RT_USING_UTESTCASES=y >> $TEST_BSP_ROOT/.config
        cat examples/utest/configs/$TEST_CONFIG_FILE >> $TEST_BSP_ROOT/.config
supperthomas commented 1 year ago

$(nproc)

supperthomas commented 1 year ago

continue-on-error:

supperthomas commented 1 year ago

ls bsp/$bsp/Kconfig && scons -C bsp/$bsp --pyconfig-silent pushd bsp/$bsp && pkgs --update && popd

supperthomas commented 1 year ago

https://github.com/xpack-dev-tools/qemu-arm-xpack/blob/325ed77bbefdad7ad1aa2732cac6456a24321da9/.github/workflows/build-all.yml#LL26C2-L26C2

supperthomas commented 1 year ago

https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#grouping-log-lines

https://docs.github.com/zh/actions/using-workflows/workflow-commands-for-github-actions

折叠工作流

supperthomas commented 1 year ago

https://github.com/nektos/act action 本地化运行

supperthomas commented 1 month ago

做个package 没有toolchain