-
Notifications
You must be signed in to change notification settings - Fork 80
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
Improve the deployment script #598
Improve the deployment script #598
Conversation
9485a53
to
12927ea
Compare
release.sh
Outdated
unameOut="$(uname -s)" | ||
case "$unameOut" in | ||
Linux*) OS=linux; ;; | ||
Darwin*) OS=osx; LDC_FLAGS+=("-macosx_version_min 10.7" "-lcrt1.o"); ;; |
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.
ldc2: Unknown command line argument '-macosx_version_min'. Try: 'ldc2 -help'
ldc2: Did you mean '-dwarf-version'?
ldc2: Unknown command line argument '-lcrt1.o'. Try: 'ldc2 -help'
:/
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.
These are linker flags. You can check the DStep Dub file: https://github.com/jacob-carlborg/dstep/blob/19a5ddb8ad3f44b3445c89840155bb7cd1ee44b7/dub.json#L20
959bd99
to
8a8e357
Compare
@@ -76,26 +76,5 @@ report: all | |||
dscanner --report src > src/dscanner-report.json | |||
sonar-runner | |||
|
|||
.ONESHELL: |
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.
ONESHELL
is only available in Make 3.82.
Travis uses 3.81 and there's no easy way to upgrade.
8a8e357
to
3fc2059
Compare
@@ -16,10 +16,10 @@ script: "./.travis.sh" | |||
jobs: | |||
include: | |||
- stage: GitHub Release | |||
if: tag IS present | |||
d: ldc | |||
#if: tag IS present |
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.
Apparently building the binaries on Travis is vastly more complicated than thought, so let's better constantly build them to avoid bad surprises on releases. Imho the ~1.5min are worth the mind peace.
if: tag IS present | ||
d: ldc | ||
#if: tag IS present | ||
d: ldc-1.8.0 |
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.
Locking the release compiler. Just in case there are any regressions coming up (I experienced some with the dlang-tour and it was a hell to figure out that the sudden failures were due to an automatic compiler upgrade)
@bbasile FYI: this is ready now. Would be nice if we can merge this before tagging 0.5.1 - thanks! |
*) echo "Unknown ARCH: $ARCH"; exit 1 | ||
esac | ||
|
||
archiveName="dscanner-$VERSION-$OS-$ARCH_SUFFIX.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.
Nitpick, binaries/packages for macOS usually don't contain the architecture. If multiple architectures are provided it's expected to be provided in a single universal binary.
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.
Hmm, we do the same for dub too (https://github.com/dlang/dub/releases, http://code.dlang.org/download) as it makes automated downloads easier.
I just saw that LDC has the same pattern: https://github.com/ldc-developers/ldc/releases
unameOut="$(uname -s)" | ||
case "$unameOut" in | ||
Linux*) OS=linux; LDC_FLAGS=("-flto=full" "-linker=gold" "-static") ;; | ||
Darwin*) OS=osx; LDC_FLAGS+=("-L-macosx_version_min" "-L10.7" "-L-lcrt1.o"); ;; |
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.
Nitpick, I would prefer "macOS" over osx
, since this is what the OS is called now.
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 naming is consistent with Dub's and LDC's releases:
https://github.com/dlang/dub/releases
https://github.com/ldc-developers/ldc/releases
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, please @wilzbach. He's right about the terminology. osx is a serie of Mac OS versions.
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.
But that's true that even for pre-defined D version identifiers osx is used....
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.
Well, to be honest I don't feel strongly about it as long as we finally get the automated release builds working. We have been pushing this off for far too long ;-)
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 naming is consistent with Dub's and LDC's releases:
But that's true that even for pre-defined D version identifiers osx is used....
That doesn't mean it's correct 😃. The predefined version identifier was arbitrary chosen by Walter even though darwin
already existed in other compilers. Back then the official name was "Mac OS X", so naming it "OSX" was neither correct.
@bbasile I will merge this then, s.t. we can test it for 0.5.1 |
Looks like this finally worked :) I tested the Linux binary and it works fine - even on a 2.6.X kernel So now we just need to figure out how to painlessly compile the Windows binaries. |
You don't need to run it in Docker. It simple enough to setup everything that is needed before building. This Docker image, compared with the one for macOS, did not require the multiarch/crossbuild base Docker image since LDC contains the cross-linker. |
I don't. |
Adding Adding |
I know, but I was referring to downloading the VS libraries from Dropbox and copying the libs over. |
Right. Perhaps a pre-packaged cross-compiler? Download and unpack. Event better if it can be upstreamed. |
@wilzbach If you don't want to learn PowerShell, you can use AppVeyor and install msys2 which bundles bash. I did some experiments and it's pretty straight forward [1]: - cinst msys2 --params "/NoUpdate"
- bash -lic "echo 'asd'" I'm not sure which tools are bundled but you can install additional tools using chocolatey [2] [3]. AppVeyor also has native support for GitHub releases [4]. [2] https://chocolatey.org/packages/curl |
Thanks a lot for your pointers, but we already went through this and while annoying PowerShell isn't too hard. Even this repo has a https://github.com/dlang-community/D-Scanner/blob/master/appveyor.yml But AppVeyor was disabled, because I think (?) there have been too many random failures. |
Testing dlang-community/discussions#9 (comment)
As I don't have OSX, I simply added
make release
to the Travis script for now. Let's see if this works out of the box.