-
-
Notifications
You must be signed in to change notification settings - Fork 608
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add win64 build and test or something #7214
Conversation
|
Thanks for your pull request, @dmdw64! We are looking forward to reviewing it, and you should be hearing from a maintainer soon. Some tips to help speed things up:
Bear in mind that large or tricky changes may require multiple rounds of review and revision. Please see CONTRIBUTING.md for more information. Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. |
8fe87a2
to
be1c195
Compare
appveyor.yml
Outdated
| - cd c:/projects/ | ||
| - call "c:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64 | ||
| - bash --version | ||
| - appveyor DownloadFile "https://ftp.gnu.org/gnu/make/make-4.2.tar.gz" -FileName make.tar.gz |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While I would love to use GNUmake on Windows, the sad reality is that DMD ships with DM make and thus that's the only make binary we can expect people to have on Windows. @CyberShadow and I have tried to push for changing the status quo in the past, but so far without any real progress :/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test suite actually uses GNU make on Windows, too. You even need a unix like environment to run the *.sh tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As mentioned, it's required to run the tests. I'd be fine with just using GNU make for all the make scripts. It's not fun using two different make systems who's executables are both named "make". I'd much rather have one make system, then GNU make can be provided with the releases instead of DM's make.
Fixing the make situation would also be nice. Windows has the most amount of make configurations but the least amount of test servers. It's not ideal at all, this pull request was to at the very least get win64.mak tested as it isn't being run as part of any tests at all. This PR was sitting here for ~2 months before it got its first comment..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already have a go for GNU make on Windows @wilzbach, just needs someone to implement the transition.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about caching that installation?
https://www.appveyor.com/docs/build-cache/
|
@dmdw64 I just enabled the AppVeyor hook again and closed/reopened your PR to trigger a build. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixing the make situation would also be nice. Windows has the most amount of make configurations but the least amount of test servers. It's not ideal at all,
Agreed.
this pull request was to at the very least get win64.mak tested as it isn't being run as part of any tests at all. This PR was sitting here for ~2 months before it got its first comment..
I'm really sorry about this. Imho we should move on with this as an initial version as soon as the tests on AppVeyor pass. What do other people think?
CC @CyberShadow @ZombineDev @MartinNowak
appveyor.sh
Outdated
| dmd --version | ||
| fi | ||
|
|
||
| if [ $APPVEYOR_REPO_TAG == true ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to check whether the upstream branch (e.g. stable) exists on these repos too.
See e.g.:
Lines 84 to 92 in d28274e
| for proj in druntime phobos; do | |
| if [ $base_branch != master ] && [ $base_branch != stable ] && | |
| ! git ls-remote --exit-code --heads https://github.com/dlang/$proj.git $base_branch > /dev/null; then | |
| # use master as fallback for other repos to test feature branches | |
| clone https://github.com/dlang/$proj.git ../$proj master --depth 1 | |
| else | |
| clone https://github.com/dlang/$proj.git ../$proj $base_branch --depth 1 | |
| fi | |
| done |
and
Lines 94 to 102 in d28274e
| for proj in druntime phobos; do | |
| if [ $TRAVIS_BRANCH != master ] && [ $TRAVIS_BRANCH != stable ] && | |
| ! git ls-remote --exit-code --heads https://github.com/dlang/$proj.git $TRAVIS_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 $TRAVIS_BRANCH | |
| fi | |
| done |
appveyor.sh
Outdated
| git clone --branch master https://github.com/dlang/druntime | ||
| git clone --branch master https://github.com/dlang/phobos | ||
| fi | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure whether CircleCi supports it, but otherwise we need to manually merge the PR into master, see e.g.:
Lines 73 to 82 in d28274e
| # merge testee PR with base branch (master) before testing | |
| if [ -n "${CIRCLE_PR_NUMBER:-}" ]; then | |
| local head=$(git rev-parse HEAD) | |
| git fetch https://github.com/dlang/$CIRCLE_PROJECT_REPONAME.git $base_branch | |
| git checkout -f FETCH_HEAD | |
| local base=$(git rev-parse HEAD) | |
| git config user.name 'CI' | |
| git config user.email '<>' | |
| git merge -m "Merge $head into $base" $head | |
| fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it does do the merge first, at least by how it grabs the commit it looks like it does.
|
Think you can enable appveyor again? It doesn't seem to be detecting the changes. Might have to use an older VS, I think I remember not being able to get it work with VS2015 for whatever reason. DMD would always crash when trying to build but would work with the older VS2010. |
Sorry. I won't disable it again.
That sounds really terribly. I presume @rainers could help here to get this PR to the finish line? |
Lines 17 to 31 in d28274e
|
|
Let's try restarting the appveyor build. |
Rebased to master to incorporate the news changes (that's merging with master should be done as part of the script). |
5f82c9b
to
19ce119
Compare
|
Finally! Thanks to @dmdw64 and @wilzbach's efforts the AppVeyor build is looking like it's going to pass for the first time. At this rate the log output in AppVeyor behaves like a browser benchmark 😄 (Of all browsers on my computer only Microsoft Edge is able to smoothly display the log, coincidence?!) |
|
Well it was @rainers who fixed DMD, which clearly shows why there is a need for such an CI. Luckily the respective PR was merged yesterday and is available via dmd-nightly. :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks mostly good.
appveyor.yml
Outdated
| C_COMPILER: MSVC | ||
|
|
||
| artifacts: | ||
| - path: src/dmd.exe |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why would you want to provide artifacts?
We already have http://nightlies.dlang.org/ for nightlies.
appveyor.yml
Outdated
| - cd c:/projects/ | ||
| - call "c:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64 | ||
| - bash --version | ||
| - appveyor DownloadFile "https://ftp.gnu.org/gnu/make/make-4.2.tar.gz" -FileName make.tar.gz |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about caching that installation?
https://www.appveyor.com/docs/build-cache/
| @@ -0,0 +1,64 @@ | |||
| #!/bin/sh | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why should this be a bash/sh file, makes it more complex to reproduce, and there are already batch and powershell. Also this script does very little, so it hardly should a problem to reproduce it in PowerShell.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to use bash in order to run the tests for dmd, so there's no avoiding it completely. Can make it all a powershell script except for the part that's needed to run the tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, it's not a big deal to use bash here. It is not an additional dependency as the tests require it anyway.
LDC builds are faster because not all combinations of command line flags are tested, just the quick tests. With -j1 needed 40 minutes, we are back to 20 minutes with -j2. |
e7f44ec
to
9bdd11c
Compare
|
@MartinNowak Moved here: https://github.com/dmdw64/dmd/blob/ps1/appveyor.ps1 |
64f24d0
to
919f8d7
Compare
|
@rainers Should definitely make sure the VisualD project file builds. Don't know how you would go about installing VisualD into appveyor. I'll add the unittests for phobos/druntime when I get a chance tomorrow. |
The auto tester is testing the generation of 64-bit COFF and 32-bit OMF. 32-bit COFF is not covoered yet.
I think this can go into a new PR. I can add that integration, I've done that for Visual D, too.
I think this can also wait for another PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this can go into a new PR.
Yes, move in small, incremental steps, but succeed :)
Imho this is more than enough for an initial version. I prefer Bash vastly over Powershell too - we need bash anyways and Bash is something we all are familiar with and can run locally as well.
Also this would allow use to share code between Travis, CircleCi and AppVeyor.
Thanks again to everyone for pushing and working on this!
|
|
||
| build_script: | ||
| - cd c:/projects/ | ||
| - call "c:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I understand @rainers work correctly, this won't be necessary anymore in a foreseeable future
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes
| matrix: | ||
| - ARCH: x64 | ||
| D_COMPILER: dmd | ||
| D_VERSION: 2.077.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We shouldn't forget to change this to 2.078.0 once released and remove the hard-coded dmd-nightly.
This is still missing too, but it's not really blocking. I am more than happy to quickly add it afterwards. Anyone against squashing our combined work into one commit? |
Isn't this done automatically, see for example https://ci.appveyor.com/project/greenify/dmd/build/1.0.373#L4
Fine with me. |
Oh yes. I should take more care when looking at stuff from my phone. Sorry.
OK done. |
|
|
||
| environment: | ||
| matrix: | ||
| - ARCH: x64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ARCH isn't used below.
No description provided.