Open vacantron opened 1 month ago
I think it is time to handle the prebuilt executable files in a more elegant way. The proposed change is to separate the executable files existing in the build
directory from the rv32emu
repository. This means we will have two repositories: rv32emu
and rv32emu-prebuilt
. The former will preserve all the source files and build scripts (or recipes), while the latter will maintain the prebuilt executable files. These prebuilt files will be triggered by GitHub Actions once the CI pipeline detects changes in the corresponding files of the rv32emu
repository as rv32emu-bench does. The advantage of the proposed change is that it includes a lean repository footprint and is suitable for future system emulation. In other words, it will not be necessary to fetch bare-metal ELF files for system emulations.
The expected flow:
rv32i
, rv32im
, rv32imac
, etc., would be passed depending on the configurations of the recipes describing how an ELF file should be built from the source.rv32emu-prebuilt
repository.rv32emu
repository is first checked out, there are no prebuilt ELF files, and the check
target of the build system would perform git clone
to get the prebuilt ELF files with the --depth=1 option for faster download, and then run the prebuilt executable files.@ChinYikMing did some prior work for rv32emu-bench.
In this work flow, the deploy-wasm CI will be affected such that it cannot monitor that whether the built elf has been changed. The possible adaption could be monitor the source files of the executable files. If the source files change, the deploy-wasm CI can use the needs
keyword in the CI workflow to wait the corresponding executable built CI runs and pushes executable files to rv32emu-prebuilt
repository. After that, deploy-wasm CI fetches the latest executable files from rv32emu-prebuilt
repository.
The file tests/arch-test-target/sail_cSim/riscv_sim_RV32
should be built via the above automated flow to have the linux-x86_64 binary accordingly.
The file
tests/arch-test-target/sail_cSim/riscv_sim_RV32
should be built via the above automated flow to have the linux-x86_64 binary accordingly.
I have done the compiler packaging and recompiling sail reference model before actually, and it's done in a container, so I can quickly help on this matter.
However I recall that using a newer toolchain to build rv32emu at the time would cause the tests to fail, also, building a reference model using the latest dependencies would cause some tests to fail, too. So there might be some work to do...
All the dockerfile that I worked on is under the directory docker
.
I will update both Dockerfiles and push to DockerHub in the meantime, as #455 requires updating the compiler toolchain and recompiling the benchmark elfs, otherwise, our benchmarking CI is currently broken.
Latest toolchain image and sail reference model image have been updated to DockerHub
I will create 2 PRs
build
directory
Due to https://github.com/sysprog21/rv32emu/pull/444 , we need to update the binary with the new toolchain.