Providing SDE docker images from CI#105
Conversation
|
Great! ccache might just require a little bit of extra set up. We have something similar for p4c: You may also have to set the directory: https://github.com/p4lang/p4c/blob/main/tools/ci-build.sh#L133 Also, please sign the DCO: |
6ef8dbe to
dd84d09
Compare
|
The current workflow for However, the cache hit rate seems marginal: The DCO verifier should be happy now. EDIT: Seems that #98 has broken something for the Docker CI: Not sure why though... It works for the testing CI |
Yes, for the container workflow in P4C we have the same problem that ccache does not work actually. For the Ubuntu 18.04 workflow things were working using the steps I provided. We can leave it for now and figure it out later, but it would be nice to make use of ccache. Otherwise the build will take a loooong time.
This step builds a kernel module. Possible that these folders are not mapped in Docker? |
|
Alright, I will create an issue later so that the ccache feature for the docker CI does not fall into oblivion :) Should I also remove all ccache related parts for now? Yes, it seems that this is the problem, and building kernel modules in Docker does not look that straightforward. Is there a configuration flag or environment variable that we could set to disable kernel module building? |
Yes, there should be an option in the CMakelists to build kernel modules, You can toggle that. |
|
Feel free to create the issue and remove the ccache changes. Maybe add them to the issue for the future. |
I tried to set it with |
There is a way to pass CMake args to the studio build, or use the configuration file to pass the CMake arguments. But I do not quite remember how. I would need to check. If passing this option does not work its a bug. Let's not use the sed hack. |
|
@fruffy , @n1tr0-5urf3r ! Sorry for chiming in late, but if you are using Here is a trivial profile for your reference: global-options: {}
features:
drivers:
kernel-modules: true
p4-examples:
- p4-16-programs
architectures:
- tofinoYou can set this |
Thank you @vgurevich, this was exactly what I was looking for! I further added the |
…port (p4lang#84) Signed-off-by: Andy Fingerhut <andy.fingerhut@gmail.com> Signed-off-by: Fabian Ihle <fabian.ihle@uni-tuebingen.de>
Signed-off-by: Fabian Ihle <fabian.ihle@uni-tuebingen.de>
Signed-off-by: Fabian Ihle <fabian.ihle@uni-tuebingen.de>
Signed-off-by: Fabian Ihle <fabian.ihle@uni-tuebingen.de>
Signed-off-by: Fabian Ihle <fabian.ihle@uni-tuebingen.de>
Signed-off-by: Fabian Ihle <fabian.ihle@uni-tuebingen.de>
Signed-off-by: Fabian Ihle <fabian.ihle@uni-tuebingen.de>
Signed-off-by: Fabian Ihle <fabian.ihle@uni-tuebingen.de>
Signed-off-by: Fabian Ihle <fabian.ihle@uni-tuebingen.de>
Signed-off-by: Fabian Ihle <fabian.ihle@uni-tuebingen.de>
Signed-off-by: fruffy <fruffy@nyu.edu> Signed-off-by: Fabian Ihle <fabian.ihle@uni-tuebingen.de>
Signed-off-by: Vladimir Gurevich <vag@p4ica.com> Signed-off-by: fruffy <fruffy@nyu.edu> Signed-off-by: Fabian Ihle <fabian.ihle@uni-tuebingen.de>
Signed-off-by: Fabian Ihle <fabian.ihle@uni-tuebingen.de>
Signed-off-by: Fabian Ihle <fabian.ihle@uni-tuebingen.de>
Signed-off-by: Andy Fingerhut <andy.fingerhut@gmail.com> Signed-off-by: Fabian Ihle <fabian.ihle@uni-tuebingen.de> Signed-off-by: fruffy <fruffy@nyu.edu> Signed-off-by: Vladimir Gurevich <vag@p4ica.com> Co-authored-by: Andy Fingerhut <andy.fingerhut@gmail.com> Co-authored-by: Fabian Ruffy <5960321+fruffy@users.noreply.github.com> Co-authored-by: Vladimir Gurevich <vag@p4ica.com>
Signed-off-by: Andy Fingerhut <andy.fingerhut@gmail.com> Signed-off-by: Fabian Ihle <fabian.ihle@uni-tuebingen.de> Signed-off-by: fruffy <fruffy@nyu.edu> Signed-off-by: Vladimir Gurevich <vag@p4ica.com> Co-authored-by: Andy Fingerhut <andy.fingerhut@gmail.com> Co-authored-by: Fabian Ruffy <5960321+fruffy@users.noreply.github.com> Co-authored-by: Vladimir Gurevich <vag@p4ica.com> Signed-off-by: Andy Fingerhut <andy_fingerhut@alum.wustl.edu>
This PR adds an automated CI workflow for building and pushing Docker images to the GitHub Container Registry (#103). The container image can be used to build and verify data plane builds in CI and to compile a P4 project locally for the Tofino model, eliminating the need to compile p4studio. I have included a Dockerfile and a lightweight profile for P4Studio, which may still require some adjustment. For example, are the BFRT and GRPC drivers required for the image?
Also, ccache doesnt work with the docker build process in CI, so building the image is 2-3h hours currently.
Further, some steps are redundant with the test matrix from the ubuntu-test CI, i.e., building p4studio (without the Dockerfile and with a different profile though). We could either
Option 1 requires more CI building resources since p4studio is built twice, but I prefer this option.
After pushing the image, it may have to be made public in the organization's settings under "Packages"