-
Notifications
You must be signed in to change notification settings - Fork 14
Added GitHub Action for CI: #56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Runs on ubuntu-22.04 Mlibc compilation: - Build libraries for ARM/AArch64/RISC-V32/RISC-V64 with toolchain setup - Add artifact downloads Qemu environments: - Pre-built qemu-9.2.2 - Support mps3-an536, vexpress-a9, virt-aarch64, virt-riscv32/64 - Monitor qemu logs Signed-off-by: Jiajie Zhou <2293611667@qq.com>
Renamed TARGET to QEMU_TARGET in qemu-hello.mk to avoid conflicts with makefile. Signed-off-by: Jiajie Zhou 2293611667@qq.com
|
运行的效果,可以参考下面
|
| wget -q https://github.com/Chris-godz/mlibc/releases/download/CI/qemu-9.2.2.tar.zst | ||
| cat *.tar.zst | zstd -d -T0 | tar -xf - > /dev/null 2>&1 | ||
| chmod +x ./qemu-9.2.2/qemu_install.sh | ||
| sudo ./qemu-9.2.2/qemu_install.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个是不是应该放到 https://github.com/plctlab/mlibc/ 上去,而不是 https://github.com/Chris-godz/mlibc/
另外 qemu_install.sh 干了什么?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个是我编译后的qemu-9.2.2,删掉了不必要的部分, qemu_install.sh是我根据qemu安装的日志,把编译后的部分mov到系统对应的位置
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个是不是应该放到 https://github.com/plctlab/mlibc/ 上去,而不是 https://github.com/Chris-godz/mlibc/
另外 qemu_install.sh 干了什么?
是的,需不需要也把用到的 rtt release 的工具链部分也一起放到mlibc的仓库里面
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我觉得像 gcc 那样统一放 https://github.com/RT-Thread/toolchains-ci/releases 就挺好的,@BernardXiong 熊大给个建议?
@Chris-godz 另外我发现 rv32 的toolchain 你是从一个非官方的地方下载的,其实我记得 riscv64 的 gcc 也是可以编译 rv32 的,就是用 -march 和 -mabi 控制好就好了的。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我觉得像 gcc 那样统一放 https://github.com/RT-Thread/toolchains-ci/releases 就挺好的,@BernardXiong 熊大给个建议?
问题是,放哪个仓库呢?
unicornx
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
除了 embeded 的 comments 外,我还有几个问题如下:
Q1:从这个 PR 来看,有两个工作:
- compile-mlibc.yaml: 编译 milbc 库
- qemu-hello.yaml:编译 elf 并在 qemu 上跑测试
可是编译 elf 本身也会编译 mlibc 和 crt 啊,是否可以合并成一个 yaml? 为啥要设计成两个,有什么特别考虑吗?我的理解是是否可以合并成一个,这样在 ci 时把构建和运行测试一起都做了不好吗?
Q2:我看 ci 会下载 toolchain 和 qemu,特别时 qemu 要下载和安装,这个时间花费大吗?有没有测试过跑一个 ci test 要多长时间?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这是一个 bugfix,应该单独提一个 pr。不建议和这个 pr 一起提交。
我已经提了一个 issue:#57
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
是否应该移除这个文件的修改?
Q1的话,两个编译过程还是有细微的区别,主要是两个过程中 mlibc 和 crt 编译时传的 flag 是有区别的,建议还是分成两个吧 Q2的话,可以参考https://github.com/Chris-godz/mlibc/actions/runs/14040200041 ,提前编译好qemu的话,时间大概一分钟左右 |
具体什么差别?还能说一下? |
qemu编译的时候,传给编译器的是 mkconfigs/qemu 下面对应环境的 flag ,而直接编译mlibc不是的 |
这个问题我感觉还是需要再研究一下。另外我尝试分别执行了 make_mlibc_ARCH=riscv64.log 附件是 log,可以对比一下。
不过值得注意的是: |
这里我看了一下,应该是我当时在readme的时候没有说清楚,直接 实际上,两次编译mlibc的时候编译的参数会有差异
|
|
这份PR有冲突了,还请修正下,谢谢。 |
|
还帮忙推动下这个PR,随着multilib的加入,ci看护是很重要的一方面。谢谢 |
Added GitHub Action for CI:
Runs on ubuntu-22.04
Mlibc compilation:
Qemu environments: