lnis-uofu / OpenFPGA

An Open-source FPGA IP Generator
https://openfpga.readthedocs.io/en/master/
MIT License
816 stars 160 forks source link

Make the Github Workflow Portable #387

Closed tangxifan closed 2 years ago

tangxifan commented 2 years ago

Is your feature request related to a problem? Please describe. OpenFPGA already has a complex CI/CD logic deployed on the Github Actions. The CI consists of the following steps

See details at https://openfpga.readthedocs.io/en/master/dev_manual/ci_cd_setup/

However, currently, the docker image path is hard coded in the workflow:

https://github.com/lnis-uofu/OpenFPGA/blob/d85e55aef2556459af314012c58425296a889b1f/.github/workflows/build.yml#L53

https://github.com/lnis-uofu/OpenFPGA/blob/d85e55aef2556459af314012c58425296a889b1f/.github/workflows/build.yml#L202

This has caused some problem, where a forked directory cannot run CIs in their own repository, because they cannot push to the docker image to OpenFPGA upstream. For docker-based regression tests, it always try to fetch an upstream image, which may be out-of-date in a fork (A fork version may be ahead of master before being merged to upstream)

Describe the solution you'd like Find a way to make the Github workflow portable, where the docker image path is adaptive from one repo to another. For example, if we can use some Github env variables, such as ${{GITHUB_REPOSITORY}} rather than hard coded path. It can solve the problem. See details about Github action env. variables at https://docs.github.com/en/actions/learn-github-actions/environment-variables

tangxifan commented 2 years ago

@ganeshgore See if this is doable or makes sense to you.

ganeshgore commented 2 years ago

This should be possible, I will evaluate it over the weekend.

tangxifan commented 2 years ago

@ganeshgore Just a reminder, we need to update the documentation about CI/CD manual before both you and I forgot how to use it totally

tangxifan commented 2 years ago

Solved by #392 Close now.