rv32emu icon indicating copy to clipboard operation
rv32emu copied to clipboard

Add Dockerfile as advanced preparation for CI

Open tony2037 opened this issue 3 years ago • 3 comments

As it describes in issue #21, there are several test suites, and we want to run in CI pipeline

Therefore, we may need a container-based approach in the near future. Plus, this can align the development environment.

tony2037 avatar Aug 13 '22 15:08 tony2037

As it describes in #21. We probably can use this approach to align development environment and build up CI pipeline based on this.

tony2037 avatar Aug 13 '22 15:08 tony2037

On my MacBook, it takes 198.7 s to build the docker image.

Device: MacBook Pro (13-inch, 2017, Two Thunderbolt 3 ports) CPU: 2.3 GHz Intel Core i5 Memory: 8 GB 2133 MHz LPDDR3

[+] Building 198.7s (6/9) [+] Building 351.7s (10/10) FINISHED => [internal] load build definition from Dockerfile 0.1s => => transferring dockerfile: 819B 0.1s => [internal] load .dockerignore 0.0s => => transferring context: 2B 0.0s => [internal] load metadata for docker.io/library/ubuntu:20.04 1.2s => CACHED [1/5] FROM docker.io/library/ubuntu:20.04@sha256:af5efa9c28de78b754777af9b4d850112cad01899a5d37d2617bb94dc63a49aa 0.0s => [internal] load build context 0.0s => => transferring context: 5.26kB 0.0s => [2/5] RUN ln -snf /usr/share/zoneinfo/Asia/Taipei /etc/localtime && echo Asia/Taipei > /etc/timezone 0.3s => [3/5] RUN apt-get update && apt-get install -y git build-essential libsdl2-dev gcc-riscv64-unknown-elf 331.9s => [4/5] COPY . /usr/src/rv32emu 0.2s => [5/5] WORKDIR /usr/src/rv32emu 0.0s => exporting to image 17.2s => => exporting layers 17.1s => => writing image sha256:22b5dbc81af3bb9ca1b4d895250a01c169517d81ebd37ef515cd0823993f308a 0.0s => => naming to docker.io/library/rv32emu 0.1s

tony2037 avatar Aug 13 '22 15:08 tony2037

The proposed Dockerfile looks fine. However, I am afraid of the uncertainty of public Docker repository required by CI pipeline. That is, how can we ensure the availability of Docker images which contain GNU toolchain and Linux systems? Sometimes, GitHub Actions would fail if no specified package is downloaded.

jserv avatar Aug 24 '22 15:08 jserv

Close because it would not really shorten the time to perform CI.

jserv avatar Oct 28 '22 13:10 jserv