Skip to content

Commit f3d62d0

Browse files
committed
add x86_64/arm64 env test workflow
Signed-off-by: yifengyou <842056007@qq.com>
1 parent 2981a1b commit f3d62d0

File tree

3 files changed

+148
-66
lines changed

3 files changed

+148
-66
lines changed

.github/workflows/envtest-arm64.yml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
#==========================================================================
2+
# Description: envtest arm64
3+
#==========================================================================
4+
5+
name: envtest arm64
6+
7+
on:
8+
repository_dispatch:
9+
workflow_dispatch:
10+
11+
env:
12+
TZ: America/New_York
13+
14+
jobs:
15+
build:
16+
runs-on: ubuntu-24.04-arm64
17+
if: ${{ github.event.repository.owner.id }} == ${{ github.event.sender.id }}
18+
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
23+
- name: Initialization environment
24+
id: init
25+
env:
26+
DEBIAN_FRONTEND: noninteractive
27+
run: |
28+
mkdir -p /tmp/builder/
29+
uname -a > /tmp/builder/envinfo.txt
30+
echo "-----------" >> /tmp/builder/envinfo.txt
31+
tty >> /tmp/builder/envinfo.txt || true
32+
echo "-----------" >> /tmp/builder/envinfo.txt
33+
id >> /tmp/builder/envinfo.txt
34+
echo "-----------" >> /tmp/builder/envinfo.txt
35+
cat /etc/*release >> /tmp/builder/envinfo.txt
36+
echo "-----------" >> /tmp/builder/envinfo.txt
37+
ls -alh /dev/kvm >> /tmp/builder/envinfo.txt
38+
echo "-----------" >> /tmp/builder/envinfo.txt
39+
ip addr >> /tmp/builder/envinfo.txt
40+
echo "-----------" >> /tmp/builder/envinfo.txt
41+
df -h >> /tmp/builder/envinfo.txt
42+
echo "-----------" >> /tmp/builder/envinfo.txt
43+
cat /proc/cpuinfo >> /tmp/builder/envinfo.txt
44+
echo "-----------" >> /tmp/builder/envinfo.txt
45+
cat /proc/cpuinfo >> /tmp/builder/envinfo.txt
46+
echo "-----------" >> /tmp/builder/envinfo.txt
47+
free -w -h >> /tmp/builder/envinfo.txt
48+
echo "-----------" >> /tmp/builder/envinfo.txt
49+
dpkg -l >> /tmp/builder/envinfo.txt
50+
echo "-----------" >> /tmp/builder/envinfo.txt
51+
echo "status=success" >> ${GITHUB_OUTPUT}
52+
53+
- name: Upload files to Release
54+
uses: ncipollo/release-action@main
55+
if: ${{ steps.init.outputs.status }} == 'success' && !cancelled()
56+
with:
57+
tag: envtest_arm64
58+
artifacts: /tmp/builder/*
59+
allowUpdates: true
60+
removeArtifacts: false
61+
replacesArtifacts: true
62+
token: ${{ secrets.GITHUB_TOKEN }}
63+
body: |
64+
### Action upload test
65+
This is just test(这是一个测试)
66+
- upload cpuinfo(获取构建环境的CPU信息)
67+
* /proc/cpuinfo
68+
- upload meminfo(获取构建环境的内存信息)
69+
* /proc/meminfo
70+
- upload release(上传发布信息)
71+
* ```uname -a > /tmp/builder/kernel.txt```
72+
- 测试链接
73+
* [baidu](https://www.baidu.com "百度搜索")
74+
* [taobao](https://www.taobao.com "淘宝")

.github/workflows/envtest-x86_64.yml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
#==========================================================================
2+
# Description: envtest x86_64
3+
#==========================================================================
4+
5+
name: envtest x86_64
6+
7+
on:
8+
repository_dispatch:
9+
workflow_dispatch:
10+
11+
env:
12+
TZ: America/New_York
13+
14+
jobs:
15+
build:
16+
runs-on: ubuntu-24.04
17+
if: ${{ github.event.repository.owner.id }} == ${{ github.event.sender.id }}
18+
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
23+
- name: Initialization environment
24+
id: init
25+
env:
26+
DEBIAN_FRONTEND: noninteractive
27+
run: |
28+
mkdir -p /tmp/builder/
29+
uname -a > /tmp/builder/envinfo.txt
30+
echo "-----------" >> /tmp/builder/envinfo.txt
31+
tty >> /tmp/builder/envinfo.txt || true
32+
echo "-----------" >> /tmp/builder/envinfo.txt
33+
id >> /tmp/builder/envinfo.txt
34+
echo "-----------" >> /tmp/builder/envinfo.txt
35+
cat /etc/*release >> /tmp/builder/envinfo.txt
36+
echo "-----------" >> /tmp/builder/envinfo.txt
37+
ls -alh /dev/kvm >> /tmp/builder/envinfo.txt
38+
echo "-----------" >> /tmp/builder/envinfo.txt
39+
ip addr >> /tmp/builder/envinfo.txt
40+
echo "-----------" >> /tmp/builder/envinfo.txt
41+
df -h >> /tmp/builder/envinfo.txt
42+
echo "-----------" >> /tmp/builder/envinfo.txt
43+
cat /proc/cpuinfo >> /tmp/builder/envinfo.txt
44+
echo "-----------" >> /tmp/builder/envinfo.txt
45+
cat /proc/cpuinfo >> /tmp/builder/envinfo.txt
46+
echo "-----------" >> /tmp/builder/envinfo.txt
47+
free -w -h >> /tmp/builder/envinfo.txt
48+
echo "-----------" >> /tmp/builder/envinfo.txt
49+
dpkg -l >> /tmp/builder/envinfo.txt
50+
echo "-----------" >> /tmp/builder/envinfo.txt
51+
echo "status=success" >> ${GITHUB_OUTPUT}
52+
53+
- name: Upload files to Release
54+
uses: ncipollo/release-action@main
55+
if: ${{ steps.init.outputs.status }} == 'success' && !cancelled()
56+
with:
57+
tag: envtest_x86_64
58+
artifacts: /tmp/builder/*
59+
allowUpdates: true
60+
removeArtifacts: false
61+
replacesArtifacts: true
62+
token: ${{ secrets.GITHUB_TOKEN }}
63+
body: |
64+
### Action upload test
65+
This is just test(这是一个测试)
66+
- upload cpuinfo(获取构建环境的CPU信息)
67+
* /proc/cpuinfo
68+
- upload meminfo(获取构建环境的内存信息)
69+
* /proc/meminfo
70+
- upload release(上传发布信息)
71+
* ```uname -a > /tmp/builder/kernel.txt```
72+
- 测试链接
73+
* [baidu](https://www.baidu.com "百度搜索")
74+
* [taobao](https://www.taobao.com "淘宝")

.github/workflows/test-action.yml

Lines changed: 0 additions & 66 deletions
This file was deleted.

0 commit comments

Comments
 (0)