You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
name: Run some script in Kunpeng envon:
push:
branches: [ master ]pull_request:
branches: [ master ]jobs:
build:
runs-on: self-hostedsteps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Run `uname -a` in Kunpeng envrun: | uname -a cat /etc/os-release lscpu | grep -E "Architecture|Model name|CPU\(s\):"
Github在2019年8月,宣布推出了一项新的功能——Github Action,让成千上万的开源项目可以利用Github提供的计算资源完成构建、测试、部署等CI/CD,并且提供Self Hosted Runners功能,让开发者们可以将自己的机器接入到Github中来。
最近,我们利用这一功能,将搭载着openEuler 20.03 (LTS) 操作系统,跑在Kunpeng 920 处理器的ARM环境接入进来,在近期华为与阿里合作的MPAM项目,也将充分的利用这些资源利用Github Action的能力完成构建与测试。
本篇文章将接入方法分享给大家,希望能够帮助更多同学们把自己的ARM环境也在Github上用起来。
1. 接入资源
资源的接入流程比较简单:
依次点击项目的
Settings
--Actions
进入资源接入页面,点击Add Runner
。根据弹出的提示,下载和运行脚本
![image](https://user-images.githubusercontent.com/1736354/79411221-e8938e00-7fd4-11ea-8e8e-7a1b576c2fa2.png)
完成后我们可以看到接入的资源:
![image](https://user-images.githubusercontent.com/1736354/79411190-d4e82780-7fd4-11ea-952c-06f43dbfa5e2.png)
2. 使用资源
我们为接入的项目增加一个Action:
这样,这个workflow是展示所接入的环境上内核、操作系统、处理器信息,我们可以从结果看到job的结果:
![image](https://user-images.githubusercontent.com/1736354/79411452-71122e80-7fd5-11ea-83db-e4f001c5f796.png)
点击
Details
可以进入详情页面:可以看到,我们在资源上执行的指令,已经运行成功,可以看到这台资源的系统为
openEuler 20.03 (LTS)
,CPU为aarch64 128核的Kunpeng 920
。3.结语
本文介绍了我们是如何将搭载着鲲鹏920处理器、openEuler操作系统的计算资源接入到Github Action的。可以看到Github Action的自定义资源接入,在ARM64下还是很顺滑的。
希望这篇文章能够帮助到大家,大家也可以尝试着将你们自己ARM资源接入进来,有问题可以留言一起讨论,玩的开心!:)
The text was updated successfully, but these errors were encountered: