Moving druntime into the DMD repository

Seb seb at wilzba.ch
Sun Jul 29 18:57:23 UTC 2018


On Friday, 27 July 2018 at 11:25:37 UTC, Mike Franklin wrote:
> On Friday, 27 July 2018 at 11:03:50 UTC, Seb wrote:
>
>> - Do you have a better suggestion?
>
> Do we have a rich enough CI API to recognize dependencies 
> between repositories?  For example, if I create a local branch 
> in my dmd repository named `fix_bug` and a local branch in my 
> druntime repository also named `fix_bug` and submit both PRs to 
> their corresponding repositories, can the CI scripts recognize 
> that they have the same branch name and pull them both for 
> testing?
>
> Mike

It's already implemented for branches under the respective dlang 
repository.
This roughly happens on every CI:

```sh
for proj in druntime phobos; do
     if [ $BRANCH != master ] && [ $BRANCH != stable ] &&
            ! git ls-remote --exit-code --heads 
https://github.com/dlang/$proj.git $BRANCH > /dev/null; then
         # use master as fallback for other repos to test feature 
branches
         clone https://github.com/dlang/$proj.git ../$proj master
     else
         clone https://github.com/dlang/$proj.git ../$proj $BRANCH
     fi
done
```

However, this only applies if the PR is targeting the respective 
branch, which means the workflow is a bit more annoying

* push dmd branch to dlang/druntime-dmd
* open PR at dmd targeting master (from druntime-dmd)
* create druntime-dmd branch at dlang/druntime
* push changes to private branch
* open PR at druntime targetting druntime-dmd
* merge druntime-dmd back to master once the druntime PR has been 
approved and merged

It's a bit of an overhead for small changes though :/

Checking out the branch from your repository is problematic, 
because it's not exposed as environment variable and we would 
need to query the GitHub API to find this. Now the GitHub API 
gets rate-limited pretty quick, we would have to use our own 
GitHub API cache layer and ensure the requests coming from the 
CIs are really ours.


More information about the Digitalmars-d mailing list